通过请求获取本机IP获取天气
接口地址: https://api.milorapart.top/api/getweather
返回格式: JSON
请求方式: GET
请求示例: https://api.milorapart.top/api/getweather
请求参数说明:
名称 | 必填 | 类型 | 说明 |
---|
返回参数说明:
名称 | 类型 | 说明 |
---|
返回示例:
{ "code": 200, "message": "获取信息成功", "data": { "ip": "111.31.184.27", "province": "天津市", "city": "天津市", "day_of_week": "星期四", "weather": { "weather": "阴", "temp": -4, "humidity": 61, "winddirection": "东北", "windpower": "≤3", "reporttime": "2025-01-30 16:07:04" }, "api_source": "https://api.milorapart.top/" } }
请求参数设置:
参数名称 | 参数值 |
---|---|
{ "code": 200, "message": "获取信息成功", "data": { "ip": "111.31.184.27", "province": "天津市", "city": "天津市", "day_of_week": "星期四", "weather": { "weather": "阴", "temp": -4, "humidity": 61, "winddirection": "东北", "windpower": "≤3", "reporttime": "2025-01-30 16:07:04" }, "api_source": "https://api.milorapart.top/" } }
错误码格式说明:
名称 | 类型 | 说明 |
---|
代码示例:
请加q群881391061请教群友