文档
测试

获取用户(设备)保存的城市信息列表

POST
userCity/v2/getCityInfo

接口描述

获取城市信息列表

请求头

参数名
类型
描述
必填
ACCESSTOKEN
String
用户(设备)唯一token
必填

响应参数

参数名
类型
描述
必填
code
int
返回结果码 1000-成功 非1000-未成功
必填
data
object
返回结果对象
必填
attentionCities
array
特别关注城市列表
必填
cities
array
保存城市列表
必填
cityId
string
城市id
必填
cityZh
string
城市名称
必填
countryZh
string
城市国家
必填
id
int
id序号 (暂时用不到)
必填
lat
string
纬度
必填
leaderZh
string
上级城市
必填
lng
string
经度
必填
provinceZh
string
省份名称
必填
temMax
string
最高气温
必填
temMin
string
最低气温
必填
type
int
类型
必填
wea
string
天气
必填
weaImg
string
天气图标
必填
cityIds
array
city_id列表
必填
positionCities
array
定位城市列表
必填
cityId
string
城市id
必填
cityZh
string
城市名称
必填
countryZh
string
国家名称
必填
id
int
id序号(暂时未用到)
必填
lat
string
纬度
必填
leaderZh
string
上级城市
必填
lng
string
经度
必填
provinceZh
string
省份
必填
temMax
string
最高气温
必填
temMin
string
最低气温
必填
type
int
类型
必填
wea
string
天气
必填
weaImg
string
天气图标
必填
message
string
返回结果信息
必填
size
int
返回结果对象长度
必填

说明 / 示例

{ "code": 1000, "data": { "attentionCities": [], "cities": [ { "cityId": "101020100", "cityZh": "上海", "countryZh": "中国", "id": 5412, "lat": "31.231706", "leaderZh": "上海", "lng": "121.472644", "provinceZh": "上海", "temMax": "24", "temMin": "17", "type": 2, "wea": "晴", "weaImg": "clear" } ], "cityIds": [ "101020100" ], "positionCities": [ { "cityId": "101021700", "cityZh": "杨浦", "countryZh": "中国", "id": 5413, "lat": "31.270755", "leaderZh": "杨浦", "lng": "121.522797", "provinceZh": "上海", "temMax": "24", "temMin": "17", "type": 1, "wea": "晴", "weaImg": "clear" } ] }, "message": "", "size": 1 }