文档
测试

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

POST
userCity/v1/getCityInfo

接口描述

获取城市信息列表

请求头

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

响应参数

参数名
类型
描述
必填
code
int
返回结果码 1000-成功 非1000-失败
必填
message
String
返回结果信息
必填
size
int
返回结果对象长度
必填
data
Object
返回结果对象
必填
token
String
用户(设备)唯一token
必填
cities
List<Object>
城市信息详情列表
必填
cityId
String
城市id
必填
cityZh
String
城市名称(作为主要展示)
必填
provinceZh
String
所属省份
必填
leaderZh
String
上级城市
必填
countryZh
String
所属国家
必填
weaImg
String
天气图标
必填
wea
String
天气描述
必填
tem
String
当前温度
必填
temMax
String
当天最高气温
必填
temMin
String
当天最低气温
必填
lng
String
城市经度
必填
lat
String
城市纬度
必填
type
int
类型 1-定位城市 2-添加的城市 3-特别关注的城市(此字段暂时用不到)
必填
cityIds
List<String>
城市id列表
必填
positionCities
List<Object>
定位的城市详情列表
必填
cityId
String
城市id
必填
cityZh
String
城市名称
必填
countryZh
String
国家
必填
lat
String
纬度
必填
leaderZh
String
上级城市
必填
lng
String
经度
必填
provinceZh
String
所属省
必填
tem
String
当前气温
必填
temMax
String
最高气温
必填
temMin
String
最低气温
必填
type
int
类型 1-定位城市 2-添加的城市 3-特别关注的城市(此字段暂时用不到)
必填
wea
String
天气
必填
weaImg
String
天气图标
必填
attentionCities
List<Object>
关注的城市详情列表
必填
cityId
String
城市id
必填
cityZh
String
城市名称
必填
countryZh
String
国家名称
必填
lat
String
纬度
必填
leaderZh
String
上级城市
必填
lng
String
经度
必填
provinceZh
String
所属省
必填
tem
String
当前温度
必填
temMax
String
最高气温
必填
temMin
String
最低气温
必填
type
int
类型 1-定位城市 2-添加的城市 3-特别关注的城市(此字段暂时用不到)
必填
wea
String
天气
必填
weaImg
String
天气图标
必填

说明 / 示例

{ "code": 1000, "data": { "attentionCities": [], "cities": [ { "cityId": "101011000", "cityZh": "石景山", "countryZh": "中国", "id": 365, "lat": "39.914601", "leaderZh": "北京", "lng": "116.195445", "provinceZh": "北京", "tem": "29", "temMax": "29", "temMin": "17", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" }, { "cityId": "101020600", "cityZh": "浦东新区", "countryZh": "中国", "id": 366, "lat": "31.245944", "leaderZh": "上海", "lng": "121.567706", "provinceZh": "上海", "tem": "31", "temMax": "32", "temMin": "22", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" }, { "cityId": "101021700", "cityZh": "杨浦", "countryZh": "中国", "id": 367, "lat": "31.270755", "leaderZh": "杨浦", "lng": "121.522797", "provinceZh": "上海", "tem": "31", "temMax": "32", "temMin": "24", "type": 2, "wea": "晴", "weaImg": "clear" }, { "cityId": "101021300", "cityZh": "长宁", "countryZh": "中国", "id": 368, "lat": "31.218123", "leaderZh": "长宁", "lng": "121.4222", "provinceZh": "上海", "tem": "31", "temMax": "32", "temMin": "24", "type": 2, "wea": "晴", "weaImg": "clear" }, { "cityId": "101040100", "cityZh": "重庆", "countryZh": "中国", "id": 369, "lat": "29.291965", "leaderZh": "重庆", "lng": "108.170255", "provinceZh": "重庆", "tem": "22", "temMax": "29", "temMin": "22", "type": 2, "wea": "阴", "weaImg": "brokenclouds" }, { "cityId": "101040100", "cityZh": "重庆", "countryZh": "中国", "id": 371, "lat": "29.291965", "leaderZh": "重庆", "lng": "108.170255", "provinceZh": "重庆", "type": 3 } ], "cityIds": [ "101011000", "101020600", "101021700", "101021300", "101040100" ], "positionCities": [ { "cityId": "101020100", "cityZh": "上海", "countryZh": "中国", "id": 370, "lat": "31.231706", "leaderZh": "上海", "lng": "121.472644", "provinceZh": "上海", "tem": "31", "temMax": "32", "temMin": "24", "type": 1, "wea": "多云", "weaImg": "fewclouds_day" } ], "token": "d332a0f8e155407791012a3be287f7cd" }, "message": "", "size": 1 }