Skip to content

getLivesWeatherByAdcode

获取高德实时天气

使用说明

请求头必须带token信息。

请求方式

GET

请求参数

json
{
  "adcode": "59255"
}

CityCodeReq

名称位置类型必选中文名说明
tokenauthorizationheaderstringnone
bodybodyobjectnone
» adcodebody高德城市编码none

返回数据

Resp

名称类型必选约束中文名说明
» codestringtruenone返回编码0是成功none
» msgstringtruenone返回消息none
» data集合truenonenone
»» provincestringtruenonenone
»» citystringtruenonenone
»» districtstringtruenonenone
»» adcodestringtruenone城市编码none
»» weatherstringtruenone天气none
»» dictCodestringtruenone天气编码none
»» temperaturestringtruenone温度none
»» winddirectionstringtruenone风向none
»» windpowerstringtruenone风力none
»» humiditystringtruenone湿度none
»» reporttimestringtruenone时间none
»» maxTempstringtruenone最高温none
»» minTempstringtruenone最低温none

示例

请求示例

json
{
  "cityCode": "430100"
}

返回示例

json
{
    "code": "0",
    "msg": "操作成功",
    "data": {
        "province": "湖南",
        "city": "长沙市",
        "district": null,
        "adcode": "430100",
        "weather": "",
        "dictCode": "0",
        "temperature": "13",
        "winddirection": "西",
        "windpower": "4",
        "humidity": "34",
        "reporttime": "2023-12-01 15:35:23",
        "maxTemp": "11",
        "minTemp": "8"
    }
}

高德城市编码

高德城市编码

错误码

错误码错误码取值解决方案
0-100006鉴权参数为空请确保传递入参。
0-101079账号被禁用请联系管理员联系管理员
0-101080账号已失效联系管理员
0-101081当前账号暂未分配权限联系管理员