I am trying to make a weather app for iOS with LiveCode, which it will use a weather API that will provide information in Json format. But how can I realize it?
For example, the api will provide a link
http://m.weather.com.cn/data/101110101.html
(101110101 is the city-code, it can be replaced by different code to gather different weather info)
If you go to the link above, it will provide the weather information of the corresponding city in json format.
How can I gather information and put into the corresponding field? And because the weather api provides different code for different cities, how can I realize the function that I can put a city name in a field then click a button, and the app will gather the weather information?
Here are some city codes you could try, although they are in Chinese :D. The name of city could be in different languages, I just need it to be able to translate the name to its corresponding code.
101010100=北京 101010200=海淀 101010300=朝阳 101010400=顺义 101010500=怀柔 101010600=通州 101010700=昌平 101010800=延庆 101010900=丰台 101011000=石景山 101011100=大兴 101011200=房山 101011300=密云 101011400=门头沟 101011500=平谷 101011600=八达岭 101011700=佛爷顶 101011800=汤河口 101011900=密云上甸子 101012000=斋堂 101012100=霞云岭