天气网的api返回不了城市列表www.weather.com.cn/data/list3/city.xml。在学习安卓第一行代码,开发酷欧天气用到的,有没有类似的api吗?
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
這個可以有,我給說一個:http://apistore.baidu.com/
https://www.juhe.cn/docs/api/id/39這是聚合資料上的,現在這樣的API平台很多啊,應該都有,我就放這一個例子了,其他的可以自己找,例如好服務,APIstore等等全國天氣預報API:1.根據城市名/id查詢天氣2.天氣種類及標識列表3.根據IP查詢天氣4.依GPS座標查詢天氣5.城市天氣三小時預報
6.支援城市清單JSON回傳範例:
{ "resultcode":"200", "reason":"successed", "result":[ { "id":"1", /*城市ID*/ "province":"北京",/*省份名称*/ "city":"北京", /*城市*/ "district":"北京" /*城市/区名称*/ }, { "id":"2", "province":"北京", "city":"北京", "district":"海淀" }, { "id":"3", "province":"北京", "city":"北京", "district":"朝阳" }, { "id":"4", "province":"北京", "city":"北京", "district":"顺义" }, { "id":"5", "province":"北京", "city":"北京", "district":"怀柔" }, { "id":"6", "province":"北京", "city":"北京", "district":"通州" }, { "id":"7", "province":"北京", "city":"北京", "district":"昌平" }, { "id":"8", "province":"北京", "city":"北京", "district":"延庆" }, { "id":"9", "province":"北京", "city":"北京", "district":"丰台" }, { "id":"10", "province":"北京", "city":"北京", "district":"石景山" }, { "id":"11", "province":"北京", "city":"北京", "district":"大兴" }, { "id":"12", "province":"北京", "city":"北京", "district":"房山" }, { "id":"13", "province":"北京", "city":"北京", "district":"密云" }, { "id":"14", "province":"北京", "city":"北京", "district":"门头沟" }, { "id":"15", "province":"北京", "city":"北京", "district":"平谷" }, { "id":"16", "province":"上海", "city":"上海", "district":"上海" }, { "id":"17", "province":"上海", "city":"上海", "district":"闵行" }, { "id":"18", "province":"上海", "city":"上海", "district":"宝山" }, { "id":"19", "province":"上海", "city":"上海", "district":"嘉定" }, { "id":"20", "province":"上海", "city":"上海", "district":"南汇" }, { "id":"21", "province":"上海", "city":"上海", "district":"金山" }, { "id":"22", "province":"上海", "city":"上海", "district":"青浦" }, { "id":"23", "province":"上海", "city":"上海", "district":"松江" }, { "id":"24", "province":"上海", "city":"上海", "district":"奉贤" }, { "id":"25", "province":"上海", "city":"上海", "district":"崇明" }, { "id":"26", "province":"上海", "city":"上海", "district":"徐家汇" }, { "id":"27", "province":"上海", "city":"上海", "district":"浦东" } ], "error_code":0 }
一大堆接口,http://www.ttsju.com/tag/%E5%...
找到一個按資料型別分的API:http://www.thinkpage.cn/ 天氣資料型態很全,就是要收費
這個可以有,我給說一個:
http://apistore.baidu.com/
https://www.juhe.cn/docs/api/id/39
這是聚合資料上的,現在這樣的API平台很多啊,應該都有,我就放這一個例子了,其他的可以自己找,例如好服務,APIstore等等
全國天氣預報API:
1.根據城市名/id查詢天氣
2.天氣種類及標識列表
3.根據IP查詢天氣
4.依GPS座標查詢天氣
5.城市天氣三小時預報
6.支援城市清單
JSON回傳範例:
一大堆接口,http://www.ttsju.com/tag/%E5%...
找到一個按資料型別分的API:http://www.thinkpage.cn/ 天氣資料型態很全,就是要收費