GET /weather/weatherinfo/region| 参数 | 位置 | 类型 | 必填 | 真实默认值 | 说明 |
|---|---|---|---|---|---|
| appkey | query | string | 否 | 无 | 付费后获取的 APPKEY |
| keyword | query | string | 是 | 无 | 现有地区名称查询表达,返回原地区数组。 |
application/json{
"type": "object",
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量"
}
}
},
"Data": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"properties": {
"Code": {
"type": [
"string",
"null"
],
"description": "地区编码"
},
"ReginType": {
"type": "integer"
},
"ProvinceCode": {
"type": [
"string",
"null"
]
},
"ProvinceName": {
"type": [
"string",
"null"
]
},
"CityCode": {
"type": [
"string",
"null"
]
},
"CityName": {
"type": [
"string",
"null"
]
},
"DistrictCode": {
"type": [
"string",
"null"
]
},
"DistrictName": {
"type": [
"string",
"null"
]
},
"TownCode": {
"type": [
"string",
"null"
]
},
"TownName": {
"type": [
"string",
"null"
]
}
},
"required": [
"Code",
"ReginType",
"ProvinceCode",
"ProvinceName",
"CityCode",
"CityName",
"DistrictCode",
"DistrictName",
"TownCode",
"TownName"
],
"description": "旧天气入口为天气对象数组;Forecast 和地区操作请使用对应的独立响应结构。"
},
"description": "旧天气入口为天气对象数组;Forecast 和地区操作请使用对应的独立响应结构。"
}
},
"required": [
"DataStatus",
"Data"
]
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"type": "object",
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量"
}
}
},
"Data": {
"type": "null",
"description": "旧天气入口为天气对象数组;Forecast 和地区操作请使用对应的独立响应结构。"
}
}
}application/json{
"type": "object",
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量"
}
}
},
"Data": {
"type": "null",
"description": "旧天气入口为天气对象数组;Forecast 和地区操作请使用对应的独立响应结构。"
}
}
}| 业务码 | 含义 | 说明 |
|---|---|---|
| 100 | 成功 | HTTP 200;仍应检查业务状态。 |
| 501 | 参数错误 | HTTP 400 |
| 900 | 依赖失败 | HTTP 500 |