1、当前天气接口的基本使用方法。
附上链接,点击下方链接查看
GET
https://dev.qweather.com/docs/api/weather/weather-now/
里边的参数都有解读,还有某些参数(城市id、key值等)的获取方法。
返回json格式的数据,如下图:
// 北京实况天气
// 商业版 https://api.qweather.com/v7/weather/now?location=101010100&key=你的KEY
// 开发版 https://devapi.qweather.com/v7/weather/now?location=101010100&key=你的KEY
{
"code": "200",
"updateTime": "2020-06-30T22:00+08:00",
"fxLink": "http://hfx.link/2ax1",
"now": {
"obsTime": "2020-06-30T21:40+08:00",
"temp": "24",
"feelsLike": "26",
"icon": "101",
"text": "多云",
"wind360": "123",
"windDir": "东南风",
"windScale": "1",
"windSpeed": "3",
"humidity": "72",
"precip": "0.0",
"pressure": "1003",
"vis": "16",
"cloud": "10",
"dew": "21"
},
"refer": {
"sources": [
"QWeather",
"NMC",
"ECMWF"
],
"license": [
"commercial license"
]
}
}
2、其他接口(和风天气API为用户提供一个简洁的RESTful API接口,用以访问基于位置的天气数据,包括实况天气、30天预报、逐小时预报、空气质量AQI,灾害预警、分钟级降水、生活指数等天气数据服务。)
附上链接,点击下方链接查看,使用方法大同小异
https://dev.qweather.com/docs/api/
3、天气插件(可直接嵌入网页,大小可调)
https://dev.qweather.com/docs/widget/
和风天气提供了自定义的天气插件,网页标准插件
、网页简约插件
、天气H5插件/天气频道页
、iOS天气插件
、Android天气插件
等等。
4、和风天气字体图标的使用
https://icons.qweather.com/install/
网站里写的很清楚,自行查看即可