aboutsummaryrefslogtreecommitdiff
path: root/docs/swagger.yaml
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-03 23:16:42 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-07-03 23:16:42 +0300
commitc071eeca829a18941fc29f4e4eb8b8f93a65b5c4 (patch)
tree1c68bda13a67ce902e01a89d4b2434e91f457339 /docs/swagger.yaml
parentfix: save uploaded demos as .dem in order for parser to work (#42) (diff)
downloadlphub-c071eeca829a18941fc29f4e4eb8b8f93a65b5c4.tar.gz
lphub-c071eeca829a18941fc29f4e4eb8b8f93a65b5c4.tar.bz2
lphub-c071eeca829a18941fc29f4e4eb8b8f93a65b5c4.zip
docs: refactor docs
Former-commit-id: 3f3833af352d8758ca509a4fe3badedd5250b1ba
Diffstat (limited to 'docs/swagger.yaml')
-rw-r--r--docs/swagger.yaml80
1 files changed, 40 insertions, 40 deletions
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index d4420e2..2fed413 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -242,6 +242,7 @@ info:
242paths: 242paths:
243 /chapters/{id}: 243 /chapters/{id}:
244 get: 244 get:
245 description: Get maps from the specified chapter id.
245 parameters: 246 parameters:
246 - description: Chapter ID 247 - description: Chapter ID
247 in: path 248 in: path
@@ -264,40 +265,19 @@ paths:
264 description: Bad Request 265 description: Bad Request
265 schema: 266 schema:
266 $ref: '#/definitions/models.Response' 267 $ref: '#/definitions/models.Response'
267 summary: Get maps from the specified chapter id.
268 tags: 268 tags:
269 - games & chapters 269 - games & chapters
270 /demo:
271 get:
272 produces:
273 - application/json
274 responses:
275 "200":
276 description: OK
277 schema:
278 allOf:
279 - $ref: '#/definitions/models.Response'
280 - properties:
281 data:
282 $ref: '#/definitions/models.RankingsResponse'
283 type: object
284 "400":
285 description: Bad Request
286 schema:
287 $ref: '#/definitions/models.Response'
288 summary: Get rankings of every player.
289 tags:
290 - rankings
291 /demos: 270 /demos:
292 get: 271 get:
293 consumes: 272 consumes:
294 - application/json 273 - application/json
274 description: Get demo with specified demo uuid.
295 parameters: 275 parameters:
296 - description: Demo UUID 276 - description: Demo UUID
297 in: query 277 in: query
298 name: uuid 278 name: uuid
299 required: true 279 required: true
300 type: integer 280 type: string
301 produces: 281 produces:
302 - application/octet-stream 282 - application/octet-stream
303 responses: 283 responses:
@@ -309,11 +289,11 @@ paths:
309 description: Bad Request 289 description: Bad Request
310 schema: 290 schema:
311 $ref: '#/definitions/models.Response' 291 $ref: '#/definitions/models.Response'
312 summary: Get demo with specified demo uuid.
313 tags: 292 tags:
314 - demo 293 - demo
315 /games: 294 /games:
316 get: 295 get:
296 description: Get games from the leaderboards.
317 produces: 297 produces:
318 - application/json 298 - application/json
319 responses: 299 responses:
@@ -332,11 +312,11 @@ paths:
332 description: Bad Request 312 description: Bad Request
333 schema: 313 schema:
334 $ref: '#/definitions/models.Response' 314 $ref: '#/definitions/models.Response'
335 summary: Get games from the leaderboards.
336 tags: 315 tags:
337 - games & chapters 316 - games & chapters
338 /games/{id}: 317 /games/{id}:
339 get: 318 get:
319 description: Get chapters from the specified game id.
340 parameters: 320 parameters:
341 - description: Game ID 321 - description: Game ID
342 in: path 322 in: path
@@ -359,13 +339,13 @@ paths:
359 description: Bad Request 339 description: Bad Request
360 schema: 340 schema:
361 $ref: '#/definitions/models.Response' 341 $ref: '#/definitions/models.Response'
362 summary: Get chapters from the specified game id.
363 tags: 342 tags:
364 - games & chapters 343 - games & chapters
365 /login: 344 /login:
366 get: 345 get:
367 consumes: 346 consumes:
368 - application/json 347 - application/json
348 description: Get (redirect) login page for Steam auth.
369 produces: 349 produces:
370 - application/json 350 - application/json
371 responses: 351 responses:
@@ -382,11 +362,11 @@ paths:
382 description: Bad Request 362 description: Bad Request
383 schema: 363 schema:
384 $ref: '#/definitions/models.Response' 364 $ref: '#/definitions/models.Response'
385 summary: Get (redirect) login page for Steam auth.
386 tags: 365 tags:
387 - login 366 - login
388 /maps/{id}/leaderboards: 367 /maps/{id}/leaderboards:
389 get: 368 get:
369 description: Get map leaderboards with specified id.
390 parameters: 370 parameters:
391 - description: Map ID 371 - description: Map ID
392 in: path 372 in: path
@@ -414,13 +394,13 @@ paths:
414 description: Bad Request 394 description: Bad Request
415 schema: 395 schema:
416 $ref: '#/definitions/models.Response' 396 $ref: '#/definitions/models.Response'
417 summary: Get map leaderboards with specified id.
418 tags: 397 tags:
419 - maps 398 - maps
420 /maps/{id}/record: 399 /maps/{id}/record:
421 post: 400 post:
422 consumes: 401 consumes:
423 - multipart/form-data 402 - multipart/form-data
403 description: Post record with demo of a specific map.
424 parameters: 404 parameters:
425 - description: Map ID 405 - description: Map ID
426 in: path 406 in: path
@@ -464,11 +444,11 @@ paths:
464 description: Unauthorized 444 description: Unauthorized
465 schema: 445 schema:
466 $ref: '#/definitions/models.Response' 446 $ref: '#/definitions/models.Response'
467 summary: Post record with demo of a specific map.
468 tags: 447 tags:
469 - maps 448 - maps
470 /maps/{id}/summary: 449 /maps/{id}/summary:
471 delete: 450 delete:
451 description: Delete map summary with specified map id.
472 parameters: 452 parameters:
473 - description: JWT Token 453 - description: JWT Token
474 in: header 454 in: header
@@ -502,10 +482,10 @@ paths:
502 description: Bad Request 482 description: Bad Request
503 schema: 483 schema:
504 $ref: '#/definitions/models.Response' 484 $ref: '#/definitions/models.Response'
505 summary: Delete map summary with specified map id.
506 tags: 485 tags:
507 - maps 486 - maps
508 get: 487 get:
488 description: Get map summary with specified id.
509 parameters: 489 parameters:
510 - description: Map ID 490 - description: Map ID
511 in: path 491 in: path
@@ -528,10 +508,10 @@ paths:
528 description: Bad Request 508 description: Bad Request
529 schema: 509 schema:
530 $ref: '#/definitions/models.Response' 510 $ref: '#/definitions/models.Response'
531 summary: Get map summary with specified id.
532 tags: 511 tags:
533 - maps 512 - maps
534 post: 513 post:
514 description: Create map summary with specified map id.
535 parameters: 515 parameters:
536 - description: JWT Token 516 - description: JWT Token
537 in: header 517 in: header
@@ -565,10 +545,10 @@ paths:
565 description: Bad Request 545 description: Bad Request
566 schema: 546 schema:
567 $ref: '#/definitions/models.Response' 547 $ref: '#/definitions/models.Response'
568 summary: Create map summary with specified map id.
569 tags: 548 tags:
570 - maps 549 - maps
571 put: 550 put:
551 description: Edit map summary with specified map id.
572 parameters: 552 parameters:
573 - description: JWT Token 553 - description: JWT Token
574 in: header 554 in: header
@@ -602,13 +582,13 @@ paths:
602 description: Bad Request 582 description: Bad Request
603 schema: 583 schema:
604 $ref: '#/definitions/models.Response' 584 $ref: '#/definitions/models.Response'
605 summary: Edit map summary with specified map id.
606 tags: 585 tags:
607 - maps 586 - maps
608 /profile: 587 /profile:
609 get: 588 get:
610 consumes: 589 consumes:
611 - application/json 590 - application/json
591 description: Get profile page of session user.
612 parameters: 592 parameters:
613 - description: JWT Token 593 - description: JWT Token
614 in: header 594 in: header
@@ -635,12 +615,12 @@ paths:
635 description: Unauthorized 615 description: Unauthorized
636 schema: 616 schema:
637 $ref: '#/definitions/models.Response' 617 $ref: '#/definitions/models.Response'
638 summary: Get profile page of session user.
639 tags: 618 tags:
640 - users 619 - users
641 post: 620 post:
642 consumes: 621 consumes:
643 - application/json 622 - application/json
623 description: Update profile page of session user.
644 parameters: 624 parameters:
645 - description: JWT Token 625 - description: JWT Token
646 in: header 626 in: header
@@ -667,12 +647,12 @@ paths:
667 description: Unauthorized 647 description: Unauthorized
668 schema: 648 schema:
669 $ref: '#/definitions/models.Response' 649 $ref: '#/definitions/models.Response'
670 summary: Update profile page of session user.
671 tags: 650 tags:
672 - users 651 - users
673 put: 652 put:
674 consumes: 653 consumes:
675 - application/json 654 - application/json
655 description: Update country code of session user.
676 parameters: 656 parameters:
677 - description: JWT Token 657 - description: JWT Token
678 in: header 658 in: header
@@ -699,11 +679,32 @@ paths:
699 description: Unauthorized 679 description: Unauthorized
700 schema: 680 schema:
701 $ref: '#/definitions/models.Response' 681 $ref: '#/definitions/models.Response'
702 summary: Update country code of session user.
703 tags: 682 tags:
704 - users 683 - users
684 /rankings:
685 get:
686 description: Get rankings of every player.
687 produces:
688 - application/json
689 responses:
690 "200":
691 description: OK
692 schema:
693 allOf:
694 - $ref: '#/definitions/models.Response'
695 - properties:
696 data:
697 $ref: '#/definitions/models.RankingsResponse'
698 type: object
699 "400":
700 description: Bad Request
701 schema:
702 $ref: '#/definitions/models.Response'
703 tags:
704 - rankings
705 /search: 705 /search:
706 get: 706 get:
707 description: Get all user and map data matching to the query.
707 parameters: 708 parameters:
708 - description: Search user or map name. 709 - description: Search user or map name.
709 in: query 710 in: query
@@ -725,11 +726,11 @@ paths:
725 description: Bad Request 726 description: Bad Request
726 schema: 727 schema:
727 $ref: '#/definitions/models.Response' 728 $ref: '#/definitions/models.Response'
728 summary: Get all user and map data matching to the query.
729 tags: 729 tags:
730 - search 730 - search
731 /token: 731 /token:
732 delete: 732 delete:
733 description: Deletes the token cookie from the user.
733 produces: 734 produces:
734 - application/json 735 - application/json
735 responses: 736 responses:
@@ -746,10 +747,10 @@ paths:
746 description: Not Found 747 description: Not Found
747 schema: 748 schema:
748 $ref: '#/definitions/models.Response' 749 $ref: '#/definitions/models.Response'
749 summary: Deletes the token cookie from the user.
750 tags: 750 tags:
751 - auth 751 - auth
752 get: 752 get:
753 description: Gets the token cookie value from the user.
753 produces: 754 produces:
754 - application/json 755 - application/json
755 responses: 756 responses:
@@ -766,13 +767,13 @@ paths:
766 description: Not Found 767 description: Not Found
767 schema: 768 schema:
768 $ref: '#/definitions/models.Response' 769 $ref: '#/definitions/models.Response'
769 summary: Gets the token cookie value from the user.
770 tags: 770 tags:
771 - auth 771 - auth
772 /users/{id}: 772 /users/{id}:
773 get: 773 get:
774 consumes: 774 consumes:
775 - application/json 775 - application/json
776 description: Get profile page of another user.
776 parameters: 777 parameters:
777 - description: User ID 778 - description: User ID
778 in: path 779 in: path
@@ -799,7 +800,6 @@ paths:
799 description: Not Found 800 description: Not Found
800 schema: 801 schema:
801 $ref: '#/definitions/models.Response' 802 $ref: '#/definitions/models.Response'
802 summary: Get profile page of another user.
803 tags: 803 tags:
804 - users 804 - users
805swagger: "2.0" 805swagger: "2.0"