diff options
Diffstat (limited to 'docs/swagger.json')
| -rw-r--r-- | docs/swagger.json | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/docs/swagger.json b/docs/swagger.json index 3530d2c..ef422ab 100644 --- a/docs/swagger.json +++ b/docs/swagger.json | |||
| @@ -15,13 +15,13 @@ | |||
| 15 | "paths": { | 15 | "paths": { |
| 16 | "/chapters/{id}": { | 16 | "/chapters/{id}": { |
| 17 | "get": { | 17 | "get": { |
| 18 | "description": "Get maps from the specified chapter id.", | ||
| 18 | "produces": [ | 19 | "produces": [ |
| 19 | "application/json" | 20 | "application/json" |
| 20 | ], | 21 | ], |
| 21 | "tags": [ | 22 | "tags": [ |
| 22 | "games \u0026 chapters" | 23 | "games \u0026 chapters" |
| 23 | ], | 24 | ], |
| 24 | "summary": "Get maps from the specified chapter id.", | ||
| 25 | "parameters": [ | 25 | "parameters": [ |
| 26 | { | 26 | { |
| 27 | "type": "integer", | 27 | "type": "integer", |
| @@ -59,45 +59,9 @@ | |||
| 59 | } | 59 | } |
| 60 | } | 60 | } |
| 61 | }, | 61 | }, |
| 62 | "/demo": { | ||
| 63 | "get": { | ||
| 64 | "produces": [ | ||
| 65 | "application/json" | ||
| 66 | ], | ||
| 67 | "tags": [ | ||
| 68 | "rankings" | ||
| 69 | ], | ||
| 70 | "summary": "Get rankings of every player.", | ||
| 71 | "responses": { | ||
| 72 | "200": { | ||
| 73 | "description": "OK", | ||
| 74 | "schema": { | ||
| 75 | "allOf": [ | ||
| 76 | { | ||
| 77 | "$ref": "#/definitions/models.Response" | ||
| 78 | }, | ||
| 79 | { | ||
| 80 | "type": "object", | ||
| 81 | "properties": { | ||
| 82 | "data": { | ||
| 83 | "$ref": "#/definitions/models.RankingsResponse" | ||
| 84 | } | ||
| 85 | } | ||
| 86 | } | ||
| 87 | ] | ||
| 88 | } | ||
| 89 | }, | ||
| 90 | "400": { | ||
| 91 | "description": "Bad Request", | ||
| 92 | "schema": { | ||
| 93 | "$ref": "#/definitions/models.Response" | ||
| 94 | } | ||
| 95 | } | ||
| 96 | } | ||
| 97 | } | ||
| 98 | }, | ||
| 99 | "/demos": { | 62 | "/demos": { |
| 100 | "get": { | 63 | "get": { |
| 64 | "description": "Get demo with specified demo uuid.", | ||
| 101 | "consumes": [ | 65 | "consumes": [ |
| 102 | "application/json" | 66 | "application/json" |
| 103 | ], | 67 | ], |
| @@ -107,10 +71,9 @@ | |||
| 107 | "tags": [ | 71 | "tags": [ |
| 108 | "demo" | 72 | "demo" |
| 109 | ], | 73 | ], |
| 110 | "summary": "Get demo with specified demo uuid.", | ||
| 111 | "parameters": [ | 74 | "parameters": [ |
| 112 | { | 75 | { |
| 113 | "type": "integer", | 76 | "type": "string", |
| 114 | "description": "Demo UUID", | 77 | "description": "Demo UUID", |
| 115 | "name": "uuid", | 78 | "name": "uuid", |
| 116 | "in": "query", | 79 | "in": "query", |
| @@ -135,13 +98,13 @@ | |||
| 135 | }, | 98 | }, |
| 136 | "/games": { | 99 | "/games": { |
| 137 | "get": { | 100 | "get": { |
| 101 | "description": "Get games from the leaderboards.", | ||
| 138 | "produces": [ | 102 | "produces": [ |
| 139 | "application/json" | 103 | "application/json" |
| 140 | ], | 104 | ], |
| 141 | "tags": [ | 105 | "tags": [ |
| 142 | "games \u0026 chapters" | 106 | "games \u0026 chapters" |
| 143 | ], | 107 | ], |
| 144 | "summary": "Get games from the leaderboards.", | ||
| 145 | "responses": { | 108 | "responses": { |
| 146 | "200": { | 109 | "200": { |
| 147 | "description": "OK", | 110 | "description": "OK", |
| @@ -175,13 +138,13 @@ | |||
| 175 | }, | 138 | }, |
| 176 | "/games/{id}": { | 139 | "/games/{id}": { |
| 177 | "get": { | 140 | "get": { |
| 141 | "description": "Get chapters from the specified game id.", | ||
| 178 | "produces": [ | 142 | "produces": [ |
| 179 | "application/json" | 143 | "application/json" |
| 180 | ], | 144 | ], |
| 181 | "tags": [ | 145 | "tags": [ |
| 182 | "games \u0026 chapters" | 146 | "games \u0026 chapters" |
| 183 | ], | 147 | ], |
| 184 | "summary": "Get chapters from the specified game id.", | ||
| 185 | "parameters": [ | 148 | "parameters": [ |
| 186 | { | 149 | { |
| 187 | "type": "integer", | 150 | "type": "integer", |
| @@ -221,6 +184,7 @@ | |||
| 221 | }, | 184 | }, |
| 222 | "/login": { | 185 | "/login": { |
| 223 | "get": { | 186 | "get": { |
| 187 | "description": "Get (redirect) login page for Steam auth.", | ||
| 224 | "consumes": [ | 188 | "consumes": [ |
| 225 | "application/json" | 189 | "application/json" |
| 226 | ], | 190 | ], |
| @@ -230,7 +194,6 @@ | |||
| 230 | "tags": [ | 194 | "tags": [ |
| 231 | "login" | 195 | "login" |
| 232 | ], | 196 | ], |
| 233 | "summary": "Get (redirect) login page for Steam auth.", | ||
| 234 | "responses": { | 197 | "responses": { |
| 235 | "200": { | 198 | "200": { |
| 236 | "description": "OK", | 199 | "description": "OK", |
| @@ -261,13 +224,13 @@ | |||
| 261 | }, | 224 | }, |
| 262 | "/maps/{id}/leaderboards": { | 225 | "/maps/{id}/leaderboards": { |
| 263 | "get": { | 226 | "get": { |
| 227 | "description": "Get map leaderboards with specified id.", | ||
| 264 | "produces": [ | 228 | "produces": [ |
| 265 | "application/json" | 229 | "application/json" |
| 266 | ], | 230 | ], |
| 267 | "tags": [ | 231 | "tags": [ |
| 268 | "maps" | 232 | "maps" |
| 269 | ], | 233 | ], |
| 270 | "summary": "Get map leaderboards with specified id.", | ||
| 271 | "parameters": [ | 234 | "parameters": [ |
| 272 | { | 235 | { |
| 273 | "type": "integer", | 236 | "type": "integer", |
| @@ -319,6 +282,7 @@ | |||
| 319 | }, | 282 | }, |
| 320 | "/maps/{id}/record": { | 283 | "/maps/{id}/record": { |
| 321 | "post": { | 284 | "post": { |
| 285 | "description": "Post record with demo of a specific map.", | ||
| 322 | "consumes": [ | 286 | "consumes": [ |
| 323 | "multipart/form-data" | 287 | "multipart/form-data" |
| 324 | ], | 288 | ], |
| @@ -328,7 +292,6 @@ | |||
| 328 | "tags": [ | 292 | "tags": [ |
| 329 | "maps" | 293 | "maps" |
| 330 | ], | 294 | ], |
| 331 | "summary": "Post record with demo of a specific map.", | ||
| 332 | "parameters": [ | 295 | "parameters": [ |
| 333 | { | 296 | { |
| 334 | "type": "integer", | 297 | "type": "integer", |
| @@ -394,13 +357,13 @@ | |||
| 394 | }, | 357 | }, |
| 395 | "/maps/{id}/summary": { | 358 | "/maps/{id}/summary": { |
| 396 | "get": { | 359 | "get": { |
| 360 | "description": "Get map summary with specified id.", | ||
| 397 | "produces": [ | 361 | "produces": [ |
| 398 | "application/json" | 362 | "application/json" |
| 399 | ], | 363 | ], |
| 400 | "tags": [ | 364 | "tags": [ |
| 401 | "maps" | 365 | "maps" |
| 402 | ], | 366 | ], |
| 403 | "summary": "Get map summary with specified id.", | ||
| 404 | "parameters": [ | 367 | "parameters": [ |
| 405 | { | 368 | { |
| 406 | "type": "integer", | 369 | "type": "integer", |
| @@ -438,13 +401,13 @@ | |||
| 438 | } | 401 | } |
| 439 | }, | 402 | }, |
| 440 | "put": { | 403 | "put": { |
| 404 | "description": "Edit map summary with specified map id.", | ||
| 441 | "produces": [ | 405 | "produces": [ |
| 442 | "application/json" | 406 | "application/json" |
| 443 | ], | 407 | ], |
| 444 | "tags": [ | 408 | "tags": [ |
| 445 | "maps" | 409 | "maps" |
| 446 | ], | 410 | ], |
| 447 | "summary": "Edit map summary with specified map id.", | ||
| 448 | "parameters": [ | 411 | "parameters": [ |
| 449 | { | 412 | { |
| 450 | "type": "string", | 413 | "type": "string", |
| @@ -498,13 +461,13 @@ | |||
| 498 | } | 461 | } |
| 499 | }, | 462 | }, |
| 500 | "post": { | 463 | "post": { |
| 464 | "description": "Create map summary with specified map id.", | ||
| 501 | "produces": [ | 465 | "produces": [ |
| 502 | "application/json" | 466 | "application/json" |
| 503 | ], | 467 | ], |
| 504 | "tags": [ | 468 | "tags": [ |
| 505 | "maps" | 469 | "maps" |
| 506 | ], | 470 | ], |
| 507 | "summary": "Create map summary with specified map id.", | ||
| 508 | "parameters": [ | 471 | "parameters": [ |
| 509 | { | 472 | { |
| 510 | "type": "string", | 473 | "type": "string", |
| @@ -558,13 +521,13 @@ | |||
| 558 | } | 521 | } |
| 559 | }, | 522 | }, |
| 560 | "delete": { | 523 | "delete": { |
| 524 | "description": "Delete map summary with specified map id.", | ||
| 561 | "produces": [ | 525 | "produces": [ |
| 562 | "application/json" | 526 | "application/json" |
| 563 | ], | 527 | ], |
| 564 | "tags": [ | 528 | "tags": [ |
| 565 | "maps" | 529 | "maps" |
| 566 | ], | 530 | ], |
| 567 | "summary": "Delete map summary with specified map id.", | ||
| 568 | "parameters": [ | 531 | "parameters": [ |
| 569 | { | 532 | { |
| 570 | "type": "string", | 533 | "type": "string", |
| @@ -620,6 +583,7 @@ | |||
| 620 | }, | 583 | }, |
| 621 | "/profile": { | 584 | "/profile": { |
| 622 | "get": { | 585 | "get": { |
| 586 | "description": "Get profile page of session user.", | ||
| 623 | "consumes": [ | 587 | "consumes": [ |
| 624 | "application/json" | 588 | "application/json" |
| 625 | ], | 589 | ], |
| @@ -629,7 +593,6 @@ | |||
| 629 | "tags": [ | 593 | "tags": [ |
| 630 | "users" | 594 | "users" |
| 631 | ], | 595 | ], |
| 632 | "summary": "Get profile page of session user.", | ||
| 633 | "parameters": [ | 596 | "parameters": [ |
| 634 | { | 597 | { |
| 635 | "type": "string", | 598 | "type": "string", |
| @@ -673,6 +636,7 @@ | |||
| 673 | } | 636 | } |
| 674 | }, | 637 | }, |
| 675 | "put": { | 638 | "put": { |
| 639 | "description": "Update country code of session user.", | ||
| 676 | "consumes": [ | 640 | "consumes": [ |
| 677 | "application/json" | 641 | "application/json" |
| 678 | ], | 642 | ], |
| @@ -682,7 +646,6 @@ | |||
| 682 | "tags": [ | 646 | "tags": [ |
| 683 | "users" | 647 | "users" |
| 684 | ], | 648 | ], |
| 685 | "summary": "Update country code of session user.", | ||
| 686 | "parameters": [ | 649 | "parameters": [ |
| 687 | { | 650 | { |
| 688 | "type": "string", | 651 | "type": "string", |
| @@ -721,6 +684,7 @@ | |||
| 721 | } | 684 | } |
| 722 | }, | 685 | }, |
| 723 | "post": { | 686 | "post": { |
| 687 | "description": "Update profile page of session user.", | ||
| 724 | "consumes": [ | 688 | "consumes": [ |
| 725 | "application/json" | 689 | "application/json" |
| 726 | ], | 690 | ], |
| @@ -730,7 +694,6 @@ | |||
| 730 | "tags": [ | 694 | "tags": [ |
| 731 | "users" | 695 | "users" |
| 732 | ], | 696 | ], |
| 733 | "summary": "Update profile page of session user.", | ||
| 734 | "parameters": [ | 697 | "parameters": [ |
| 735 | { | 698 | { |
| 736 | "type": "string", | 699 | "type": "string", |
| @@ -774,15 +737,52 @@ | |||
| 774 | } | 737 | } |
| 775 | } | 738 | } |
| 776 | }, | 739 | }, |
| 740 | "/rankings": { | ||
| 741 | "get": { | ||
| 742 | "description": "Get rankings of every player.", | ||
| 743 | "produces": [ | ||
| 744 | "application/json" | ||
| 745 | ], | ||
| 746 | "tags": [ | ||
| 747 | "rankings" | ||
| 748 | ], | ||
| 749 | "responses": { | ||
| 750 | "200": { | ||
| 751 | "description": "OK", | ||
| 752 | "schema": { | ||
| 753 | "allOf": [ | ||
| 754 | { | ||
| 755 | "$ref": "#/definitions/models.Response" | ||
| 756 | }, | ||
| 757 | { | ||
| 758 | "type": "object", | ||
| 759 | "properties": { | ||
| 760 | "data": { | ||
| 761 | "$ref": "#/definitions/models.RankingsResponse" | ||
| 762 | } | ||
| 763 | } | ||
| 764 | } | ||
| 765 | ] | ||
| 766 | } | ||
| 767 | }, | ||
| 768 | "400": { | ||
| 769 | "description": "Bad Request", | ||
| 770 | "schema": { | ||
| 771 | "$ref": "#/definitions/models.Response" | ||
| 772 | } | ||
| 773 | } | ||
| 774 | } | ||
| 775 | } | ||
| 776 | }, | ||
| 777 | "/search": { | 777 | "/search": { |
| 778 | "get": { | 778 | "get": { |
| 779 | "description": "Get all user and map data matching to the query.", | ||
| 779 | "produces": [ | 780 | "produces": [ |
| 780 | "application/json" | 781 | "application/json" |
| 781 | ], | 782 | ], |
| 782 | "tags": [ | 783 | "tags": [ |
| 783 | "search" | 784 | "search" |
| 784 | ], | 785 | ], |
| 785 | "summary": "Get all user and map data matching to the query.", | ||
| 786 | "parameters": [ | 786 | "parameters": [ |
| 787 | { | 787 | { |
| 788 | "type": "string", | 788 | "type": "string", |
| @@ -821,13 +821,13 @@ | |||
| 821 | }, | 821 | }, |
| 822 | "/token": { | 822 | "/token": { |
| 823 | "get": { | 823 | "get": { |
| 824 | "description": "Gets the token cookie value from the user.", | ||
| 824 | "produces": [ | 825 | "produces": [ |
| 825 | "application/json" | 826 | "application/json" |
| 826 | ], | 827 | ], |
| 827 | "tags": [ | 828 | "tags": [ |
| 828 | "auth" | 829 | "auth" |
| 829 | ], | 830 | ], |
| 830 | "summary": "Gets the token cookie value from the user.", | ||
| 831 | "responses": { | 831 | "responses": { |
| 832 | "200": { | 832 | "200": { |
| 833 | "description": "OK", | 833 | "description": "OK", |
| @@ -856,13 +856,13 @@ | |||
| 856 | } | 856 | } |
| 857 | }, | 857 | }, |
| 858 | "delete": { | 858 | "delete": { |
| 859 | "description": "Deletes the token cookie from the user.", | ||
| 859 | "produces": [ | 860 | "produces": [ |
| 860 | "application/json" | 861 | "application/json" |
| 861 | ], | 862 | ], |
| 862 | "tags": [ | 863 | "tags": [ |
| 863 | "auth" | 864 | "auth" |
| 864 | ], | 865 | ], |
| 865 | "summary": "Deletes the token cookie from the user.", | ||
| 866 | "responses": { | 866 | "responses": { |
| 867 | "200": { | 867 | "200": { |
| 868 | "description": "OK", | 868 | "description": "OK", |
| @@ -893,6 +893,7 @@ | |||
| 893 | }, | 893 | }, |
| 894 | "/users/{id}": { | 894 | "/users/{id}": { |
| 895 | "get": { | 895 | "get": { |
| 896 | "description": "Get profile page of another user.", | ||
| 896 | "consumes": [ | 897 | "consumes": [ |
| 897 | "application/json" | 898 | "application/json" |
| 898 | ], | 899 | ], |
| @@ -902,7 +903,6 @@ | |||
| 902 | "tags": [ | 903 | "tags": [ |
| 903 | "users" | 904 | "users" |
| 904 | ], | 905 | ], |
| 905 | "summary": "Get profile page of another user.", | ||
| 906 | "parameters": [ | 906 | "parameters": [ |
| 907 | { | 907 | { |
| 908 | "type": "integer", | 908 | "type": "integer", |