一、接口URL
http://wthrcdn.etouch.cn/weather_mini
二、请求参数
参数名称类型是否必须说明provincestring1对应哪个省citystring1对应哪个城市
三、使用Postman发起Get请求
以下为请求得到的数据: {“data”:{“yesterday”:{“date”:“28日星期一”,“high”:“高温 28℃”,“fx”:“无持续风向”,“low”:“低温 21℃”,“fl”:"",“type”:“多云”},“city”:“深圳”,“forecast”:[{“date”:“29日星期二”,“high”:“高温 27℃”,“fengli”:"",“low”:“低温 20℃”,“fengxiang”:“无持续风向”,“type”:“晴”},{“date”:“30日星期三”,“high”:“高温 27℃”,“fengli”:"",“low”:“低温 20℃”,“fengxiang”:“东北风”,“type”:“多云”},{“date”:“31日星期四”,“high”:“高温 27℃”,“fengli”:"",“low”:“低温 21℃”,“fengxiang”:“东北风”,“type”:“晴”},{“date”:“1日星期五”,“high”:“高温 28℃”,“fengli”:"",“low”:“低温 22℃”,“fengxiang”:“东北风”,“type”:“晴”},{“date”:“2日星期六”,“high”:“高温 28℃”,“fengli”:"",“low”:“低温 22℃”,“fengxiang”:“无持续风向”,“type”:“晴”}],“ganmao”:“各项气象条件适宜,无明显降温过程,发生感冒机率较低。”,“wendu”:“23”},“status”:1000,“desc”:“OK”}
所以,在后续写程序的过程中,我们应当以Json的格式来解析这部分数据,得到我们想要的接口
|