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