Files
Class-Widgets/config/data/weather_api.json
2025-06-11 15:48:20 +08:00

62 lines
2.1 KiB
JSON
Executable File

{
"weather_api": {
"xiaomi_weather": "https://weatherapi.market.xiaomi.com/wtr-v3/weather/all?latitude=0&longitude=0&locationKey=weathercn:{location_key}&appKey=weather20151024&sign=zUFJoAR2ZVrDy1vF3D07&isGlobal=false&locale=zh_cn&days={days}",
"qweather": "https://devapi.qweather.com/v7/weather/now?location={location_key}&key={key}",
"amap_weather": "https://restapi.amap.com/v3/weather/weatherInfo?key={key}&city={location_key}",
"qq_weather": "https://apis.map.qq.com/ws/weather/v1?key={key}&adcode={location_key}"
},
"weather_api_parameters": {
"xiaomi_weather": {
"temp": "current.temperature.value",
"icon": "current.weather",
"alerts": {
"url": null,
"title": "alerts.0.title",
"type": "alerts.0.level",
"description": "alerts.0.detail",
"types": {
"蓝色": "blue.png",
"黄色": "yellow.png",
"橙色": "orange.png",
"红色": "red.png"
}
},
"database": "xiaomi_weather.db",
"return_desc": false
},
"qweather": {
"temp": "now.temp",
"icon": "now.icon",
"alerts": {
"url": "https://devapi.qweather.com/v7/warning/now?location={location_key}&key={key}",
"title": "warning.title",
"description": "warning.0.text",
"type": "warning.0.severityColor",
"types": {
"Blue": "blue.png",
"Yellow": "yellow.png",
"Orange": "orange.png",
"Red": "red.png"
}
},
"database": "xiaomi_weather.db",
"return_desc": false
},
"amap_weather": {
"temp": "temperature",
"icon": "weather",
"alerts": {},
"database": "amap_weather.db",
"return_desc": true
},
"qq_weather": {
"temp": "temperature",
"icon": "weather",
"alerts": {},
"database": "amap_weather.db",
"return_desc": true
}
},
"weather_api_list": ["xiaomi_weather", "qweather", "amap_weather", "qq_weather"],
"weather_api_list_zhCN": ["小米天气", "和风天气 (需 API Key)", "高德天气 (需 API Key)", "腾讯天气 (需 API Key)"]
}