summaryrefslogtreecommitdiff
path: root/src/client/docs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/docs')
-rw-r--r--src/client/docs/api/endpoints/view.pug6
-rw-r--r--src/client/docs/api/entities/user.yaml144
-rw-r--r--src/client/docs/api/entities/view.pug2
-rw-r--r--src/client/docs/api/mixins.pug4
4 files changed, 83 insertions, 73 deletions
diff --git a/src/client/docs/api/endpoints/view.pug b/src/client/docs/api/endpoints/view.pug
index 24fff1b798..e046b3fc33 100644
--- a/src/client/docs/api/endpoints/view.pug
+++ b/src/client/docs/api/endpoints/view.pug
@@ -30,3 +30,9 @@ block main
section
h2= i18n('docs.api.endpoints.res')
+propTable(res)
+
+ if resDefs
+ each resDef in resDefs
+ section(id= resDef.name)
+ h3= resDef.name
+ +propTable(resDef.props)
diff --git a/src/client/docs/api/entities/user.yaml b/src/client/docs/api/entities/user.yaml
index cccf42f221..3328734d2b 100644
--- a/src/client/docs/api/entities/user.yaml
+++ b/src/client/docs/api/entities/user.yaml
@@ -5,169 +5,173 @@ desc:
en: "A user."
props:
- - name: "id"
+ id:
type: "id"
optional: false
desc:
ja: "ユーザーID"
en: "The ID of this user"
- - name: "createdAt"
+
+ createdAt:
type: "date"
optional: false
desc:
ja: "アカウント作成日時"
en: "The registered date of this user"
- - name: "username"
+
+ username:
type: "string"
optional: false
desc:
ja: "ユーザー名"
en: "The username of this user"
- - name: "description"
+
+ description:
type: "string"
optional: false
desc:
ja: "アカウントの説明(自己紹介)"
en: "The description of this user"
- - name: "avatarId"
+
+ avatarId:
type: "id(DriveFile)"
optional: true
desc:
ja: "アバターのID"
en: "The ID of the avatar of this user"
- - name: "avatarUrl"
+
+ avatarUrl:
type: "string"
optional: false
desc:
ja: "アバターのURL"
en: "The URL of the avatar of this user"
- - name: "bannerId"
+
+ bannerId:
type: "id(DriveFile)"
optional: true
desc:
ja: "バナーのID"
en: "The ID of the banner of this user"
- - name: "bannerUrl"
+
+ bannerUrl:
type: "string"
optional: false
desc:
ja: "バナーのURL"
en: "The URL of the banner of this user"
- - name: "followersCount"
+
+ followersCount:
type: "number"
optional: false
desc:
ja: "フォロワーの数"
en: "The number of the followers for this user"
- - name: "followingCount"
+
+ followingCount:
type: "number"
optional: false
desc:
ja: "フォローしているユーザーの数"
en: "The number of the following users for this user"
- - name: "isFollowing"
+
+ isFollowing:
type: "boolean"
optional: true
desc:
ja: "自分がこのユーザーをフォローしているか"
- - name: "isFollowed"
+
+ isFollowed:
type: "boolean"
optional: true
desc:
ja: "自分がこのユーザーにフォローされているか"
- - name: "isMuted"
+
+ isMuted:
type: "boolean"
optional: true
desc:
ja: "自分がこのユーザーをミュートしているか"
en: "Whether you muted this user"
- - name: "notesCount"
+
+ notesCount:
type: "number"
optional: false
desc:
ja: "投稿の数"
en: "The number of the notes of this user"
- - name: "pinnedNote"
+
+ pinnedNote:
type: "entity(Note)"
optional: true
desc:
ja: "ピン留めされた投稿"
en: "The pinned note of this user"
- - name: "pinnedNoteId"
+
+ pinnedNoteId:
type: "id(Note)"
optional: true
desc:
ja: "ピン留めされた投稿のID"
en: "The ID of the pinned note of this user"
- - name: "driveCapacity"
+
+ driveCapacity:
type: "number"
optional: false
desc:
ja: "ドライブの容量(bytes)"
en: "The capacity of drive of this user (bytes)"
- - name: "host"
+
+ host:
type: "string | null"
optional: false
desc:
ja: "ホスト (例: example.com:3000)"
en: "Host (e.g. example.com:3000)"
- - name: "account"
+
+ twitter:
type: "object"
- optional: false
+ optional: true
desc:
- ja: "このサーバーにおけるアカウント"
- en: "The account of this user on this server"
- defName: "account"
- def:
- - name: "lastUsedAt"
- type: "date"
+ ja: "連携されているTwitterアカウント情報"
+ en: "The info of the connected twitter account of this user"
+ props:
+ userId:
+ type: "string"
optional: false
desc:
- ja: "最終利用日時"
- en: "The last used date of this user"
- - name: "isBot"
- type: "boolean"
- optional: true
+ ja: "ユーザーID"
+ en: "The user ID"
+ screenName:
+ type: "string"
+ optional: false
desc:
- ja: "botか否か(自己申告であることに留意)"
- en: "Whether is bot or not"
- - name: "twitter"
- type: "object"
+ ja: "ユーザー名"
+ en: "The screen name of this user"
+
+ isBot:
+ type: "boolean"
+ optional: true
+ desc:
+ ja: "botか否か(自己申告であることに留意)"
+ en: "Whether is bot or not"
+
+ profile:
+ type: "object"
+ optional: false
+ desc:
+ ja: "プロフィール"
+ en: "The profile of this user"
+ props:
+ location:
+ type: "string"
optional: true
desc:
- ja: "連携されているTwitterアカウント情報"
- en: "The info of the connected twitter account of this user"
- defName: "twitter"
- def:
- - name: "userId"
- type: "string"
- optional: false
- desc:
- ja: "ユーザーID"
- en: "The user ID"
- - name: "screenName"
- type: "string"
- optional: false
- desc:
- ja: "ユーザー名"
- en: "The screen name of this user"
- - name: "profile"
- type: "object"
- optional: false
+ ja: "場所"
+ en: "The location of this user"
+ birthday:
+ type: "string"
+ optional: true
desc:
- ja: "プロフィール"
- en: "The profile of this user"
- defName: "profile"
- def:
- - name: "location"
- type: "string"
- optional: true
- desc:
- ja: "場所"
- en: "The location of this user"
- - name: "birthday"
- type: "string"
- optional: true
- desc:
- ja: "誕生日 (YYYY-MM-DD)"
- en: "The birthday of this user (YYYY-MM-DD)"
+ ja: "誕生日 (YYYY-MM-DD)"
+ en: "The birthday of this user (YYYY-MM-DD)"
diff --git a/src/client/docs/api/entities/view.pug b/src/client/docs/api/entities/view.pug
index a930f71eb6..3f50bfd3bd 100644
--- a/src/client/docs/api/entities/view.pug
+++ b/src/client/docs/api/entities/view.pug
@@ -17,4 +17,4 @@ block main
each propDef in propDefs
section(id= propDef.name)
h3= propDef.name
- +propTable(propDef.params)
+ +propTable(propDef.props)
diff --git a/src/client/docs/api/mixins.pug b/src/client/docs/api/mixins.pug
index 79665a61e3..9e03abefeb 100644
--- a/src/client/docs/api/mixins.pug
+++ b/src/client/docs/api/mixins.pug
@@ -22,9 +22,9 @@ mixin propTable(props)
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
| )
else if prop.kind == 'object'
- if prop.def
+ if prop.hasDef
| (
- a(href=`#${prop.defName}`)= prop.defName
+ a(href=`#${prop.name}`)= prop.name
| )
else if prop.kind == 'date'
| (Date)