summaryrefslogtreecommitdiff
path: root/src/web/docs/api/endpoints/posts/create.yaml
blob: b6613038a737f92c6d9bbde893d762b1faed656b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
endpoint: "posts/create"

desc:
  ja: "投稿します。"
  en: "Compose new post."

params:
  - name: "text"
    type: "string"
    optional: false
    desc:
      ja: "投稿の本文"
      en: "Text of a post"
  - name: "media_ids"
    type: "id(DriveFile)[]"
    optional: true
    desc:
      ja: "添付するメディア"
      en: "Media you want to attach"
  - name: "reply_id"
    type: "id(Post)"
    optional: true
    desc:
      ja: "返信する投稿"
      en: "A post you want to reply"
  - name: "repost_id"
    type: "id(Post)"
    optional: true
    desc:
      ja: "引用する投稿"
      en: "A post you want to quote"
  - name: "poll"
    type: "object(poll)"
    optional: true
    desc:
      ja: "投票"
      en: "A poll"

paramDefs:
  poll:
    - name: "choices"
      type: "string[]"
      optional: false
      desc:
        ja: "投票の選択肢"
        en: "Choices of a poll"

res:
  - name: "created_post"
    type: "entity(Post)"
    optional: false
    desc:
      ja: "作成した投稿"
      en: "A post that created"