aboutsummaryrefslogtreecommitdiff
path: root/docs/swagger.json
diff options
context:
space:
mode:
Diffstat (limited to 'docs/swagger.json')
-rw-r--r--docs/swagger.json204
1 files changed, 190 insertions, 14 deletions
diff --git a/docs/swagger.json b/docs/swagger.json
index 9ed27d5..e4bbb59 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -19,6 +19,46 @@
19 "application/json" 19 "application/json"
20 ], 20 ],
21 "produces": [ 21 "produces": [
22 "application/json"
23 ],
24 "tags": [
25 "rankings"
26 ],
27 "summary": "Get rankings of every player.",
28 "responses": {
29 "200": {
30 "description": "OK",
31 "schema": {
32 "allOf": [
33 {
34 "$ref": "#/definitions/models.Response"
35 },
36 {
37 "type": "object",
38 "properties": {
39 "data": {
40 "$ref": "#/definitions/models.RankingsResponse"
41 }
42 }
43 }
44 ]
45 }
46 },
47 "400": {
48 "description": "Bad Request",
49 "schema": {
50 "$ref": "#/definitions/models.Response"
51 }
52 }
53 }
54 }
55 },
56 "/demos": {
57 "get": {
58 "consumes": [
59 "application/json"
60 ],
61 "produces": [
22 "application/octet-stream" 62 "application/octet-stream"
23 ], 63 ],
24 "tags": [ 64 "tags": [
@@ -30,7 +70,7 @@
30 "type": "integer", 70 "type": "integer",
31 "description": "Demo UUID", 71 "description": "Demo UUID",
32 "name": "uuid", 72 "name": "uuid",
33 "in": "path", 73 "in": "query",
34 "required": true 74 "required": true
35 } 75 }
36 ], 76 ],
@@ -90,7 +130,7 @@
90 } 130 }
91 } 131 }
92 }, 132 },
93 "/maps/{id}": { 133 "/maps/{id}/leaderboards": {
94 "get": { 134 "get": {
95 "consumes": [ 135 "consumes": [
96 "application/json" 136 "application/json"
@@ -101,7 +141,7 @@
101 "tags": [ 141 "tags": [
102 "maps" 142 "maps"
103 ], 143 ],
104 "summary": "Get map page with specified id.", 144 "summary": "Get map leaderboards with specified id.",
105 "parameters": [ 145 "parameters": [
106 { 146 {
107 "type": "integer", 147 "type": "integer",
@@ -123,7 +163,19 @@
123 "type": "object", 163 "type": "object",
124 "properties": { 164 "properties": {
125 "data": { 165 "data": {
126 "$ref": "#/definitions/models.Map" 166 "allOf": [
167 {
168 "$ref": "#/definitions/models.Map"
169 },
170 {
171 "type": "object",
172 "properties": {
173 "data": {
174 "$ref": "#/definitions/models.MapRecords"
175 }
176 }
177 }
178 ]
127 } 179 }
128 } 180 }
129 } 181 }
@@ -232,6 +284,67 @@
232 } 284 }
233 } 285 }
234 }, 286 },
287 "/maps/{id}/summary": {
288 "get": {
289 "consumes": [
290 "application/json"
291 ],
292 "produces": [
293 "application/json"
294 ],
295 "tags": [
296 "maps"
297 ],
298 "summary": "Get map summary with specified id.",
299 "parameters": [
300 {
301 "type": "integer",
302 "description": "Map ID",
303 "name": "id",
304 "in": "path",
305 "required": true
306 }
307 ],
308 "responses": {
309 "200": {
310 "description": "OK",
311 "schema": {
312 "allOf": [
313 {
314 "$ref": "#/definitions/models.Response"
315 },
316 {
317 "type": "object",
318 "properties": {
319 "data": {
320 "allOf": [
321 {
322 "$ref": "#/definitions/models.Map"
323 },
324 {
325 "type": "object",
326 "properties": {
327 "data": {
328 "$ref": "#/definitions/models.MapSummary"
329 }
330 }
331 }
332 ]
333 }
334 }
335 }
336 ]
337 }
338 },
339 "400": {
340 "description": "Bad Request",
341 "schema": {
342 "$ref": "#/definitions/models.Response"
343 }
344 }
345 }
346 }
347 },
235 "/profile": { 348 "/profile": {
236 "get": { 349 "get": {
237 "consumes": [ 350 "consumes": [
@@ -400,7 +513,7 @@
400 } 513 }
401 } 514 }
402 }, 515 },
403 "/user/{id}": { 516 "/users/{id}": {
404 "get": { 517 "get": {
405 "consumes": [ 518 "consumes": [
406 "application/json" 519 "application/json"
@@ -468,24 +581,87 @@
468 "models.Map": { 581 "models.Map": {
469 "type": "object", 582 "type": "object",
470 "properties": { 583 "properties": {
584 "chapter_name": {
585 "type": "string"
586 },
587 "data": {},
588 "game_name": {
589 "type": "string"
590 },
471 "id": { 591 "id": {
472 "type": "integer" 592 "type": "integer"
473 }, 593 },
474 "is_coop": { 594 "map_name": {
475 "type": "boolean"
476 },
477 "name": {
478 "type": "string" 595 "type": "string"
596 }
597 }
598 },
599 "models.MapCategoryScores": {
600 "type": "object",
601 "properties": {
602 "any": {
603 "type": "integer"
604 },
605 "cm": {
606 "type": "integer"
607 },
608 "inbounds_sla": {
609 "type": "integer"
479 }, 610 },
480 "records": {}, 611 "no_sla": {
481 "wr_score": {
482 "type": "integer" 612 "type": "integer"
613 }
614 }
615 },
616 "models.MapHistory": {
617 "type": "object",
618 "properties": {
619 "date": {
620 "type": "string"
621 },
622 "runner_name": {
623 "type": "string"
483 }, 624 },
484 "wr_time": { 625 "score_count": {
485 "type": "integer" 626 "type": "integer"
486 } 627 }
487 } 628 }
488 }, 629 },
630 "models.MapRecords": {
631 "type": "object",
632 "properties": {
633 "records": {}
634 }
635 },
636 "models.MapSummary": {
637 "type": "object",
638 "properties": {
639 "category_scores": {
640 "$ref": "#/definitions/models.MapCategoryScores"
641 },
642 "description": {
643 "type": "string"
644 },
645 "history": {
646 "type": "array",
647 "items": {
648 "$ref": "#/definitions/models.MapHistory"
649 }
650 },
651 "rating": {
652 "type": "number"
653 },
654 "routers": {
655 "type": "array",
656 "items": {
657 "type": "string"
658 }
659 },
660 "showcase": {
661 "type": "string"
662 }
663 }
664 },
489 "models.ProfileResponse": { 665 "models.ProfileResponse": {
490 "type": "object", 666 "type": "object",
491 "properties": { 667 "properties": {
@@ -513,7 +689,7 @@
513 "steam_id": { 689 "steam_id": {
514 "type": "string" 690 "type": "string"
515 }, 691 },
516 "username": { 692 "user_name": {
517 "type": "string" 693 "type": "string"
518 } 694 }
519 } 695 }
@@ -588,7 +764,7 @@
588 "user_id": { 764 "user_id": {
589 "type": "string" 765 "type": "string"
590 }, 766 },
591 "username": { 767 "user_name": {
592 "type": "string" 768 "type": "string"
593 } 769 }
594 } 770 }