说明: 获取城市天气预报:
选填参数:
`city` 区县的行政区划编码(http://www.mca.gov.cn/article/sj/xzqh/1980/) 如 `440306`
注:留空会根据请求IP自动获取区县的行政区划编码
接口地址:
/Weather/get_weather
`/Weather/get_weather?city=440306`
调用例子:
//api.isoyu.com/api/Weather/get_weather?city=440306
返回数据(每次返回是10条数据,这里就不全部列出来了)如下图:
{
"status": 0,
"result": {
"location": {
"country": "中国",
"province": "广东省",
"city": "深圳市",
"name": "宝安",
"id": "440306"
},
"now": {
"text": "阴",
"temp": 21,
"feels_like": 21,
"rh": 72,
"wind_class": "3级",
"wind_dir": "东北风",
"uptime": "20220327102500"
},
"forecasts": [
{
"text_day": "阴",
"text_night": "雷阵雨",
"high": 24,
"low": 16,
"wc_day": "<3级",
"wd_day": "静风",
"wc_night": "<3级",
"wd_night": "静风",
"date": "2022-03-27",
"week": "星期日"
},
{
"text_day": "中雨",
"text_night": "雷阵雨",
"high": 21,
"low": 16,
"wc_day": "<3级",
"wd_day": "静风",
"wc_night": "<3级",
"wd_night": "静风",
"date": "2022-03-28",
"week": "星期一"
},
{
"text_day": "中雨",
"text_night": "雷阵雨",
"high": 22,
"low": 18,
"wc_day": "<3级",
"wd_day": "静风",
"wc_night": "<3级",
"wd_night": "静风",
"date": "2022-03-29",
"week": "星期二"
},
{
"text_day": "阵雨",
"text_night": "多云",
"high": 26,
"low": 20,
"wc_day": "<3级",
"wd_day": "静风",
"wc_night": "<3级",
"wd_night": "静风",
"date": "2022-03-30",
"week": "星期三"
},
{
"text_day": "多云",
"text_night": "多云",
"high": 27,
"low": 20,
"wc_day": "3~4级",
"wd_day": "东风",
"wc_night": "3~4级",
"wd_night": "东风",
"date": "2022-03-31",
"week": "星期四"
}
]
},
"message": "success"
}