文档
测试

保存城市信息

POST
/user/v1/saveCity

接口描述

保存城市信息

请求头

参数名
类型
描述
必填
ACCESSTOKEN
string
登录注册时返回的用户ppId
必填

请求参数

参数名
类型
描述
必填
cityList
array
保存的城市id数组
必填
positionList
array
定位城市id列表
必填
attentionList
array
特别关注城市id列表
必填

响应参数

参数名
类型
描述
必填
code
int
返回结果码 1000-成功 非1000-未成功
必填
data
object
返回结果对象 (对象属性同查询返回时的数据)
必填
attentionCities
array
特别关注城市对象列表
必填
cities
array
保存城市对象列表
必填
adCode
string
示例:440100
必填
cityId
string
示例:101280101
必填
cityZh
string
示例:广州
必填
countryZh
string
示例:中国
必填
id
int
示例:1674
必填
lat
string
示例:23.125178
必填
leaderZh
string
示例:广州市
必填
lng
string
示例:113.280637
必填
provinceZh
string
示例:广东省
必填
temMax
string
示例:33
必填
temMin
string
示例:25
必填
type
int
示例:2
必填
wea
string
示例:中雨
必填
weaImg
string
示例:rainy
必填
positionCities
array
定位城市对象列表
必填
adCode
string
示例:310110
必填
cityId
string
示例:101021700
必填
cityZh
string
示例:杨浦
必填
countryZh
string
示例:中国
必填
id
int
示例:1676
必填
lat
string
示例:31.270755
必填
leaderZh
string
示例:上海市
必填
lng
string
示例:121.522797
必填
provinceZh
string
示例:上海市
必填
temMax
string
示例:34
必填
temMin
string
示例:27
必填
type
int
示例:1
必填
wea
string
示例:阴
必填
weaImg
string
示例:brokenclouds
必填
cityIds
array
城市id列表
必填
marsFlag
boolean
是否包含火星城市
必填
marsWeather
object
当前最新火星城市天气对象
必填
adCode
string
示例:M0001
必填
cityId
string
示例:M0001
必填
cityZh
string
示例:盖尔环形山(火星)
必填
countryZh
string
示例:火星
必填
date
string
示例:2021-07-20
必填
leaderZh
string
示例:火星
必填
pressure
string
示例:859
必填
provinceZh
string
示例:火星
必填
solar
int
示例:3183
必填
sunRise
string
示例:05:59
必填
sunSet
string
示例:17:42
必填
temMax
string
示例:-79
必填
temMin
string
最低气温
必填
temAvg
string
火星表面平均气温
必填
earthDay
string
地球每天时长
必填
marsDay
string
火星每天时长
必填
marsWeekWeather
array
本周火星城市天气对象列表
必填
adCode
string
示例:M0001
必填
cityId
string
示例:M0001
必填
cityZh
string
示例:盖尔环形山(火星)
必填
countryZh
string
示例:火星
必填
date
string
示例:2021-07-20
必填
leaderZh
string
示例:火星
必填
pressure
string
示例:859
必填
provinceZh
string
示例:火星
必填
solar
int
示例:3183
必填
sunRise
string
示例:05:59
必填
sunSet
string
示例:17:42
必填
temMax
string
示例:-79
必填
temMin
string
最低气温
必填
temAvg
string
火星表面平均气温
必填
earthDay
string
地球每天时长
必填
marsDay
string
火星每天时长
必填
message
string
返回结果信息
必填

说明 / 示例

{ "code": 1000, "data": { "attentionCities": [], "cities": [ { "adCode": "440100", "cityId": "101280101", "cityZh": "广州", "countryZh": "中国", "id": 1674, "lat": "23.125178", "leaderZh": "广州市", "lng": "113.280637", "provinceZh": "广东省", "temMax": "33", "temMin": "25", "type": 2, "wea": "中雨", "weaImg": "rainy" }, { "adCode": "440100", "cityId": "101280101", "cityZh": "广州", "countryZh": "中国", "id": 1675, "lat": "23.125178", "leaderZh": "广州市", "lng": "113.280637", "provinceZh": "广东省", "temMax": "33", "temMin": "25", "type": 2, "wea": "中雨", "weaImg": "rainy" }, { "adCode": "532901", "cityId": "101290230", "cityZh": "大理市", "countryZh": "中国", "id": 2409, "lat": "25.589449", "leaderZh": "大理白族自治州", "lng": "100.225668", "provinceZh": "云南省", "temMax": "24", "temMin": "16", "type": 2, "wea": "中雨", "weaImg": "rainy" }, { "adCode": "540100", "cityId": "101140101", "cityZh": "拉萨", "countryZh": "中国", "id": 2410, "lat": "29.660361", "leaderZh": "拉萨市", "lng": "91.132212", "provinceZh": "西藏自治区", "temMax": "22", "temMin": "10", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" }, { "adCode": "110100", "cityId": "101010100", "cityZh": "北京", "countryZh": "中国", "id": 2411, "lat": "39.904989", "leaderZh": "北京市", "lng": "116.405285", "provinceZh": "北京市", "temMax": "28", "temMin": "22", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" }, { "adCode": "411681", "cityId": "101181407", "cityZh": "项城", "countryZh": "中国", "id": 2412, "lat": "33.443085", "leaderZh": "周口市", "lng": "114.899521", "provinceZh": "河南省", "temMax": "32", "temMin": "25", "type": 2, "wea": "多云", "weaImg": "fewclouds_day" } ], "cityIds": [ "101280101", "101280101", "101290230", "101140101", "101010100", "101181407", "M0001" ], "marsFlag": true, "marsWeather": { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-20", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3183, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-79" }, "marsWeekWeather": [ { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-20", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3183, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-79" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-19", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3182, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-80" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-18", "leaderZh": "火星", "pressure": "859", "provinceZh": "火星", "solar": 3181, "sunRise": "05:59", "sunSet": "17:42", "temMax": "-80" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-17", "leaderZh": "火星", "pressure": "860", "provinceZh": "火星", "solar": 3180, "sunRise": "06:00", "sunSet": "17:43", "temMax": "-78" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-16", "leaderZh": "火星", "pressure": "860", "provinceZh": "火星", "solar": 3179, "sunRise": "06:00", "sunSet": "17:43", "temMax": "-79" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-15", "leaderZh": "火星", "pressure": "862", "provinceZh": "火星", "solar": 3178, "sunRise": "06:00", "sunSet": "17:43", "temMax": "-80" }, { "adCode": "M0001", "cityId": "M0001", "cityZh": "盖尔环形山(火星)", "countryZh": "火星", "date": "2021-07-14", "leaderZh": "火星", "pressure": "861", "provinceZh": "火星", "solar": 3177, "sunRise": "06:00", "sunSet": "17:44", "temMax": "-79" } ], "positionCities": [ { "adCode": "310110", "cityId": "101021700", "cityZh": "杨浦", "countryZh": "中国", "id": 1676, "lat": "31.270755", "leaderZh": "上海市", "lng": "121.522797", "provinceZh": "上海市", "temMax": "34", "temMin": "27", "type": 1, "wea": "阴", "weaImg": "brokenclouds" } ] }, "message": "" }