diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-04-24 18:05:38 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-04-24 18:05:38 +0300 |
| commit | 7f8277d89c8d60a91fded6d4095de9e789c61838 (patch) | |
| tree | 1d3b64f41563211cbb4cb55dbdeb9d4293cc0605 /docs/docs.go | |
| parent | feat: map summary and leaderboard endpoints, new models and routes (#38) (diff) | |
| download | lphub-7f8277d89c8d60a91fded6d4095de9e789c61838.tar.gz lphub-7f8277d89c8d60a91fded6d4095de9e789c61838.tar.bz2 lphub-7f8277d89c8d60a91fded6d4095de9e789c61838.zip | |
doc: map summary and leaderboard endpoints (#38)
Diffstat (limited to 'docs/docs.go')
| -rw-r--r-- | docs/docs.go | 181 |
1 files changed, 170 insertions, 11 deletions
diff --git a/docs/docs.go b/docs/docs.go index b708f2b..022814a 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": [ |
| @@ -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,70 @@ 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" | ||
| 486 | }, | 614 | }, |
| 487 | "records": {}, | 615 | "inbounds_sla": { |
| 488 | "wr_score": { | ||
| 489 | "type": "integer" | 616 | "type": "integer" |
| 490 | }, | 617 | }, |
| 491 | "wr_time": { | 618 | "no_sla": { |
| 492 | "type": "integer" | 619 | "type": "integer" |
| 493 | } | 620 | } |
| 494 | } | 621 | } |
| 495 | }, | 622 | }, |
| 623 | "models.MapRecords": { | ||
| 624 | "type": "object", | ||
| 625 | "properties": { | ||
| 626 | "records": {} | ||
| 627 | } | ||
| 628 | }, | ||
| 629 | "models.MapSummary": { | ||
| 630 | "type": "object", | ||
| 631 | "properties": { | ||
| 632 | "category_scores": { | ||
| 633 | "$ref": "#/definitions/models.MapCategoryScores" | ||
| 634 | }, | ||
| 635 | "description": { | ||
| 636 | "type": "string" | ||
| 637 | }, | ||
| 638 | "first_completion": { | ||
| 639 | "type": "string" | ||
| 640 | }, | ||
| 641 | "rating": { | ||
| 642 | "type": "number" | ||
| 643 | }, | ||
| 644 | "routers": { | ||
| 645 | "type": "array", | ||
| 646 | "items": { | ||
| 647 | "type": "string" | ||
| 648 | } | ||
| 649 | }, | ||
| 650 | "showcase": { | ||
| 651 | "type": "string" | ||
| 652 | } | ||
| 653 | } | ||
| 654 | }, | ||
| 496 | "models.ProfileResponse": { | 655 | "models.ProfileResponse": { |
| 497 | "type": "object", | 656 | "type": "object", |
| 498 | "properties": { | 657 | "properties": { |