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/room | |
| 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/room')
| -rw-r--r-- | src/server/api/endpoints/room/show.ts | 79 | ||||
| -rw-r--r-- | src/server/api/endpoints/room/update.ts | 1 |
2 files changed, 79 insertions, 1 deletions
diff --git a/src/server/api/endpoints/room/show.ts b/src/server/api/endpoints/room/show.ts index e8af68956d..a12d9b8f26 100644 --- a/src/server/api/endpoints/room/show.ts +++ b/src/server/api/endpoints/room/show.ts @@ -7,7 +7,7 @@ import { toPunyNullable } from '../../../../misc/convert-host'; export const meta = { desc: { - 'ja-JP': '指定した部屋の情報を取得します。', + 'ja-JP': '指定したユーザーの部屋の情報を取得します。', }, tags: ['room'], @@ -38,6 +38,83 @@ export const meta = { code: 'NO_SUCH_USER', id: '7ad3fa3e-5e12-42f0-b23a-f3d13f10ee4b' } + }, + + res: { + type: 'object' as const, + optional: false as const, nullable: false as const, + properties: { + roomType: { + type: 'string' as const, + optional: false as const, nullable: false as const, + enum: ['default', 'washitsu'] + }, + furnitures: { + 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 + }, + type: { + type: 'string' as const, + optional: false as const, nullable: false as const + }, + props: { + type: 'object' as const, + optional: true as const, nullable: false as const, + description: 'Properties vary depending on the furniture' + }, + position: { + type: 'object' as const, + optional: false as const, nullable: false as const, + properties: { + x: { + type: 'number' as const, + optional: false as const, nullable: false as const + }, + y: { + type: 'number' as const, + optional: false as const, nullable: false as const + }, + z: { + type: 'number' as const, + optional: false as const, nullable: false as const + } + } + }, + rotation: { + type: 'object' as const, + optional: false as const, nullable: false as const, + properties: { + x: { + type: 'number' as const, + optional: false as const, nullable: false as const + }, + y: { + type: 'number' as const, + optional: false as const, nullable: false as const + }, + z: { + type: 'number' as const, + optional: false as const, nullable: false as const + } + } + } + } + } + }, + carpetColor: { + type: 'string' as const, + optional: false as const, nullable: false as const, + format: 'hex', + example: '#85CAF0' + } + } } }; diff --git a/src/server/api/endpoints/room/update.ts b/src/server/api/endpoints/room/update.ts index 3022b96b1d..af8b80be9a 100644 --- a/src/server/api/endpoints/room/update.ts +++ b/src/server/api/endpoints/room/update.ts @@ -46,5 +46,6 @@ export default define(meta, async (ps, user) => { // Publish meUpdated event publishMainStream(user.id, 'meUpdated', iObj); + // TODO: レスポンスがおかしいと思う by YuzuRyo61 return iObj; }); |