Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

社区创建官方号内容文档 #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions swagger-docs/en/social/topic/create.yml
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions swagger-docs/zh-CN/social/topic/create.yml
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions swagger-docs/zh-HK/social/topic/create.yml
Original file line number Diff line number Diff line change
@@ -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