diff options
| author | YuzuRyo61 <yuzuryo61@yuzulia.work> | 2021-03-06 22:34:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-06 22:34:11 +0900 |
| commit | a07d753da84191bc8c185a7bcd6d73fab9529b5d (patch) | |
| tree | 085bc62b1f979020796a73373c3050f4948ed2bd /src/server/api/endpoints/i | |
| parent | feat: video play inline (using video tag) (#7242) (diff) | |
| download | sharkey-a07d753da84191bc8c185a7bcd6d73fab9529b5d.tar.gz sharkey-a07d753da84191bc8c185a7bcd6d73fab9529b5d.tar.bz2 sharkey-a07d753da84191bc8c185a7bcd6d73fab9529b5d.zip | |
APIドキュメントの改善 (#6757)
* Update api document in admin/announcements
* Update api document in announcements
* Update api document in i/read-announcements
* Update api document in username/available
* Update api document & Fix typo in API 403 error
* Update api document
* Update api document
* Update api document
* Fix API permission definition
* Update api document
* Update api document
* Update api document
* Update api document
* Update api document
* Update api document
* Update api document
* Update api document
* Fix bug in users (api)
* Apply reviews #6757
* Apply reviews #6757
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'src/server/api/endpoints/i')
| -rw-r--r-- | src/server/api/endpoints/i/get-word-muted-notes-count.ts | 11 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/page-likes.ts | 17 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/pages.ts | 10 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/pin.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/read-announcement.ts | 5 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/unpin.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/update.ts | 6 | ||||
| -rw-r--r-- | src/server/api/endpoints/i/user-group-invites.ts | 21 |
8 files changed, 82 insertions, 0 deletions
diff --git a/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/src/server/api/endpoints/i/get-word-muted-notes-count.ts index e88d697bfd..a69ebc286a 100644 --- a/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -9,6 +9,17 @@ export const meta = { kind: 'read:account', params: { + }, + + res: { + type: 'object' as const, + optional: false as const, nullable: false as const, + properties: { + count: { + type: 'number' as const, + optional: false as const, nullable: false as const + } + } } }; diff --git a/src/server/api/endpoints/i/page-likes.ts b/src/server/api/endpoints/i/page-likes.ts index 7f44df85db..9a83cc1d43 100644 --- a/src/server/api/endpoints/i/page-likes.ts +++ b/src/server/api/endpoints/i/page-likes.ts @@ -29,6 +29,23 @@ export const meta = { untilId: { validator: $.optional.type(ID), }, + }, + + res: { + type: 'object' as const, + optional: false as const, nullable: false as const, + properties: { + id: { + type: 'string' as const, + optional: false as const, nullable: false as const, + format: 'id' + }, + page: { + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'Page' + } + } } }; diff --git a/src/server/api/endpoints/i/pages.ts b/src/server/api/endpoints/i/pages.ts index f55f228d80..3fc00e370a 100644 --- a/src/server/api/endpoints/i/pages.ts +++ b/src/server/api/endpoints/i/pages.ts @@ -29,6 +29,16 @@ export const meta = { untilId: { validator: $.optional.type(ID), }, + }, + + res: { + type: 'array' as const, + optional: false as const, nullable: false as const, + items: { + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'Page' + } } }; diff --git a/src/server/api/endpoints/i/pin.ts b/src/server/api/endpoints/i/pin.ts index 59b2f23e3d..e13873f601 100644 --- a/src/server/api/endpoints/i/pin.ts +++ b/src/server/api/endpoints/i/pin.ts @@ -44,6 +44,12 @@ export const meta = { code: 'ALREADY_PINNED', id: '8b18c2b7-68fe-4edb-9892-c0cbaeb6c913' }, + }, + + res: { + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'User' } }; diff --git a/src/server/api/endpoints/i/read-announcement.ts b/src/server/api/endpoints/i/read-announcement.ts index 070e49eed0..4a4a021af9 100644 --- a/src/server/api/endpoints/i/read-announcement.ts +++ b/src/server/api/endpoints/i/read-announcement.ts @@ -7,6 +7,11 @@ import { AnnouncementReads, Announcements, Users } from '../../../../models'; import { publishMainStream } from '../../../../services/stream'; export const meta = { + desc: { + 'ja-JP': '指定したアナウンスを既読にします。', + 'en-US': 'Marks the specified announcement as read.' + }, + tags: ['account'], requireCredential: true as const, diff --git a/src/server/api/endpoints/i/unpin.ts b/src/server/api/endpoints/i/unpin.ts index e1ea3a6295..6f06e38598 100644 --- a/src/server/api/endpoints/i/unpin.ts +++ b/src/server/api/endpoints/i/unpin.ts @@ -32,6 +32,12 @@ export const meta = { code: 'NO_SUCH_NOTE', id: '454170ce-9d63-4a43-9da1-ea10afe81e21' }, + }, + + res: { + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'User' } }; diff --git a/src/server/api/endpoints/i/update.ts b/src/server/api/endpoints/i/update.ts index 3d7f1fa76f..a1faf8f1c2 100644 --- a/src/server/api/endpoints/i/update.ts +++ b/src/server/api/endpoints/i/update.ts @@ -196,6 +196,12 @@ export const meta = { code: 'NO_SUCH_PAGE', id: '8e01b590-7eb9-431b-a239-860e086c408e' }, + }, + + res: { + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'User' } }; diff --git a/src/server/api/endpoints/i/user-group-invites.ts b/src/server/api/endpoints/i/user-group-invites.ts index 9885082a49..4c5105fa7b 100644 --- a/src/server/api/endpoints/i/user-group-invites.ts +++ b/src/server/api/endpoints/i/user-group-invites.ts @@ -29,6 +29,27 @@ export const meta = { untilId: { validator: $.optional.type(ID), }, + }, + + res: { + type: 'array' as const, + optional: false as const, nullable: false as const, + items: { + type: 'object' as const, + optional: false as const, nullable: false as const, + properties: { + id: { + type: 'string' as const, + optional: false as const, nullable: false as const, + format: 'id' + }, + group: { + type: 'object' as const, + optional: false as const, nullable: false as const, + ref: 'UserGroup' + } + } + } } }; |