整理した
This commit is contained in:
parent
8a279a4656
commit
cf33e483f7
552 changed files with 360 additions and 1311 deletions
53
src/client/docs/api/endpoints/posts/create.yaml
Normal file
53
src/client/docs/api/endpoints/posts/create.yaml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
endpoint: "posts/create"
|
||||
|
||||
desc:
|
||||
ja: "投稿します。"
|
||||
en: "Compose new post."
|
||||
|
||||
params:
|
||||
- name: "text"
|
||||
type: "string"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投稿の本文"
|
||||
en: "The text of your post"
|
||||
- name: "mediaIds"
|
||||
type: "id(DriveFile)[]"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "添付するメディア(1~4つ)"
|
||||
en: "Media you want to attach (1~4)"
|
||||
- name: "replyId"
|
||||
type: "id(Post)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "返信する投稿"
|
||||
en: "The post you want to reply"
|
||||
- name: "repostId"
|
||||
type: "id(Post)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "引用する投稿"
|
||||
en: "The post you want to quote"
|
||||
- name: "poll"
|
||||
type: "object"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "投票"
|
||||
en: "The poll"
|
||||
defName: "poll"
|
||||
def:
|
||||
- name: "choices"
|
||||
type: "string[]"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "投票の選択肢"
|
||||
en: "Choices of a poll"
|
||||
|
||||
res:
|
||||
- name: "createdPost"
|
||||
type: "entity(Post)"
|
||||
optional: false
|
||||
desc:
|
||||
ja: "作成した投稿"
|
||||
en: "A post that created"
|
||||
32
src/client/docs/api/endpoints/posts/timeline.yaml
Normal file
32
src/client/docs/api/endpoints/posts/timeline.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
endpoint: "posts/timeline"
|
||||
|
||||
desc:
|
||||
ja: "タイムラインを取得します。"
|
||||
en: "Get your timeline."
|
||||
|
||||
params:
|
||||
- name: "limit"
|
||||
type: "number"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "取得する最大の数"
|
||||
- name: "sinceId"
|
||||
type: "id(Post)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "指定すると、この投稿を基点としてより新しい投稿を取得します"
|
||||
- name: "untilId"
|
||||
type: "id(Post)"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "指定すると、この投稿を基点としてより古い投稿を取得します"
|
||||
- name: "sinceDate"
|
||||
type: "number"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "指定した時間を基点としてより新しい投稿を取得します。数値は、1970 年 1 月 1 日 00:00:00 UTC から指定した日時までの経過時間をミリ秒単位で表します。"
|
||||
- name: "untilDate"
|
||||
type: "number"
|
||||
optional: true
|
||||
desc:
|
||||
ja: "指定した時間を基点としてより古い投稿を取得します。数値は、1970 年 1 月 1 日 00:00:00 UTC から指定した日時までの経過時間をミリ秒単位で表します。"
|
||||
21
src/client/docs/api/endpoints/style.styl
Normal file
21
src/client/docs/api/endpoints/style.styl
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
@import "../style"
|
||||
|
||||
#url
|
||||
padding 8px 12px 8px 8px
|
||||
font-family Consolas, 'Courier New', Courier, Monaco, monospace
|
||||
color #fff
|
||||
background #222e40
|
||||
border-radius 4px
|
||||
|
||||
> .method
|
||||
display inline-block
|
||||
margin 0 8px 0 0
|
||||
padding 0 6px
|
||||
color #f4fcff
|
||||
background #17afc7
|
||||
border-radius 4px
|
||||
user-select none
|
||||
pointer-events none
|
||||
|
||||
> .host
|
||||
opacity 0.7
|
||||
32
src/client/docs/api/endpoints/view.pug
Normal file
32
src/client/docs/api/endpoints/view.pug
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
extends ../../layout.pug
|
||||
include ../mixins
|
||||
|
||||
block meta
|
||||
link(rel="stylesheet" href="/assets/api/endpoints/style.css")
|
||||
|
||||
block main
|
||||
h1= endpoint
|
||||
|
||||
p#url
|
||||
span.method POST
|
||||
span.host
|
||||
= url.host
|
||||
| /
|
||||
span.path= url.path
|
||||
|
||||
p#desc= desc[lang] || desc['ja']
|
||||
|
||||
section
|
||||
h2 %i18n:docs.api.endpoints.params%
|
||||
+propTable(params)
|
||||
|
||||
if paramDefs
|
||||
each paramDef in paramDefs
|
||||
section(id= paramDef.name)
|
||||
h3= paramDef.name
|
||||
+propTable(paramDef.params)
|
||||
|
||||
if res
|
||||
section
|
||||
h2 %i18n:docs.api.endpoints.res%
|
||||
+propTable(res)
|
||||
Loading…
Add table
Add a link
Reference in a new issue