diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/docs.go | 204 | ||||
| -rw-r--r-- | docs/swagger.json | 204 | ||||
| -rw-r--r-- | docs/swagger.yaml | 129 |
3 files changed, 496 insertions, 41 deletions
diff --git a/docs/docs.go b/docs/docs.go index f37cda2..9883679 100644 --- a/docs/docs.go +++ b/docs/docs.go | |||
| @@ -26,6 +26,46 @@ const docTemplate = `{ | |||
| 26 | "application/json" | 26 | "application/json" |
| 27 | ], | 27 | ], |
| 28 | "produces": [ | 28 | "produces": [ |
| 29 | "application/json" | ||
| 30 | ], | ||
| 31 | "tags": [ | ||
| 32 | "rankings" | ||
| 33 | ], | ||
| 34 | "summary": "Get rankings of every player.", | ||
| 35 | "responses": { | ||
| 36 | "200": { | ||
| 37 | "description": "OK", | ||
| 38 | "schema": { | ||
| 39 | "allOf": [ | ||
| 40 | { | ||
| 41 | "$ref": "#/definitions/models.Response" | ||
| 42 | }, | ||
| 43 | { | ||
| 44 | "type": "object", | ||
| 45 | "properties": { | ||
| 46 | "data": { | ||
| 47 | "$ref": "#/definitions/models.RankingsResponse" | ||
| 48 | } | ||
| 49 | } | ||
| 50 | } | ||
| 51 | ] | ||
| 52 | } | ||
| 53 | }, | ||
| 54 | "400": { | ||
| 55 | "description": "Bad Request", | ||
| 56 | "schema": { | ||
| 57 | "$ref": "#/definitions/models.Response" | ||
| 58 | } | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } | ||
| 62 | }, | ||
| 63 | "/demos": { | ||
| 64 | "get": { | ||
| 65 | "consumes": [ | ||
| 66 | "application/json" | ||
| 67 | ], | ||
| 68 | "produces": [ | ||
| 29 | "application/octet-stream" | 69 | "application/octet-stream" |
| 30 | ], | 70 | ], |
| 31 | "tags": [ | 71 | "tags": [ |
| @@ -37,7 +77,7 @@ const docTemplate = `{ | |||
| 37 | "type": "integer", | 77 | "type": "integer", |
| 38 | "description": "Demo UUID", | 78 | "description": "Demo UUID", |
| 39 | "name": "uuid", | 79 | "name": "uuid", |
| 40 | "in": "path", | 80 | "in": "query", |
| 41 | "required": true | 81 | "required": true |
| 42 | } | 82 | } |
| 43 | ], | 83 | ], |
| @@ -97,7 +137,7 @@ const docTemplate = `{ | |||
| 97 | } | 137 | } |
| 98 | } | 138 | } |
| 99 | }, | 139 | }, |
| 100 | "/maps/{id}": { | 140 | "/maps/{id}/leaderboards": { |
| 101 | "get": { | 141 | "get": { |
| 102 | "consumes": [ | 142 | "consumes": [ |
| 103 | "application/json" | 143 | "application/json" |
| @@ -108,7 +148,7 @@ const docTemplate = `{ | |||
| 108 | "tags": [ | 148 | "tags": [ |
| 109 | "maps" | 149 | "maps" |
| 110 | ], | 150 | ], |
| 111 | "summary": "Get map page with specified id.", | 151 | "summary": "Get map leaderboards with specified id.", |
| 112 | "parameters": [ | 152 | "parameters": [ |
| 113 | { | 153 | { |
| 114 | "type": "integer", | 154 | "type": "integer", |
| @@ -130,7 +170,19 @@ const docTemplate = `{ | |||
| 130 | "type": "object", | 170 | "type": "object", |
| 131 | "properties": { | 171 | "properties": { |
| 132 | "data": { | 172 | "data": { |
| 133 | "$ref": "#/definitions/models.Map" | 173 | "allOf": [ |
| 174 | { | ||
| 175 | "$ref": "#/definitions/models.Map" | ||
| 176 | }, | ||
| 177 | { | ||
| 178 | "type": "object", | ||
| 179 | "properties": { | ||
| 180 | "data": { | ||
| 181 | "$ref": "#/definitions/models.MapRecords" | ||
| 182 | } | ||
| 183 | } | ||
| 184 | } | ||
| 185 | ] | ||
| 134 | } | 186 | } |
| 135 | } | 187 | } |
| 136 | } | 188 | } |
| @@ -239,6 +291,67 @@ const docTemplate = `{ | |||
| 239 | } | 291 | } |
| 240 | } | 292 | } |
| 241 | }, | 293 | }, |
| 294 | "/maps/{id}/summary": { | ||
| 295 | "get": { | ||
| 296 | "consumes": [ | ||
| 297 | "application/json" | ||
| 298 | ], | ||
| 299 | "produces": [ | ||
| 300 | "application/json" | ||
| 301 | ], | ||
| 302 | "tags": [ | ||
| 303 | "maps" | ||
| 304 | ], | ||
| 305 | "summary": "Get map summary with specified id.", | ||
| 306 | "parameters": [ | ||
| 307 | { | ||
| 308 | "type": "integer", | ||
| 309 | "description": "Map ID", | ||
| 310 | "name": "id", | ||
| 311 | "in": "path", | ||
| 312 | "required": true | ||
| 313 | } | ||
| 314 | ], | ||
| 315 | "responses": { | ||
| 316 | "200": { | ||
| 317 | "description": "OK", | ||
| 318 | "schema": { | ||
| 319 | "allOf": [ | ||
| 320 | { | ||
| 321 | "$ref": "#/definitions/models.Response" | ||
| 322 | }, | ||
| 323 | { | ||
| 324 | "type": "object", | ||
| 325 | "properties": { | ||
| 326 | "data": { | ||
| 327 | "allOf": [ | ||
| 328 | { | ||
| 329 | "$ref": "#/definitions/models.Map" | ||
| 330 | }, | ||
| 331 | { | ||
| 332 | "type": "object", | ||
| 333 | "properties": { | ||
| 334 | "data": { | ||
| 335 | "$ref": "#/definitions/models.MapSummary" | ||
| 336 | } | ||
| 337 | } | ||
| 338 | } | ||
| 339 | ] | ||
| 340 | } | ||
| 341 | } | ||
| 342 | } | ||
| 343 | ] | ||
| 344 | } | ||
| 345 | }, | ||
| 346 | "400": { | ||
| 347 | "description": "Bad Request", | ||
| 348 | "schema": { | ||
| 349 | "$ref": "#/definitions/models.Response" | ||
| 350 | } | ||
| 351 | } | ||
| 352 | } | ||
| 353 | } | ||
| 354 | }, | ||
| 242 | "/profile": { | 355 | "/profile": { |
| 243 | "get": { | 356 | "get": { |
| 244 | "consumes": [ | 357 | "consumes": [ |
| @@ -407,7 +520,7 @@ const docTemplate = `{ | |||
| 407 | } | 520 | } |
| 408 | } | 521 | } |
| 409 | }, | 522 | }, |
| 410 | "/user/{id}": { | 523 | "/users/{id}": { |
| 411 | "get": { | 524 | "get": { |
| 412 | "consumes": [ | 525 | "consumes": [ |
| 413 | "application/json" | 526 | "application/json" |
| @@ -475,24 +588,87 @@ const docTemplate = `{ | |||
| 475 | "models.Map": { | 588 | "models.Map": { |
| 476 | "type": "object", | 589 | "type": "object", |
| 477 | "properties": { | 590 | "properties": { |
| 591 | "chapter_name": { | ||
| 592 | "type": "string" | ||
| 593 | }, | ||
| 594 | "data": {}, | ||
| 595 | "game_name": { | ||
| 596 | "type": "string" | ||
| 597 | }, | ||
| 478 | "id": { | 598 | "id": { |
| 479 | "type": "integer" | 599 | "type": "integer" |
| 480 | }, | 600 | }, |
| 481 | "is_coop": { | 601 | "map_name": { |
| 482 | "type": "boolean" | ||
| 483 | }, | ||
| 484 | "name": { | ||
| 485 | "type": "string" | 602 | "type": "string" |
| 603 | } | ||
| 604 | } | ||
| 605 | }, | ||
| 606 | "models.MapCategoryScores": { | ||
| 607 | "type": "object", | ||
| 608 | "properties": { | ||
| 609 | "any": { | ||
| 610 | "type": "integer" | ||
| 611 | }, | ||
| 612 | "cm": { | ||
| 613 | "type": "integer" | ||
| 614 | }, | ||
| 615 | "inbounds_sla": { | ||
| 616 | "type": "integer" | ||
| 486 | }, | 617 | }, |
| 487 | "records": {}, | 618 | "no_sla": { |
| 488 | "wr_score": { | ||
| 489 | "type": "integer" | 619 | "type": "integer" |
| 620 | } | ||
| 621 | } | ||
| 622 | }, | ||
| 623 | "models.MapHistory": { | ||
| 624 | "type": "object", | ||
| 625 | "properties": { | ||
| 626 | "date": { | ||
| 627 | "type": "string" | ||
| 628 | }, | ||
| 629 | "runner_name": { | ||
| 630 | "type": "string" | ||
| 490 | }, | 631 | }, |
| 491 | "wr_time": { | 632 | "score_count": { |
| 492 | "type": "integer" | 633 | "type": "integer" |
| 493 | } | 634 | } |
| 494 | } | 635 | } |
| 495 | }, | 636 | }, |
| 637 | "models.MapRecords": { | ||
| 638 | "type": "object", | ||
| 639 | "properties": { | ||
| 640 | "records": {} | ||
| 641 | } | ||
| 642 | }, | ||
| 643 | "models.MapSummary": { | ||
| 644 | "type": "object", | ||
| 645 | "properties": { | ||
| 646 | "category_scores": { | ||
| 647 | "$ref": "#/definitions/models.MapCategoryScores" | ||
| 648 | }, | ||
| 649 | "description": { | ||
| 650 | "type": "string" | ||
| 651 | }, | ||
| 652 | "history": { | ||
| 653 | "type": "array", | ||
| 654 | "items": { | ||
| 655 | "$ref": "#/definitions/models.MapHistory" | ||
| 656 | } | ||
| 657 | }, | ||
| 658 | "rating": { | ||
| 659 | "type": "number" | ||
| 660 | }, | ||
| 661 | "routers": { | ||
| 662 | "type": "array", | ||
| 663 | "items": { | ||
| 664 | "type": "string" | ||
| 665 | } | ||
| 666 | }, | ||
| 667 | "showcase": { | ||
| 668 | "type": "string" | ||
| 669 | } | ||
| 670 | } | ||
| 671 | }, | ||
| 496 | "models.ProfileResponse": { | 672 | "models.ProfileResponse": { |
| 497 | "type": "object", | 673 | "type": "object", |
| 498 | "properties": { | 674 | "properties": { |
| @@ -520,7 +696,7 @@ const docTemplate = `{ | |||
| 520 | "steam_id": { | 696 | "steam_id": { |
| 521 | "type": "string" | 697 | "type": "string" |
| 522 | }, | 698 | }, |
| 523 | "username": { | 699 | "user_name": { |
| 524 | "type": "string" | 700 | "type": "string" |
| 525 | } | 701 | } |
| 526 | } | 702 | } |
| @@ -595,7 +771,7 @@ const docTemplate = `{ | |||
| 595 | "user_id": { | 771 | "user_id": { |
| 596 | "type": "string" | 772 | "type": "string" |
| 597 | }, | 773 | }, |
| 598 | "username": { | 774 | "user_name": { |
| 599 | "type": "string" | 775 | "type": "string" |
| 600 | } | 776 | } |
| 601 | } | 777 | } |
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 | } |
diff --git a/docs/swagger.yaml b/docs/swagger.yaml index c134197..e24ca39 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml | |||
| @@ -7,18 +7,59 @@ definitions: | |||
| 7 | type: object | 7 | type: object |
| 8 | models.Map: | 8 | models.Map: |
| 9 | properties: | 9 | properties: |
| 10 | chapter_name: | ||
| 11 | type: string | ||
| 12 | data: {} | ||
| 13 | game_name: | ||
| 14 | type: string | ||
| 10 | id: | 15 | id: |
| 11 | type: integer | 16 | type: integer |
| 12 | is_coop: | 17 | map_name: |
| 13 | type: boolean | ||
| 14 | name: | ||
| 15 | type: string | 18 | type: string |
| 16 | records: {} | 19 | type: object |
| 17 | wr_score: | 20 | models.MapCategoryScores: |
| 21 | properties: | ||
| 22 | any: | ||
| 23 | type: integer | ||
| 24 | cm: | ||
| 18 | type: integer | 25 | type: integer |
| 19 | wr_time: | 26 | inbounds_sla: |
| 27 | type: integer | ||
| 28 | no_sla: | ||
| 20 | type: integer | 29 | type: integer |
| 21 | type: object | 30 | type: object |
| 31 | models.MapHistory: | ||
| 32 | properties: | ||
| 33 | date: | ||
| 34 | type: string | ||
| 35 | runner_name: | ||
| 36 | type: string | ||
| 37 | score_count: | ||
| 38 | type: integer | ||
| 39 | type: object | ||
| 40 | models.MapRecords: | ||
| 41 | properties: | ||
| 42 | records: {} | ||
| 43 | type: object | ||
| 44 | models.MapSummary: | ||
| 45 | properties: | ||
| 46 | category_scores: | ||
| 47 | $ref: '#/definitions/models.MapCategoryScores' | ||
| 48 | description: | ||
| 49 | type: string | ||
| 50 | history: | ||
| 51 | items: | ||
| 52 | $ref: '#/definitions/models.MapHistory' | ||
| 53 | type: array | ||
| 54 | rating: | ||
| 55 | type: number | ||
| 56 | routers: | ||
| 57 | items: | ||
| 58 | type: string | ||
| 59 | type: array | ||
| 60 | showcase: | ||
| 61 | type: string | ||
| 62 | type: object | ||
| 22 | models.ProfileResponse: | 63 | models.ProfileResponse: |
| 23 | properties: | 64 | properties: |
| 24 | avatar_link: | 65 | avatar_link: |
| @@ -37,7 +78,7 @@ definitions: | |||
| 37 | type: array | 78 | type: array |
| 38 | steam_id: | 79 | steam_id: |
| 39 | type: string | 80 | type: string |
| 40 | username: | 81 | user_name: |
| 41 | type: string | 82 | type: string |
| 42 | type: object | 83 | type: object |
| 43 | models.RankingsResponse: | 84 | models.RankingsResponse: |
| @@ -87,7 +128,7 @@ definitions: | |||
| 87 | type: integer | 128 | type: integer |
| 88 | user_id: | 129 | user_id: |
| 89 | type: string | 130 | type: string |
| 90 | username: | 131 | user_name: |
| 91 | type: string | 132 | type: string |
| 92 | type: object | 133 | type: object |
| 93 | host: lp.ardapektezol.com/api | 134 | host: lp.ardapektezol.com/api |
| @@ -104,9 +145,32 @@ paths: | |||
| 104 | get: | 145 | get: |
| 105 | consumes: | 146 | consumes: |
| 106 | - application/json | 147 | - application/json |
| 148 | produces: | ||
| 149 | - application/json | ||
| 150 | responses: | ||
| 151 | "200": | ||
| 152 | description: OK | ||
| 153 | schema: | ||
| 154 | allOf: | ||
| 155 | - $ref: '#/definitions/models.Response' | ||
| 156 | - properties: | ||
| 157 | data: | ||
| 158 | $ref: '#/definitions/models.RankingsResponse' | ||
| 159 | type: object | ||
| 160 | "400": | ||
| 161 | description: Bad Request | ||
| 162 | schema: | ||
| 163 | $ref: '#/definitions/models.Response' | ||
| 164 | summary: Get rankings of every player. | ||
| 165 | tags: | ||
| 166 | - rankings | ||
| 167 | /demos: | ||
| 168 | get: | ||
| 169 | consumes: | ||
| 170 | - application/json | ||
| 107 | parameters: | 171 | parameters: |
| 108 | - description: Demo UUID | 172 | - description: Demo UUID |
| 109 | in: path | 173 | in: query |
| 110 | name: uuid | 174 | name: uuid |
| 111 | required: true | 175 | required: true |
| 112 | type: integer | 176 | type: integer |
| @@ -147,7 +211,7 @@ paths: | |||
| 147 | summary: Get (redirect) login page for Steam auth. | 211 | summary: Get (redirect) login page for Steam auth. |
| 148 | tags: | 212 | tags: |
| 149 | - login | 213 | - login |
| 150 | /maps/{id}: | 214 | /maps/{id}/leaderboards: |
| 151 | get: | 215 | get: |
| 152 | consumes: | 216 | consumes: |
| 153 | - application/json | 217 | - application/json |
| @@ -167,13 +231,18 @@ paths: | |||
| 167 | - $ref: '#/definitions/models.Response' | 231 | - $ref: '#/definitions/models.Response' |
| 168 | - properties: | 232 | - properties: |
| 169 | data: | 233 | data: |
| 170 | $ref: '#/definitions/models.Map' | 234 | allOf: |
| 235 | - $ref: '#/definitions/models.Map' | ||
| 236 | - properties: | ||
| 237 | data: | ||
| 238 | $ref: '#/definitions/models.MapRecords' | ||
| 239 | type: object | ||
| 171 | type: object | 240 | type: object |
| 172 | "400": | 241 | "400": |
| 173 | description: Bad Request | 242 | description: Bad Request |
| 174 | schema: | 243 | schema: |
| 175 | $ref: '#/definitions/models.Response' | 244 | $ref: '#/definitions/models.Response' |
| 176 | summary: Get map page with specified id. | 245 | summary: Get map leaderboards with specified id. |
| 177 | tags: | 246 | tags: |
| 178 | - maps | 247 | - maps |
| 179 | /maps/{id}/record: | 248 | /maps/{id}/record: |
| @@ -236,6 +305,40 @@ paths: | |||
| 236 | summary: Post record with demo of a specific map. | 305 | summary: Post record with demo of a specific map. |
| 237 | tags: | 306 | tags: |
| 238 | - maps | 307 | - maps |
| 308 | /maps/{id}/summary: | ||
| 309 | get: | ||
| 310 | consumes: | ||
| 311 | - application/json | ||
| 312 | parameters: | ||
| 313 | - description: Map ID | ||
| 314 | in: path | ||
| 315 | name: id | ||
| 316 | required: true | ||
| 317 | type: integer | ||
| 318 | produces: | ||
| 319 | - application/json | ||
| 320 | responses: | ||
| 321 | "200": | ||
| 322 | description: OK | ||
| 323 | schema: | ||
| 324 | allOf: | ||
| 325 | - $ref: '#/definitions/models.Response' | ||
| 326 | - properties: | ||
| 327 | data: | ||
| 328 | allOf: | ||
| 329 | - $ref: '#/definitions/models.Map' | ||
| 330 | - properties: | ||
| 331 | data: | ||
| 332 | $ref: '#/definitions/models.MapSummary' | ||
| 333 | type: object | ||
| 334 | type: object | ||
| 335 | "400": | ||
| 336 | description: Bad Request | ||
| 337 | schema: | ||
| 338 | $ref: '#/definitions/models.Response' | ||
| 339 | summary: Get map summary with specified id. | ||
| 340 | tags: | ||
| 341 | - maps | ||
| 239 | /profile: | 342 | /profile: |
| 240 | get: | 343 | get: |
| 241 | consumes: | 344 | consumes: |
| @@ -338,7 +441,7 @@ paths: | |||
| 338 | summary: Update country code of session user. | 441 | summary: Update country code of session user. |
| 339 | tags: | 442 | tags: |
| 340 | - users | 443 | - users |
| 341 | /user/{id}: | 444 | /users/{id}: |
| 342 | get: | 445 | get: |
| 343 | consumes: | 446 | consumes: |
| 344 | - application/json | 447 | - application/json |