AutoNavi——Weather API Usage
Background
I need information of weather forecast ,so I choose AutoNavi API as it is widely used in China
Website
https://lbs.amap.com
Apply for Key
Document Download
https://lbs.amap.com/api/webservice/download
#部分数据<adcode>
厦门市 350200 0592
厦门市市辖区 350201 0592
思明区 350203 0592
海沧区 350205 0592
湖里区 350206 0592
集美区 350211 0592
同安区 350212 0592
翔安区 350213 0592
API format
#返回预报天气
https://restapi.amap.com/v3/weather/weatherInfo?city=<adcode>&key=<用户key>&extensions=all
#返回实况天气
https://restapi.amap.com/v3/weather/weatherInfo?city=<adcode>&key=<用户key>&extensions=base
Json Entities Class
@Data
public class WeatherDTO {
private String status;
private String count;
private String info;
private String infocode;
private ArrayList<Forecast> forecasts;
}
@Data
public class Forecast {
private