获取当前地区的天气情况
接口地址: https://www.api66.cn/api/weather.php
返回格式: JSON
请求方式: GET
请求示例: https://www.api66.cn/api/weather.php
请求参数说明:
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
null | null | null | null |
返回参数说明:
名称 | 类型 | 说明 |
---|---|---|
city | String | 城市 |
desc | String | 天气情况 |
realtime | int | 实时温度 |
weather | json | 未来4天天气信息 |
返回示例:
{ "city": "盐城", "date": "2019.08.16", "week": "星期五", "icon": "https://www.api66.cn/api/images/weather/sunny170.png", "realtime": 32, "desc": "晴", "update": "11:40", "weather": [ [ "晴", "无持续风向", "31 / 24", "https://www.api66.cn/api/images/weather/sunny170.png" ], [ "多云", "无持续风向", "30 / 22", "https://www.api66.cn/api/images/weather/cloudy170.png" ], [ "晴", "无持续风向", "30 / 20", "https://www.api66.cn/api/images/weather/sunny170.png" ], [ "晴", "无持续风向", "30 / 24", "https://www.api66.cn/api/images/weather/sunny170.png" ] ] }
错误码格式说明:
名称 | 类型 | 说明 |
---|---|---|
code | String | 返回的状态码 -1/1 失败/成功 |
msg | String | 返回结果提示信息! |
代码示例:
暂无示例,有问题或者不懂请联系QQ:5922933 获取调用方法。