Update
This commit is contained in:
50
qweather.yml
50
qweather.yml
@@ -13,6 +13,56 @@ components:
|
|||||||
security:
|
security:
|
||||||
- apiKey: []
|
- apiKey: []
|
||||||
paths:
|
paths:
|
||||||
|
/v7/weather/{time}:
|
||||||
|
get:
|
||||||
|
operationId: getWeatherForecast
|
||||||
|
summary: 获取天气预报
|
||||||
|
parameters:
|
||||||
|
- name: time
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: 天气预报时长
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum: [3d, 7d]
|
||||||
|
- name: location
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
description: >
|
||||||
|
需要查询地区的LocationID或以英文逗号分隔的经度, 纬度坐标(十进制,最多支持小数点后两位)。
|
||||||
|
LocationID可通过GeoAPI获取(即城市搜索)。
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
examples:
|
||||||
|
- 北京
|
||||||
|
- 116.41,39.92
|
||||||
|
- name: lang
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
description: >
|
||||||
|
多语言设置,请阅读多语言文档,了解我们的多语言是如何工作、如何设置以及数据是否支持多语言。
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: zh
|
||||||
|
enum: ['zh', 'zh-hans', 'zh-hant']
|
||||||
|
- name: unit
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
description: >
|
||||||
|
数据单位设置,可选值包括unit=m(公制单位,默认)和unit=i(英制单位)。
|
||||||
|
更多选项和说明参考度量衡单位。
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- m
|
||||||
|
- i
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: 返回天气预报数据
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
/v7/weather/now:
|
/v7/weather/now:
|
||||||
get:
|
get:
|
||||||
operationId: getWeatherNow
|
operationId: getWeatherNow
|
||||||
|
|||||||
Reference in New Issue
Block a user