From a1b490afa756a71b9cef4afa424575bc223bc612 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 8 Apr 2018 02:30:37 +0900 Subject: Post --> Note Closes #1411 --- src/client/docs/api/endpoints/notes/create.yaml | 59 ++++++++ src/client/docs/api/endpoints/notes/timeline.yaml | 32 ++++ src/client/docs/api/endpoints/posts/create.yaml | 59 -------- src/client/docs/api/endpoints/posts/timeline.yaml | 32 ---- src/client/docs/api/entities/note.yaml | 174 ++++++++++++++++++++++ src/client/docs/api/entities/post.yaml | 40 ++--- src/client/docs/api/entities/user.yaml | 16 +- 7 files changed, 293 insertions(+), 119 deletions(-) create mode 100644 src/client/docs/api/endpoints/notes/create.yaml create mode 100644 src/client/docs/api/endpoints/notes/timeline.yaml delete mode 100644 src/client/docs/api/endpoints/posts/create.yaml delete mode 100644 src/client/docs/api/endpoints/posts/timeline.yaml create mode 100644 src/client/docs/api/entities/note.yaml (limited to 'src/client/docs/api') diff --git a/src/client/docs/api/endpoints/notes/create.yaml b/src/client/docs/api/endpoints/notes/create.yaml new file mode 100644 index 0000000000..04ada2ecd5 --- /dev/null +++ b/src/client/docs/api/endpoints/notes/create.yaml @@ -0,0 +1,59 @@ +endpoint: "notes/create" + +desc: + ja: "投稿します。" + en: "Compose new note." + +params: + - name: "text" + type: "string" + optional: true + desc: + ja: "投稿の本文" + en: "The text of your note" + - name: "cw" + type: "string" + optional: true + desc: + ja: "コンテンツの警告。このパラメータを指定すると設定したテキストで投稿のコンテンツを隠す事が出来ます。" + en: "Content Warning" + - name: "mediaIds" + type: "id(DriveFile)[]" + optional: true + desc: + ja: "添付するメディア(1~4つ)" + en: "Media you want to attach (1~4)" + - name: "replyId" + type: "id(Note)" + optional: true + desc: + ja: "返信する投稿" + en: "The note you want to reply" + - name: "renoteId" + type: "id(Note)" + optional: true + desc: + ja: "引用する投稿" + en: "The note 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: "createdNote" + type: "entity(Note)" + optional: false + desc: + ja: "作成した投稿" + en: "A note that created" diff --git a/src/client/docs/api/endpoints/notes/timeline.yaml b/src/client/docs/api/endpoints/notes/timeline.yaml new file mode 100644 index 0000000000..71c346f355 --- /dev/null +++ b/src/client/docs/api/endpoints/notes/timeline.yaml @@ -0,0 +1,32 @@ +endpoint: "notes/timeline" + +desc: + ja: "タイムラインを取得します。" + en: "Get your timeline." + +params: + - name: "limit" + type: "number" + optional: true + desc: + ja: "取得する最大の数" + - name: "sinceId" + type: "id(Note)" + optional: true + desc: + ja: "指定すると、この投稿を基点としてより新しい投稿を取得します" + - name: "untilId" + type: "id(Note)" + 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 から指定した日時までの経過時間をミリ秒単位で表します。" diff --git a/src/client/docs/api/endpoints/posts/create.yaml b/src/client/docs/api/endpoints/posts/create.yaml deleted file mode 100644 index d2d6e27fc7..0000000000 --- a/src/client/docs/api/endpoints/posts/create.yaml +++ /dev/null @@ -1,59 +0,0 @@ -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: "cw" - type: "string" - optional: true - desc: - ja: "コンテンツの警告。このパラメータを指定すると設定したテキストで投稿のコンテンツを隠す事が出来ます。" - en: "Content Warning" - - 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" diff --git a/src/client/docs/api/endpoints/posts/timeline.yaml b/src/client/docs/api/endpoints/posts/timeline.yaml deleted file mode 100644 index 9c44dd736a..0000000000 --- a/src/client/docs/api/endpoints/posts/timeline.yaml +++ /dev/null @@ -1,32 +0,0 @@ -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 から指定した日時までの経過時間をミリ秒単位で表します。" diff --git a/src/client/docs/api/entities/note.yaml b/src/client/docs/api/entities/note.yaml new file mode 100644 index 0000000000..718d331d13 --- /dev/null +++ b/src/client/docs/api/entities/note.yaml @@ -0,0 +1,174 @@ +name: "Note" + +desc: + ja: "投稿。" + en: "A note." + +props: + - name: "id" + type: "id" + optional: false + desc: + ja: "投稿ID" + en: "The ID of this note" + - name: "createdAt" + type: "date" + optional: false + desc: + ja: "投稿日時" + en: "The posted date of this note" + - name: "viaMobile" + type: "boolean" + optional: true + desc: + ja: "モバイル端末から投稿したか否か(自己申告であることに留意)" + en: "Whether this note sent via a mobile device" + - name: "text" + type: "string" + optional: true + desc: + ja: "投稿の本文 (ローカルの場合Markdown風のフォーマット)" + en: "The text of this note (in Markdown like format if local)" + - name: "textHtml" + type: "string" + optional: true + desc: + ja: "投稿の本文 (HTML) (投稿時は無視)" + en: "The text of this note (in HTML. Ignored when posting.)" + - name: "mediaIds" + type: "id(DriveFile)[]" + optional: true + desc: + ja: "添付されているメディアのID (なければレスポンスでは空配列)" + en: "The IDs of the attached media (empty array for response if no media is attached)" + - name: "media" + type: "entity(DriveFile)[]" + optional: true + desc: + ja: "添付されているメディア" + en: "The attached media" + - name: "userId" + type: "id(User)" + optional: false + desc: + ja: "投稿者ID" + en: "The ID of author of this note" + - name: "user" + type: "entity(User)" + optional: true + desc: + ja: "投稿者" + en: "The author of this note" + - name: "myReaction" + type: "string" + optional: true + desc: + ja: "この投稿に対する自分のリアクション" + en: "The your reaction of this note" + - name: "reactionCounts" + type: "object" + optional: false + desc: + ja: "リアクションをキーとし、この投稿に対するそのリアクションの数を値としたオブジェクト" + - name: "replyId" + type: "id(Note)" + optional: true + desc: + ja: "返信した投稿のID" + en: "The ID of the replyed note" + - name: "reply" + type: "entity(Note)" + optional: true + desc: + ja: "返信した投稿" + en: "The replyed note" + - name: "renoteId" + type: "id(Note)" + optional: true + desc: + ja: "引用した投稿のID" + en: "The ID of the quoted note" + - name: "renote" + type: "entity(Note)" + optional: true + desc: + ja: "引用した投稿" + en: "The quoted note" + - name: "poll" + type: "object" + optional: true + desc: + ja: "投票" + en: "The poll" + defName: "poll" + def: + - name: "choices" + type: "object[]" + optional: false + desc: + ja: "投票の選択肢" + en: "The choices of this poll" + defName: "choice" + def: + - name: "id" + type: "number" + optional: false + desc: + ja: "選択肢ID" + en: "The ID of this choice" + - name: "isVoted" + type: "boolean" + optional: true + desc: + ja: "自分がこの選択肢に投票したかどうか" + en: "Whether you voted to this choice" + - name: "text" + type: "string" + optional: false + desc: + ja: "選択肢本文" + en: "The text of this choice" + - name: "votes" + type: "number" + optional: false + desc: + ja: "この選択肢に投票された数" + en: "The number voted for this choice" + - name: "geo" + type: "object" + optional: true + desc: + ja: "位置情報" + en: "Geo location" + defName: "geo" + def: + - name: "coordinates" + type: "number[]" + optional: false + desc: + ja: "座標。最初に経度:-180〜180で表す。最後に緯度:-90〜90で表す。" + - name: "altitude" + type: "number" + optional: false + desc: + ja: "高度。メートル単位で表す。" + - name: "accuracy" + type: "number" + optional: false + desc: + ja: "緯度、経度の精度。メートル単位で表す。" + - name: "altitudeAccuracy" + type: "number" + optional: false + desc: + ja: "高度の精度。メートル単位で表す。" + - name: "heading" + type: "number" + optional: false + desc: + ja: "方角。0〜360の角度で表す。0が北、90が東、180が南、270が西。" + - name: "speed" + type: "number" + optional: false + desc: + ja: "速度。メートル / 秒数で表す。" diff --git a/src/client/docs/api/entities/post.yaml b/src/client/docs/api/entities/post.yaml index 7077700129..718d331d13 100644 --- a/src/client/docs/api/entities/post.yaml +++ b/src/client/docs/api/entities/post.yaml @@ -1,8 +1,8 @@ -name: "Post" +name: "Note" desc: ja: "投稿。" - en: "A post." + en: "A note." props: - name: "id" @@ -10,31 +10,31 @@ props: optional: false desc: ja: "投稿ID" - en: "The ID of this post" + en: "The ID of this note" - name: "createdAt" type: "date" optional: false desc: ja: "投稿日時" - en: "The posted date of this post" + en: "The posted date of this note" - name: "viaMobile" type: "boolean" optional: true desc: ja: "モバイル端末から投稿したか否か(自己申告であることに留意)" - en: "Whether this post sent via a mobile device" + en: "Whether this note sent via a mobile device" - name: "text" type: "string" optional: true desc: ja: "投稿の本文 (ローカルの場合Markdown風のフォーマット)" - en: "The text of this post (in Markdown like format if local)" + en: "The text of this note (in Markdown like format if local)" - name: "textHtml" type: "string" optional: true desc: ja: "投稿の本文 (HTML) (投稿時は無視)" - en: "The text of this post (in HTML. Ignored when posting.)" + en: "The text of this note (in HTML. Ignored when posting.)" - name: "mediaIds" type: "id(DriveFile)[]" optional: true @@ -52,48 +52,48 @@ props: optional: false desc: ja: "投稿者ID" - en: "The ID of author of this post" + en: "The ID of author of this note" - name: "user" type: "entity(User)" optional: true desc: ja: "投稿者" - en: "The author of this post" + en: "The author of this note" - name: "myReaction" type: "string" optional: true desc: ja: "この投稿に対する自分のリアクション" - en: "The your reaction of this post" + en: "The your reaction of this note" - name: "reactionCounts" type: "object" optional: false desc: ja: "リアクションをキーとし、この投稿に対するそのリアクションの数を値としたオブジェクト" - name: "replyId" - type: "id(Post)" + type: "id(Note)" optional: true desc: ja: "返信した投稿のID" - en: "The ID of the replyed post" + en: "The ID of the replyed note" - name: "reply" - type: "entity(Post)" + type: "entity(Note)" optional: true desc: ja: "返信した投稿" - en: "The replyed post" - - name: "repostId" - type: "id(Post)" + en: "The replyed note" + - name: "renoteId" + type: "id(Note)" optional: true desc: ja: "引用した投稿のID" - en: "The ID of the quoted post" - - name: "repost" - type: "entity(Post)" + en: "The ID of the quoted note" + - name: "renote" + type: "entity(Note)" optional: true desc: ja: "引用した投稿" - en: "The quoted post" + en: "The quoted note" - name: "poll" type: "object" optional: true diff --git a/src/client/docs/api/entities/user.yaml b/src/client/docs/api/entities/user.yaml index a1fae1482b..cccf42f221 100644 --- a/src/client/docs/api/entities/user.yaml +++ b/src/client/docs/api/entities/user.yaml @@ -81,24 +81,24 @@ props: desc: ja: "自分がこのユーザーをミュートしているか" en: "Whether you muted this user" - - name: "postsCount" + - name: "notesCount" type: "number" optional: false desc: ja: "投稿の数" - en: "The number of the posts of this user" - - name: "pinnedPost" - type: "entity(Post)" + en: "The number of the notes of this user" + - name: "pinnedNote" + type: "entity(Note)" optional: true desc: ja: "ピン留めされた投稿" - en: "The pinned post of this user" - - name: "pinnedPostId" - type: "id(Post)" + en: "The pinned note of this user" + - name: "pinnedNoteId" + type: "id(Note)" optional: true desc: ja: "ピン留めされた投稿のID" - en: "The ID of the pinned post of this user" + en: "The ID of the pinned note of this user" - name: "driveCapacity" type: "number" optional: false -- cgit v1.2.3-freya