aboutsummaryrefslogtreecommitdiff
path: root/docs/docs.go
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/docs.go
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/docs.go')
-rw-r--r--docs/docs.go112
1 files changed, 56 insertions, 56 deletions
diff --git a/docs/docs.go b/docs/docs.go
index bb14382..57984f4 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -22,13 +22,13 @@ const docTemplate = `{
22 "paths": { 22 "paths": {
23 "/chapters/{id}": { 23 "/chapters/{id}": {
24 "get": { 24 "get": {
25 "description": "Get maps from the specified chapter id.",
25 "produces": [ 26 "produces": [
26 "application/json" 27 "application/json"
27 ], 28 ],
28 "tags": [ 29 "tags": [
29 "games \u0026 chapters" 30 "games \u0026 chapters"
30 ], 31 ],
31 "summary": "Get maps from the specified chapter id.",
32 "parameters": [ 32 "parameters": [
33 { 33 {
34 "type": "integer", 34 "type": "integer",
@@ -66,45 +66,9 @@ const docTemplate = `{
66 } 66 }
67 } 67 }
68 }, 68 },
69 "/demo": {
70 "get": {
71 "produces": [
72 "application/json"
73 ],
74 "tags": [
75 "rankings"
76 ],
77 "summary": "Get rankings of every player.",
78 "responses": {
79 "200": {
80 "description": "OK",
81 "schema": {
82 "allOf": [
83 {
84 "$ref": "#/definitions/models.Response"
85 },
86 {
87 "type": "object",
88 "properties": {
89 "data": {
90 "$ref": "#/definitions/models.RankingsResponse"
91 }
92 }
93 }
94 ]
95 }
96 },
97 "400": {
98 "description": "Bad Request",
99 "schema": {
100 "$ref": "#/definitions/models.Response"
101 }
102 }
103 }
104 }
105 },
106 "/demos": { 69 "/demos": {
107 "get": { 70 "get": {
71 "description": "Get demo with specified demo uuid.",
108 "consumes": [ 72 "consumes": [
109 "application/json" 73 "application/json"
110 ], 74 ],
@@ -114,10 +78,9 @@ const docTemplate = `{
114 "tags": [ 78 "tags": [
115 "demo" 79 "demo"
116 ], 80 ],
117 "summary": "Get demo with specified demo uuid.",
118 "parameters": [ 81 "parameters": [
119 { 82 {
120 "type": "integer", 83 "type": "string",
121 "description": "Demo UUID", 84 "description": "Demo UUID",
122 "name": "uuid", 85 "name": "uuid",
123 "in": "query", 86 "in": "query",
@@ -142,13 +105,13 @@ const docTemplate = `{
142 }, 105 },
143 "/games": { 106 "/games": {
144 "get": { 107 "get": {
108 "description": "Get games from the leaderboards.",
145 "produces": [ 109 "produces": [
146 "application/json" 110 "application/json"
147 ], 111 ],
148 "tags": [ 112 "tags": [
149 "games \u0026 chapters" 113 "games \u0026 chapters"
150 ], 114 ],
151 "summary": "Get games from the leaderboards.",
152 "responses": { 115 "responses": {
153 "200": { 116 "200": {
154 "description": "OK", 117 "description": "OK",
@@ -182,13 +145,13 @@ const docTemplate = `{
182 }, 145 },
183 "/games/{id}": { 146 "/games/{id}": {
184 "get": { 147 "get": {
148 "description": "Get chapters from the specified game id.",
185 "produces": [ 149 "produces": [
186 "application/json" 150 "application/json"
187 ], 151 ],
188 "tags": [ 152 "tags": [
189 "games \u0026 chapters" 153 "games \u0026 chapters"
190 ], 154 ],
191 "summary": "Get chapters from the specified game id.",
192 "parameters": [ 155 "parameters": [
193 { 156 {
194 "type": "integer", 157 "type": "integer",
@@ -228,6 +191,7 @@ const docTemplate = `{
228 }, 191 },
229 "/login": { 192 "/login": {
230 "get": { 193 "get": {
194 "description": "Get (redirect) login page for Steam auth.",
231 "consumes": [ 195 "consumes": [
232 "application/json" 196 "application/json"
233 ], 197 ],
@@ -237,7 +201,6 @@ const docTemplate = `{
237 "tags": [ 201 "tags": [
238 "login" 202 "login"
239 ], 203 ],
240 "summary": "Get (redirect) login page for Steam auth.",
241 "responses": { 204 "responses": {
242 "200": { 205 "200": {
243 "description": "OK", 206 "description": "OK",
@@ -268,13 +231,13 @@ const docTemplate = `{
268 }, 231 },
269 "/maps/{id}/leaderboards": { 232 "/maps/{id}/leaderboards": {
270 "get": { 233 "get": {
234 "description": "Get map leaderboards with specified id.",
271 "produces": [ 235 "produces": [
272 "application/json" 236 "application/json"
273 ], 237 ],
274 "tags": [ 238 "tags": [
275 "maps" 239 "maps"
276 ], 240 ],
277 "summary": "Get map leaderboards with specified id.",
278 "parameters": [ 241 "parameters": [
279 { 242 {
280 "type": "integer", 243 "type": "integer",
@@ -326,6 +289,7 @@ const docTemplate = `{
326 }, 289 },
327 "/maps/{id}/record": { 290 "/maps/{id}/record": {
328 "post": { 291 "post": {
292 "description": "Post record with demo of a specific map.",
329 "consumes": [ 293 "consumes": [
330 "multipart/form-data" 294 "multipart/form-data"
331 ], 295 ],
@@ -335,7 +299,6 @@ const docTemplate = `{
335 "tags": [ 299 "tags": [
336 "maps" 300 "maps"
337 ], 301 ],
338 "summary": "Post record with demo of a specific map.",
339 "parameters": [ 302 "parameters": [
340 { 303 {
341 "type": "integer", 304 "type": "integer",
@@ -401,13 +364,13 @@ const docTemplate = `{
401 }, 364 },
402 "/maps/{id}/summary": { 365 "/maps/{id}/summary": {
403 "get": { 366 "get": {
367 "description": "Get map summary with specified id.",
404 "produces": [ 368 "produces": [
405 "application/json" 369 "application/json"
406 ], 370 ],
407 "tags": [ 371 "tags": [
408 "maps" 372 "maps"
409 ], 373 ],
410 "summary": "Get map summary with specified id.",
411 "parameters": [ 374 "parameters": [
412 { 375 {
413 "type": "integer", 376 "type": "integer",
@@ -445,13 +408,13 @@ const docTemplate = `{
445 } 408 }
446 }, 409 },
447 "put": { 410 "put": {
411 "description": "Edit map summary with specified map id.",
448 "produces": [ 412 "produces": [
449 "application/json" 413 "application/json"
450 ], 414 ],
451 "tags": [ 415 "tags": [
452 "maps" 416 "maps"
453 ], 417 ],
454 "summary": "Edit map summary with specified map id.",
455 "parameters": [ 418 "parameters": [
456 { 419 {
457 "type": "string", 420 "type": "string",
@@ -505,13 +468,13 @@ const docTemplate = `{
505 } 468 }
506 }, 469 },
507 "post": { 470 "post": {
471 "description": "Create map summary with specified map id.",
508 "produces": [ 472 "produces": [
509 "application/json" 473 "application/json"
510 ], 474 ],
511 "tags": [ 475 "tags": [
512 "maps" 476 "maps"
513 ], 477 ],
514 "summary": "Create map summary with specified map id.",
515 "parameters": [ 478 "parameters": [
516 { 479 {
517 "type": "string", 480 "type": "string",
@@ -565,13 +528,13 @@ const docTemplate = `{
565 } 528 }
566 }, 529 },
567 "delete": { 530 "delete": {
531 "description": "Delete map summary with specified map id.",
568 "produces": [ 532 "produces": [
569 "application/json" 533 "application/json"
570 ], 534 ],
571 "tags": [ 535 "tags": [
572 "maps" 536 "maps"
573 ], 537 ],
574 "summary": "Delete map summary with specified map id.",
575 "parameters": [ 538 "parameters": [
576 { 539 {
577 "type": "string", 540 "type": "string",
@@ -627,6 +590,7 @@ const docTemplate = `{
627 }, 590 },
628 "/profile": { 591 "/profile": {
629 "get": { 592 "get": {
593 "description": "Get profile page of session user.",
630 "consumes": [ 594 "consumes": [
631 "application/json" 595 "application/json"
632 ], 596 ],
@@ -636,7 +600,6 @@ const docTemplate = `{
636 "tags": [ 600 "tags": [
637 "users" 601 "users"
638 ], 602 ],
639 "summary": "Get profile page of session user.",
640 "parameters": [ 603 "parameters": [
641 { 604 {
642 "type": "string", 605 "type": "string",
@@ -680,6 +643,7 @@ const docTemplate = `{
680 } 643 }
681 }, 644 },
682 "put": { 645 "put": {
646 "description": "Update country code of session user.",
683 "consumes": [ 647 "consumes": [
684 "application/json" 648 "application/json"
685 ], 649 ],
@@ -689,7 +653,6 @@ const docTemplate = `{
689 "tags": [ 653 "tags": [
690 "users" 654 "users"
691 ], 655 ],
692 "summary": "Update country code of session user.",
693 "parameters": [ 656 "parameters": [
694 { 657 {
695 "type": "string", 658 "type": "string",
@@ -728,6 +691,7 @@ const docTemplate = `{
728 } 691 }
729 }, 692 },
730 "post": { 693 "post": {
694 "description": "Update profile page of session user.",
731 "consumes": [ 695 "consumes": [
732 "application/json" 696 "application/json"
733 ], 697 ],
@@ -737,7 +701,6 @@ const docTemplate = `{
737 "tags": [ 701 "tags": [
738 "users" 702 "users"
739 ], 703 ],
740 "summary": "Update profile page of session user.",
741 "parameters": [ 704 "parameters": [
742 { 705 {
743 "type": "string", 706 "type": "string",
@@ -781,15 +744,52 @@ const docTemplate = `{
781 } 744 }
782 } 745 }
783 }, 746 },
747 "/rankings": {
748 "get": {
749 "description": "Get rankings of every player.",
750 "produces": [
751 "application/json"
752 ],
753 "tags": [
754 "rankings"
755 ],
756 "responses": {
757 "200": {
758 "description": "OK",
759 "schema": {
760 "allOf": [
761 {
762 "$ref": "#/definitions/models.Response"
763 },
764 {
765 "type": "object",
766 "properties": {
767 "data": {
768 "$ref": "#/definitions/models.RankingsResponse"
769 }
770 }
771 }
772 ]
773 }
774 },
775 "400": {
776 "description": "Bad Request",
777 "schema": {
778 "$ref": "#/definitions/models.Response"
779 }
780 }
781 }
782 }
783 },
784 "/search": { 784 "/search": {
785 "get": { 785 "get": {
786 "description": "Get all user and map data matching to the query.",
786 "produces": [ 787 "produces": [
787 "application/json" 788 "application/json"
788 ], 789 ],
789 "tags": [ 790 "tags": [
790 "search" 791 "search"
791 ], 792 ],
792 "summary": "Get all user and map data matching to the query.",
793 "parameters": [ 793 "parameters": [
794 { 794 {
795 "type": "string", 795 "type": "string",
@@ -828,13 +828,13 @@ const docTemplate = `{
828 }, 828 },
829 "/token": { 829 "/token": {
830 "get": { 830 "get": {
831 "description": "Gets the token cookie value from the user.",
831 "produces": [ 832 "produces": [
832 "application/json" 833 "application/json"
833 ], 834 ],
834 "tags": [ 835 "tags": [
835 "auth" 836 "auth"
836 ], 837 ],
837 "summary": "Gets the token cookie value from the user.",
838 "responses": { 838 "responses": {
839 "200": { 839 "200": {
840 "description": "OK", 840 "description": "OK",
@@ -863,13 +863,13 @@ const docTemplate = `{
863 } 863 }
864 }, 864 },
865 "delete": { 865 "delete": {
866 "description": "Deletes the token cookie from the user.",
866 "produces": [ 867 "produces": [
867 "application/json" 868 "application/json"
868 ], 869 ],
869 "tags": [ 870 "tags": [
870 "auth" 871 "auth"
871 ], 872 ],
872 "summary": "Deletes the token cookie from the user.",
873 "responses": { 873 "responses": {
874 "200": { 874 "200": {
875 "description": "OK", 875 "description": "OK",
@@ -900,6 +900,7 @@ const docTemplate = `{
900 }, 900 },
901 "/users/{id}": { 901 "/users/{id}": {
902 "get": { 902 "get": {
903 "description": "Get profile page of another user.",
903 "consumes": [ 904 "consumes": [
904 "application/json" 905 "application/json"
905 ], 906 ],
@@ -909,7 +910,6 @@ const docTemplate = `{
909 "tags": [ 910 "tags": [
910 "users" 911 "users"
911 ], 912 ],
912 "summary": "Get profile page of another user.",
913 "parameters": [ 913 "parameters": [
914 { 914 {
915 "type": "integer", 915 "type": "integer",