天气网的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/ 天气数据类型很全,就是要收费