-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv2.yaml
More file actions
4573 lines (4495 loc) · 156 KB
/
v2.yaml
File metadata and controls
4573 lines (4495 loc) · 156 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: '3.0.3'
servers:
- url: https://collection.trap.jp/api/v2
- url: https://collection-dev.trapti.tech/api/v2
- url: http://localhost:3000/api/v2
- url: /api/v2 #oapi-codegenでproxy後にもmatchできるようにするため必要
info:
description: 'traP Collection v2'
version: '2.4.1'
title: 'traP Collection v2'
contact:
name: traP
url: 'https://github.com/traPtitech/trap-collection-server'
tags:
- name: oauth2
description: |
OAuth 2.0を利用しての管理画面の認証を行うAPIです。
- name: user
description: |
管理画面のユーザー関連のAPIです。
- name: admin
description: |
traP Collection全体の管理者関連のAPIです。
- name: game
description: |
ゲーム関連のAPIです。
- name: gameRole
description: |
ゲームの管理権限関連のAPIです。
- name: gameGenre
description: |
ゲームのジャンル関連のAPIです。
- name: gameVersion
description: |
ゲームのバージョン関連のAPIです。
- name: gameFile
description: |
ゲームのファイル関連のAPIです。
- name: gameImage
description: |
ゲームの画像関連のAPIです。
- name: gameVideo
description: |
ゲームのビデオ関連のAPIです。
- name: edition
description: |
エディション(旧ランチャーバージョン)関連のAPIです。
- name: editionAuth
description: |
ランチャーからのエディション情報取得の認可関連のAPIです。
- name: seat
description: |
席管理関連のAPIです。
- name: gamePlayLog
description: |
ゲームプレイログ関連のAPIです。ランチャーからのゲーム起動・終了の記録とその統計データの取得を行います。
- name: gameCreator
description: ゲームクリエイター関連のAPIです。
- name: gameFeedback
description: |
ゲームフィードバック関連のAPIです。
ランチャーからのフィードバック送信と、管理画面でのフィードバック閲覧を行います。
paths:
# oauth2
/oauth2/callback:
parameters:
- $ref: '#/components/parameters/authorizationCodeInQuery'
get:
tags:
- oauth2
operationId: getCallback
responses:
'200':
description: |
認証が成功した場合に返されます。
セッションにユーザー情報が保存され、セッションが切れるまでログイン状態になります。
また、Code Challengeなどは削除されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
セッション、またはAuthorization Codeになんらかの誤りがあり、
認証に失敗した場合に返されます。
誤りの内容はレスポンスのmessageに出力されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: traQのOAuth 2.0のコールバック
description: |
traQ上での認証後にtraQから
Authorization Codeがクエリパラメーターにつけられて、
リダイレクトされます。
/oauth2/code:
get:
tags:
- oauth2
operationId: getCode
responses:
'303':
headers:
Set-Cookie:
schema:
type: string
example: sessions=abcd1234; Path=/; Expires=Wed, 04 May 2022 16:24:11 GMT; Max-Age=2592000; HttpOnly; Secure
Location:
schema:
type: string
example: https://q.trap.jp/api/v3/oauth2/authorize?response_type=code&client_id=<ClientID>&code_challenge=<Code Challenge>&code_challenge_method=S256
description: |
セッションの設定などに成功した場合に返されます。
traQの認可ページにリダイレクトされます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: OAuth 2.0のCode Verifierなどのセッションへの設定とtraQへのリダイレクト
description: |
OAuth 2.0を利用しての認証に必要なPKCEのCode Verifierを生成し、
セッションに設定した上でCode ChallengeやClientIDなどを設定したtraQのURLへリダイレクトします。
/oauth2/logout:
post:
tags:
- oauth2
security:
- TrapMemberAuth: []
operationId: postLogout
responses:
'204':
description: |
ログアウトに成功した場合に返されます。
セッションが削除されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
セッションになんらかの誤りがあり、
認証に失敗した場合に返されます。
誤りの内容はレスポンスのmessageに出力されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
summary: traP Collectionの管理画面からのログアウト
description: |
traP Collectionの管理画面からログアウトします。
成功するとセッションが削除されます。
# user
/users/me:
get:
tags:
- user
security:
- TrapMemberAuth: []
operationId: getMe
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: |
自分の情報の取得に成功した際に返されます。
レスポンスでログインしているユーザーの情報が返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
summary: ログイン中ユーザーの情報の取得
description: |
ログイン中のユーザーの情報を取得します。
/users:
get:
tags:
- user
parameters:
- name: bot
in: query
required: false
schema:
type: boolean
default: true
description: |
falseの場合botを除外します。
デフォルトではbotも含めます。
- name: includeSuspended
in: query
required: false
schema:
type: boolean
default: false
description: |
trueの場合、凍結済みユーザーも含めます。
デフォルトでは凍結済みユーザーは含めません。
security:
- TrapMemberAuth: []
operationId: getUsers
responses:
'200':
description: 成功
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
'401':
$ref: '#/components/responses/TraPUnauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
summary: traPのメンバー一覧取得
description: |
traPのメンバーの一覧を取得します。
`includeSuspended`を`true`にした場合、凍結済みユーザーが含まれます。
`includeSuspended`の条件は、traQのAPIの `/api/v3/users` に準拠します。
# admin
/admins:
post:
tags:
- admin
security:
- AdminAuth: []
operationId: postAdmin
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UserRequest'
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
description: |
traP Collection全体の管理者の追加に成功した際に返されます。
レスポンスで変更後のtraP Collection全体の管理者一覧が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
リクエストの形式が正しくない、または、
ユーザーIDに対応するユーザーが存在しない場合に返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
summary: traP Collection全体の管理者追加
description: |
traP Collection全体の管理者を追加します。
このAPIは管理者のみが利用できます。
get:
tags:
- admin
security:
- TrapMemberAuth: []
operationId: getAdmins
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
description: |
traP Collection全体の管理者一覧の取得に成功した際に返されます。
レスポンスでtraP Collection全体の管理者の一覧が返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
summary: traPの管理者一覧取得
description: |
traP Collection全体の管理者の一覧を取得します。
/admins/{userID}:
parameters:
- $ref: '#/components/parameters/userIDInPath'
delete:
tags:
- admin
security:
- AdminAuth: []
operationId: deleteAdmin
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
description: |
traP Collection全体の管理者の削除に成功した際に返されます。
レスポンスで変更後のtraP Collection全体の管理者一覧が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
リクエストの形式が正しくない、または、
ユーザーIDに対応するユーザーが存在しない場合に返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
summary: traP Collection全体の管理者削除
description: |
traP Collection全体の管理者を削除します。
このAPIは管理者のみが利用できます。
# game
/games:
post:
tags:
- game
security:
- TrapMemberAuth: []
operationId: postGame
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewGame'
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Game'
description: |
ゲームの追加に成功した際に返されます。
レスポンスで新しく追加されたゲームの情報が返されます。
'400':
description: リクエストが不正な際に返されます。
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/TraPUnauthorized'
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームの追加
description: |
新しくゲームを追加します。
このエンドポイントを叩いたユーザーは
自動的にownerとなります。
get:
tags:
- game
parameters:
- name: all
in: query
required: false
schema:
type: boolean
description: |
trueを指定すると、全てのゲーム、
falseを指定すると、ログイン中のユーザーが作成したゲームのみを返します。
デフォルトはtrueです。
ログインしている部員以外がfalseでリクエストを送った場合はtrueとして扱われます。
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
description: |
取得するゲームの上限数を指定します。
指定なしの場合はすべてのゲームが取得されます。
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: |
取得するゲームの開始位置を指定します。
指定なしの場合は0となります。
- schema:
type: array
items:
$ref: '#/components/schemas/GameGenreID'
in: query
name: genre
description: |
取得するゲームのジャンルを指定します。指定なしの場合は、ジャンルによる絞り込みを行いません。
また、コンマ区切りで配列として複数指定でき、複数指定した場合はそれらすべてのジャンルに当てはまるゲームを返します。
- schema:
type: string
example: げーむ
in: query
name: name
description: ゲームの名前を指定すると部分一致するゲームを返します。指定なしの場合は名前による絞り込みを行いません。
- schema:
type: string
enum:
- createdAt
- latestVersion
in: query
name: sort
description: 取得するゲームの並び順を指定します。指定なしの場合は、各ゲームの最新のバージョンが新しい順に取得します。
operationId: getGames
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetGamesResponse'
description: |
ゲームの一覧の取得に成功した際に返されます。
レスポンスで取得したゲームの一覧と条件を満たすゲームの数が返されます。
'400':
description: リクエストが不正な場合に返されます。
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲーム一覧の取得
description: |
ゲームの一覧を取得します。
各ゲームの最新バージョンが作られた時刻の降順(新しい順)で結果が返されます。
部員以外がこのAPIを叩いたとき、公開設定がprivateのものは返されず、数にも含まれません。
/games/{gameID}:
parameters:
- $ref: '#/components/parameters/gameIDInPath'
get:
tags:
- game
operationId: getGame
security:
- GameInfoVisibilityAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Game'
description: |
ゲームの情報の取得に成功した際に返されます。
レスポンスで取得したゲームの情報が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームIDが不正な値である場合に返されます。
'403':
$ref: '#/components/responses/GameInfoForbidden'
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲーム情報の取得
description: |
指定したゲームIDのゲームの情報を取得します。
patch:
tags:
- game
security:
- GameMaintainerAuth: []
operationId: patchGame
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchGame'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GameInfo'
description: |
ゲームの情報の修正に成功した際に返されます。
レスポンスで修正後のゲームの情報が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームID、またはリクエストが不正である場合に返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
このゲームのmaintainer、ownerのどちらでもない場合に返されます。
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームの情報の変更
description: |
指定したゲームIDのゲームの情報を修正します。
delete:
tags:
- game
security:
- GameOwnerAuth: []
operationId: deleteGame
responses:
'200':
description: |
ゲームの削除に成功した際に返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームIDが不正な値である場合に返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
このゲームのownerでない場合に返されます。
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームの削除
description: |
指定したゲームIDのゲームを削除します。
# gameRole
/games/{gameID}/roles:
parameters:
- $ref: '#/components/parameters/gameIDInPath'
patch:
tags:
- gameRole
security:
- GameOwnerAuth: []
operationId: patchGameRole
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GameRoleRequest'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Game'
description: |
ゲームの管理権限の変更に成功した際に返されます。
レスポンスで変更後のowner、maintainerを含むゲーム情報が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームID、またはリクエストが不正である場合に返されます。
既にmaintainerまたはownerとなっているユーザーが含まれる場合にも返されます。
一人しかいないownerがmaintainerに変更されようとしている場合にも返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
このゲームのownerでない場合に返されます。
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームの管理権限の変更
description: |
指定したゲームIDのゲームの管理者を追加します。
既に指定のユーザーが権限(ownerまたはmaintainer)として登録されている場合は、
指定された権限で権限を上書きします。
/games/{gameID}/roles/{userID}:
parameters:
- $ref: '#/components/parameters/gameIDInPath'
- $ref: '#/components/parameters/userIDInPath'
delete:
tags:
- gameRole
security:
- GameOwnerAuth: []
operationId: deleteGameRole
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Game'
description: |
ゲームの管理権限の変更に成功した際に返されます。
レスポンスで変更後のowner、maintainerを含むゲーム情報が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームID、またはリクエストが不正である場合に返されます。
削除によりゲームにownerが存在しなくなる場合にも返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
このゲームのownerでない場合に返されます。
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームの管理権限の削除
description: |
指定したゲームIDのゲームの管理権限を削除します。
ownerは1人以上はいる必要があるため、
削除によりownerがいなくなる場合はエラーとなります。
'/games/{gameID}/genres':
parameters:
- $ref: '#/components/parameters/gameIDInPath'
put:
summary: ゲームのジャンル編集
operationId: putGameGenres
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Game'
'400':
description: リクエストが不正な際に返されます。
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/TraPUnauthorized'
'403':
$ref: '#/components/responses/AdminForbidden'
'404':
description: 与えられたgameIDに該当するゲームが存在しない、または削除されているときに返します。
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
$ref: '#/components/responses/InternalServerError'
description: ゲームのジャンルを与えられた配列で上書きします。
security:
- GameMaintainerAuth: []
requestBody:
content:
application/json:
schema:
type: object
properties:
genres:
type: array
items:
$ref: '#/components/schemas/GameGenreName'
description: ゲームのジャンルIDの配列です。
tags:
- gameGenre
'/games/{gameID}/versions':
parameters:
- $ref: '#/components/parameters/gameIDInPath'
post:
tags:
- gameVersion
security:
- GameMaintainerAuth: []
operationId: postGameVersion
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewGameVersion'
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/GameVersion'
description: |
ゲームのバージョンの作成に成功した際に返されます。
レスポンスで作成したゲームのバージョンが返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームID、またはリクエストが不正である場合に返されます。
ゲームファイルの種類とwindows,darwin,jarの対応が誤っている場合もこのエラーとなります。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
このゲームのmaintainer、ownerのどちらでもない場合に返されます。
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームのバージョンの作成
description: |
指定したゲームIDのゲームにバージョンを作成します。
get:
tags:
- gameVersion
security:
- TrapMemberAuth: []
operationId: getGameVersion
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
description: |
取得するゲームバージョンの上限数を指定します。
指定なしの場合は制限なしです。
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: |
取得するゲームバージョンの開始位置を指定します。
指定なしの場合は0となります。
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetGameVersionsResponse'
description: |
ゲームバージョン一覧の取得に成功した際に返されます。
レスポンスで取得したゲームバージョンの一覧が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームIDが不正である場合に返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームバージョン一覧の取得
description: |
指定したゲームIDのゲームのバージョン一覧を取得します。
作成時刻での降順で結果が返されます。
/games/{gameID}/versions/latest:
parameters:
- $ref: '#/components/parameters/gameIDInPath'
get:
tags:
- gameVersion
operationId: getLatestGameVersion
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GameVersion'
description: |
ゲームの最新バージョンの取得に成功した際に返されます。
レスポンスで取得したゲームの最新バージョンが返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ゲームIDが不正である場合に返されます。
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
また、API v1で追加され、バージョンが存在しないゲームであった場合にも返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームの最新バージョンの取得
description: |
指定したゲームIDのゲームの最新バージョンを取得します。
# gameFile
/games/{gameID}/files:
parameters:
- $ref: '#/components/parameters/gameIDInPath'
post:
tags:
- gameFile
security:
- GameMaintainerAuth: []
operationId: postGameFile
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/NewGameFile'
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/GameFile'
description: |
ゲームファイルの作成に成功した際に返されます。
レスポンスで作成したゲームファイルのメタ情報が返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
リクエストが不正である場合に返されます。
エントリーポイントが存在しない、zipファイルでないなどです。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームファイルの作成
description: |
指定したゲームIDのゲームにファイルを作成します。
作成したゲームファイルは、1日以内にゲームバージョンと紐づけられない場合自動で削除されます。
get:
tags:
- gameFile
security:
- TrapMemberAuth: []
operationId: getGameFiles
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/GameFile'
description: |
ゲームファイルの取得に成功した際に返されます。
アップロード済みゲームファイルのメタ情報一覧が降順で返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
リクエストが不正である場合に返されます。
'401':
$ref: '#/components/responses/TraPUnauthorized'
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームファイル一覧の取得
description: |
指定したゲームIDのゲームのアップロード済みファイル一覧を返します。
ゲームバージョンと紐づけられていないファイルも含まれる点に注意。
/games/{gameID}/files/{gameFileID}:
parameters:
- $ref: '#/components/parameters/gameIDInPath'
- $ref: '#/components/parameters/gameFileIDInPath'
get:
tags:
- gameFile
operationId: getGameFile
security:
- GameFileVisibilityAuth: []
- EditionGameFileAuth: []
responses:
'200':
content:
application/octet-stream:
schema:
$ref: '#/components/schemas/GameFileContent'
description: |
ゲームファイルの取得に成功した際に返されます。
レスポンスで取得したゲームファイルのバイナリが返されます。
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
ファイルIDが不正である場合に返されます。
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
traQのOAuth 2.0認証を通過できず、かつ、
ランチャー用のアクセストークンによるBearer認証を通過できない、
または、アクセストークンに対応するエディションにこのファイルに対応するゲームバージョンが含まれない場合に返されます。
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: |
指定したIDのゲームファイルが存在しない、または削除されている場合に返されます。
'500':
$ref: '#/components/responses/InternalServerError'
summary: ゲームファイルのバイナリの取得
description: |
指定したゲームファイルIDのゲームファイルを取得します。
/games/{gameID}/files/{gameFileID}/meta:
parameters:
- $ref: '#/components/parameters/gameIDInPath'
- $ref: '#/components/parameters/gameFileIDInPath'
get:
tags:
- gameFile
operationId: getGameFileMeta