使用中文城市名查询天气
GET
city*string中文城市名称,例如北京、上海、广州市。
Length
1 <= lengthdays?integer请求预报天数。服务端会限制在 1 至 15 天,默认 7 天。
Range
1 <= value <= 15Default
7天气查询成功
application/json- response
ok*booleanlocation*days*integerRange
1 <= value <= 15weather*小米天气上游返回的数据。字段可能随地区和上游版本变化。
curl -X GET 'https://weather.api.236668.xyz/v1/weather/北京?days=7'Example Response
{ "ok": true, "location": { "affiliation": "string", "key": "string", "locationKey": "string", "name": "string", "latitude": "string", "longitude": "string", "status": 0, "timeZoneShift": 0 }, "days": 1, "weather": { "current": {}, "forecastDaily": {}, "forecastHourly": {}, "aqi": {}, "alerts": [ {} ], "minutely": {}, "updateTime": 0 }}