From 7de515a3c784fa671d46d696f21783a792dc6664 Mon Sep 17 00:00:00 2001 From: wangbiao Date: Mon, 25 Sep 2023 16:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E5=88=9B=E5=BB=BA=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E5=8F=B7=E5=86=85=E5=AE=B9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- swagger-docs/en/social/topic/create.yml | 45 ++++++++++++++++++++++ swagger-docs/zh-CN/social/topic/create.yml | 45 ++++++++++++++++++++++ swagger-docs/zh-HK/social/topic/create.yml | 45 ++++++++++++++++++++++ 3 files changed, 135 insertions(+) create mode 100644 swagger-docs/en/social/topic/create.yml create mode 100644 swagger-docs/zh-CN/social/topic/create.yml create mode 100644 swagger-docs/zh-HK/social/topic/create.yml diff --git a/swagger-docs/en/social/topic/create.yml b/swagger-docs/en/social/topic/create.yml new file mode 100644 index 0000000..66df082 --- /dev/null +++ b/swagger-docs/en/social/topic/create.yml @@ -0,0 +1,45 @@ +swagger: "2.0" +info: + description: "This API is used to create social official content" + version: "v1" + title: "Create Social Official Content" +paths: + /v1/whaleapi/social/media-topics: + post: + parameters: + - name: "title" + type: "string" + description: "Content title, Required when creating article" + - name: "body" + type: "string" + description: "Content" + required: true + - name: "images" + type: string[] + description: "Post pictures" + responses: + "200": + description: "Create success" + schema: + $ref: "#/definitions/create_media_topic_response" + "400": + description: "The query failed with an error in the request parameter." + request_body: + type: "python" + value: | + curl -v -XPOST https://openapi.longportapp.com/v1/whaleapi/social/media-topics \ + -d '{ "body": "美股今天为什么涨了", "title": "" \ + -H "X-Api-Signature: {签名}" -H "X-Api-Key: {AppKey}" \ + -H "Authorization: {AccessToken}" -H "X-Timestamp: 1539095200.123" + -H "Content-Type: application/json; charset=utf-8" + response_body: { "code": 0, "message": "", "data": { "id": "1" } } +definitions: + create_media_topic_response: + type: "object" + required: + - id + properties: + id: + type: "integer" + description: "Content ID" + required: true diff --git a/swagger-docs/zh-CN/social/topic/create.yml b/swagger-docs/zh-CN/social/topic/create.yml new file mode 100644 index 0000000..7b424c8 --- /dev/null +++ b/swagger-docs/zh-CN/social/topic/create.yml @@ -0,0 +1,45 @@ +swagger: "2.0" +info: + description: "该接口用于创建官方号内容" + version: "v1" + title: "创建官方号内容" +paths: + /v1/whaleapi/social/media-topics: + post: + parameters: + - name: "title" + type: "string" + description: "内容标题,创建长文内容时需要" + - name: "body" + type: "string" + description: "内容" + required: true + - name: "images" + type: string[] + description: "图片链接,创建短文内容附件图片" + responses: + "200": + description: "创建成功" + schema: + $ref: "#/definitions/create_media_topic_response" + "400": + description: "创建失败,请求参数错误" + request_body: + type: "python" + value: | + curl -v -XPOST https://openapi.longportapp.com/v1/whaleapi/social/media-topics \ + -d '{ "body": "美股今天为什么涨了", "title": "" \ + -H "X-Api-Signature: {签名}" -H "X-Api-Key: {AppKey}" \ + -H "Authorization: {AccessToken}" -H "X-Timestamp: 1539095200.123" + -H "Content-Type: application/json; charset=utf-8" + response_body: { "code": 0, "message": "", "data": { "id": "1" } } +definitions: + create_media_topic_response: + type: "object" + required: + - id + properties: + id: + type: "integer" + description: "内容 ID" + required: true diff --git a/swagger-docs/zh-HK/social/topic/create.yml b/swagger-docs/zh-HK/social/topic/create.yml new file mode 100644 index 0000000..093414d --- /dev/null +++ b/swagger-docs/zh-HK/social/topic/create.yml @@ -0,0 +1,45 @@ +swagger: "2.0" +info: + description: "此接口用於創建官方號內容" + version: "v1" + title: "創建官方號內容" +paths: + /v1/whaleapi/social/media-topics: + post: + parameters: + - name: "title" + type: "string" + description: "內容標題,創建長文內容時需要" + - name: "body" + type: "string" + description: "内容" + required: true + - name: "images" + type: string[] + description: "圖片鏈接,創建短文內容附件圖片" + responses: + "200": + description: "創建成功" + schema: + $ref: "#/definitions/create_media_topic_response" + "400": + description: "建立失敗,請求參數錯誤" + request_body: + type: "python" + value: | + curl -v -XPOST https://openapi.longportapp.com/v1/whaleapi/social/media-topics \ + -d '{ "body": "美股今天为什么涨了", "title": "" \ + -H "X-Api-Signature: {签名}" -H "X-Api-Key: {AppKey}" \ + -H "Authorization: {AccessToken}" -H "X-Timestamp: 1539095200.123" + -H "Content-Type: application/json; charset=utf-8" + response_body: { "code": 0, "message": "", "data": { "id": "1" } } +definitions: + create_media_topic_response: + type: "object" + required: + - id + properties: + id: + type: "integer" + description: "內容 ID" + required: true