aboutsummaryrefslogtreecommitdiff
path: root/docs/docs.go
diff options
context:
space:
mode:
Diffstat (limited to 'docs/docs.go')
-rw-r--r--docs/docs.go246
1 files changed, 239 insertions, 7 deletions
diff --git a/docs/docs.go b/docs/docs.go
index 22d4362..cd129f0 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -20,6 +20,52 @@ const docTemplate = `{
20 "host": "{{.Host}}", 20 "host": "{{.Host}}",
21 "basePath": "{{.BasePath}}", 21 "basePath": "{{.BasePath}}",
22 "paths": { 22 "paths": {
23 "/chapters/{id}": {
24 "get": {
25 "produces": [
26 "application/json"
27 ],
28 "tags": [
29 "games \u0026 chapters"
30 ],
31 "summary": "Get maps from the specified chapter id.",
32 "parameters": [
33 {
34 "type": "integer",
35 "description": "Chapter ID",
36 "name": "id",
37 "in": "path",
38 "required": true
39 }
40 ],
41 "responses": {
42 "200": {
43 "description": "OK",
44 "schema": {
45 "allOf": [
46 {
47 "$ref": "#/definitions/models.Response"
48 },
49 {
50 "type": "object",
51 "properties": {
52 "data": {
53 "$ref": "#/definitions/models.ChapterMapsResponse"
54 }
55 }
56 }
57 ]
58 }
59 },
60 "400": {
61 "description": "Bad Request",
62 "schema": {
63 "$ref": "#/definitions/models.Response"
64 }
65 }
66 }
67 }
68 },
23 "/demo": { 69 "/demo": {
24 "get": { 70 "get": {
25 "produces": [ 71 "produces": [
@@ -94,6 +140,92 @@ const docTemplate = `{
94 } 140 }
95 } 141 }
96 }, 142 },
143 "/games": {
144 "get": {
145 "produces": [
146 "application/json"
147 ],
148 "tags": [
149 "games \u0026 chapters"
150 ],
151 "summary": "Get games from the leaderboards.",
152 "responses": {
153 "200": {
154 "description": "OK",
155 "schema": {
156 "allOf": [
157 {
158 "$ref": "#/definitions/models.Response"
159 },
160 {
161 "type": "object",
162 "properties": {
163 "data": {
164 "type": "array",
165 "items": {
166 "$ref": "#/definitions/models.Game"
167 }
168 }
169 }
170 }
171 ]
172 }
173 },
174 "400": {
175 "description": "Bad Request",
176 "schema": {
177 "$ref": "#/definitions/models.Response"
178 }
179 }
180 }
181 }
182 },
183 "/games/{id}": {
184 "get": {
185 "produces": [
186 "application/json"
187 ],
188 "tags": [
189 "games \u0026 chapters"
190 ],
191 "summary": "Get chapters from the specified game id.",
192 "parameters": [
193 {
194 "type": "integer",
195 "description": "Game ID",
196 "name": "id",
197 "in": "path",
198 "required": true
199 }
200 ],
201 "responses": {
202 "200": {
203 "description": "OK",
204 "schema": {
205 "allOf": [
206 {
207 "$ref": "#/definitions/models.Response"
208 },
209 {
210 "type": "object",
211 "properties": {
212 "data": {
213 "$ref": "#/definitions/models.ChaptersResponse"
214 }
215 }
216 }
217 ]
218 }
219 },
220 "400": {
221 "description": "Bad Request",
222 "schema": {
223 "$ref": "#/definitions/models.Response"
224 }
225 }
226 }
227 }
228 },
97 "/login": { 229 "/login": {
98 "get": { 230 "get": {
99 "consumes": [ 231 "consumes": [
@@ -136,9 +268,6 @@ const docTemplate = `{
136 }, 268 },
137 "/maps/{id}/leaderboards": { 269 "/maps/{id}/leaderboards": {
138 "get": { 270 "get": {
139 "consumes": [
140 "application/json"
141 ],
142 "produces": [ 271 "produces": [
143 "application/json" 272 "application/json"
144 ], 273 ],
@@ -290,9 +419,6 @@ const docTemplate = `{
290 }, 419 },
291 "/maps/{id}/summary": { 420 "/maps/{id}/summary": {
292 "get": { 421 "get": {
293 "consumes": [
294 "application/json"
295 ],
296 "produces": [ 422 "produces": [
297 "application/json" 423 "application/json"
298 ], 424 ],
@@ -530,7 +656,19 @@ const docTemplate = `{
530 "200": { 656 "200": {
531 "description": "OK", 657 "description": "OK",
532 "schema": { 658 "schema": {
533 "$ref": "#/definitions/models.Response" 659 "allOf": [
660 {
661 "$ref": "#/definitions/models.Response"
662 },
663 {
664 "type": "object",
665 "properties": {
666 "data": {
667 "$ref": "#/definitions/models.SearchResponse"
668 }
669 }
670 }
671 ]
534 } 672 }
535 }, 673 },
536 "400": { 674 "400": {
@@ -599,6 +737,56 @@ const docTemplate = `{
599 } 737 }
600 }, 738 },
601 "definitions": { 739 "definitions": {
740 "models.Chapter": {
741 "type": "object",
742 "properties": {
743 "id": {
744 "type": "integer"
745 },
746 "name": {
747 "type": "string"
748 }
749 }
750 },
751 "models.ChapterMapsResponse": {
752 "type": "object",
753 "properties": {
754 "chapter": {
755 "$ref": "#/definitions/models.Chapter"
756 },
757 "maps": {
758 "type": "array",
759 "items": {
760 "$ref": "#/definitions/models.MapShort"
761 }
762 }
763 }
764 },
765 "models.ChaptersResponse": {
766 "type": "object",
767 "properties": {
768 "chapters": {
769 "type": "array",
770 "items": {
771 "$ref": "#/definitions/models.Chapter"
772 }
773 },
774 "game": {
775 "$ref": "#/definitions/models.Game"
776 }
777 }
778 },
779 "models.Game": {
780 "type": "object",
781 "properties": {
782 "id": {
783 "type": "integer"
784 },
785 "name": {
786 "type": "string"
787 }
788 }
789 },
602 "models.LoginResponse": { 790 "models.LoginResponse": {
603 "type": "object", 791 "type": "object",
604 "properties": { 792 "properties": {
@@ -662,6 +850,17 @@ const docTemplate = `{
662 "records": {} 850 "records": {}
663 } 851 }
664 }, 852 },
853 "models.MapShort": {
854 "type": "object",
855 "properties": {
856 "id": {
857 "type": "integer"
858 },
859 "name": {
860 "type": "string"
861 }
862 }
863 },
665 "models.MapSummary": { 864 "models.MapSummary": {
666 "type": "object", 865 "type": "object",
667 "properties": { 866 "properties": {
@@ -784,6 +983,39 @@ const docTemplate = `{
784 "records": {} 983 "records": {}
785 } 984 }
786 }, 985 },
986 "models.SearchResponse": {
987 "type": "object",
988 "properties": {
989 "maps": {
990 "type": "array",
991 "items": {
992 "type": "object",
993 "properties": {
994 "id": {
995 "type": "integer"
996 },
997 "name": {
998 "type": "string"
999 }
1000 }
1001 }
1002 },
1003 "players": {
1004 "type": "array",
1005 "items": {
1006 "type": "object",
1007 "properties": {
1008 "steam_id": {
1009 "type": "string"
1010 },
1011 "user_name": {
1012 "type": "string"
1013 }
1014 }
1015 }
1016 }
1017 }
1018 },
787 "models.UserRanking": { 1019 "models.UserRanking": {
788 "type": "object", 1020 "type": "object",
789 "properties": { 1021 "properties": {