From a96cc68641740fc836d9f4f424db7e037680fb12 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Wed, 27 Nov 2024 18:45:45 +0800 Subject: [PATCH] Update --- qweather.yml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/qweather.yml b/qweather.yml index 0c6da88..d9502ca 100644 --- a/qweather.yml +++ b/qweather.yml @@ -13,6 +13,56 @@ components: security: - apiKey: [] 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: get: operationId: getWeatherNow