diff options
Diffstat (limited to 'backend/docs/swagger.yaml')
| -rw-r--r-- | backend/docs/swagger.yaml | 1324 |
1 files changed, 1324 insertions, 0 deletions
diff --git a/backend/docs/swagger.yaml b/backend/docs/swagger.yaml new file mode 100644 index 0000000..853b3b9 --- /dev/null +++ b/backend/docs/swagger.yaml | |||
| @@ -0,0 +1,1324 @@ | |||
| 1 | basePath: /api/v1 | ||
| 2 | definitions: | ||
| 3 | handlers.ChapterMapsResponse: | ||
| 4 | properties: | ||
| 5 | chapter: | ||
| 6 | $ref: '#/definitions/models.Chapter' | ||
| 7 | maps: | ||
| 8 | items: | ||
| 9 | $ref: '#/definitions/models.MapSelect' | ||
| 10 | type: array | ||
| 11 | type: object | ||
| 12 | handlers.ChaptersResponse: | ||
| 13 | properties: | ||
| 14 | chapters: | ||
| 15 | items: | ||
| 16 | $ref: '#/definitions/models.Chapter' | ||
| 17 | type: array | ||
| 18 | game: | ||
| 19 | $ref: '#/definitions/models.Game' | ||
| 20 | type: object | ||
| 21 | handlers.CreateMapDiscussionCommentRequest: | ||
| 22 | properties: | ||
| 23 | comment: | ||
| 24 | type: string | ||
| 25 | required: | ||
| 26 | - comment | ||
| 27 | type: object | ||
| 28 | handlers.CreateMapDiscussionRequest: | ||
| 29 | properties: | ||
| 30 | content: | ||
| 31 | type: string | ||
| 32 | title: | ||
| 33 | type: string | ||
| 34 | required: | ||
| 35 | - content | ||
| 36 | - title | ||
| 37 | type: object | ||
| 38 | handlers.CreateMapSummaryRequest: | ||
| 39 | properties: | ||
| 40 | category_id: | ||
| 41 | type: integer | ||
| 42 | description: | ||
| 43 | type: string | ||
| 44 | record_date: | ||
| 45 | type: string | ||
| 46 | score_count: | ||
| 47 | type: integer | ||
| 48 | showcase: | ||
| 49 | type: string | ||
| 50 | user_name: | ||
| 51 | type: string | ||
| 52 | required: | ||
| 53 | - category_id | ||
| 54 | - description | ||
| 55 | - record_date | ||
| 56 | - score_count | ||
| 57 | - user_name | ||
| 58 | type: object | ||
| 59 | handlers.DeleteMapSummaryRequest: | ||
| 60 | properties: | ||
| 61 | route_id: | ||
| 62 | type: integer | ||
| 63 | required: | ||
| 64 | - route_id | ||
| 65 | type: object | ||
| 66 | handlers.EditMapDiscussionRequest: | ||
| 67 | properties: | ||
| 68 | content: | ||
| 69 | type: string | ||
| 70 | title: | ||
| 71 | type: string | ||
| 72 | required: | ||
| 73 | - content | ||
| 74 | - title | ||
| 75 | type: object | ||
| 76 | handlers.EditMapImageRequest: | ||
| 77 | properties: | ||
| 78 | image: | ||
| 79 | type: string | ||
| 80 | required: | ||
| 81 | - image | ||
| 82 | type: object | ||
| 83 | handlers.EditMapSummaryRequest: | ||
| 84 | properties: | ||
| 85 | description: | ||
| 86 | type: string | ||
| 87 | record_date: | ||
| 88 | type: string | ||
| 89 | route_id: | ||
| 90 | type: integer | ||
| 91 | score_count: | ||
| 92 | type: integer | ||
| 93 | showcase: | ||
| 94 | type: string | ||
| 95 | user_name: | ||
| 96 | type: string | ||
| 97 | required: | ||
| 98 | - description | ||
| 99 | - record_date | ||
| 100 | - route_id | ||
| 101 | - score_count | ||
| 102 | - user_name | ||
| 103 | type: object | ||
| 104 | handlers.LoginResponse: | ||
| 105 | properties: | ||
| 106 | token: | ||
| 107 | type: string | ||
| 108 | type: object | ||
| 109 | handlers.LogsResponse: | ||
| 110 | properties: | ||
| 111 | logs: | ||
| 112 | items: | ||
| 113 | $ref: '#/definitions/handlers.LogsResponseDetails' | ||
| 114 | type: array | ||
| 115 | type: object | ||
| 116 | handlers.LogsResponseDetails: | ||
| 117 | properties: | ||
| 118 | date: | ||
| 119 | type: string | ||
| 120 | detail: | ||
| 121 | type: string | ||
| 122 | message: | ||
| 123 | type: string | ||
| 124 | user: | ||
| 125 | $ref: '#/definitions/models.UserShort' | ||
| 126 | type: object | ||
| 127 | handlers.MapDiscussion: | ||
| 128 | properties: | ||
| 129 | comments: | ||
| 130 | items: | ||
| 131 | $ref: '#/definitions/handlers.MapDiscussionComment' | ||
| 132 | type: array | ||
| 133 | content: | ||
| 134 | type: string | ||
| 135 | created_at: | ||
| 136 | description: Upvotes int `json:"upvotes"` | ||
| 137 | type: string | ||
| 138 | creator: | ||
| 139 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 140 | id: | ||
| 141 | type: integer | ||
| 142 | title: | ||
| 143 | type: string | ||
| 144 | updated_at: | ||
| 145 | type: string | ||
| 146 | type: object | ||
| 147 | handlers.MapDiscussionComment: | ||
| 148 | properties: | ||
| 149 | comment: | ||
| 150 | type: string | ||
| 151 | date: | ||
| 152 | type: string | ||
| 153 | user: | ||
| 154 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 155 | type: object | ||
| 156 | handlers.MapDiscussionResponse: | ||
| 157 | properties: | ||
| 158 | discussion: | ||
| 159 | $ref: '#/definitions/handlers.MapDiscussion' | ||
| 160 | type: object | ||
| 161 | handlers.MapDiscussionsResponse: | ||
| 162 | properties: | ||
| 163 | discussions: | ||
| 164 | items: | ||
| 165 | $ref: '#/definitions/handlers.MapDiscussion' | ||
| 166 | type: array | ||
| 167 | type: object | ||
| 168 | handlers.MapLeaderboardsResponse: | ||
| 169 | properties: | ||
| 170 | map: | ||
| 171 | $ref: '#/definitions/models.Map' | ||
| 172 | pagination: | ||
| 173 | $ref: '#/definitions/models.Pagination' | ||
| 174 | records: {} | ||
| 175 | type: object | ||
| 176 | handlers.MapShortWithGame: | ||
| 177 | properties: | ||
| 178 | chapter: | ||
| 179 | type: string | ||
| 180 | game: | ||
| 181 | type: string | ||
| 182 | id: | ||
| 183 | type: integer | ||
| 184 | map: | ||
| 185 | type: string | ||
| 186 | type: object | ||
| 187 | handlers.MapSummaryResponse: | ||
| 188 | properties: | ||
| 189 | map: | ||
| 190 | $ref: '#/definitions/models.Map' | ||
| 191 | summary: | ||
| 192 | $ref: '#/definitions/models.MapSummary' | ||
| 193 | type: object | ||
| 194 | handlers.ProfileRankings: | ||
| 195 | properties: | ||
| 196 | cooperative: | ||
| 197 | $ref: '#/definitions/handlers.ProfileRankingsDetails' | ||
| 198 | overall: | ||
| 199 | $ref: '#/definitions/handlers.ProfileRankingsDetails' | ||
| 200 | singleplayer: | ||
| 201 | $ref: '#/definitions/handlers.ProfileRankingsDetails' | ||
| 202 | type: object | ||
| 203 | handlers.ProfileRankingsDetails: | ||
| 204 | properties: | ||
| 205 | completion_count: | ||
| 206 | type: integer | ||
| 207 | completion_total: | ||
| 208 | type: integer | ||
| 209 | rank: | ||
| 210 | type: integer | ||
| 211 | type: object | ||
| 212 | handlers.ProfileRecords: | ||
| 213 | properties: | ||
| 214 | category_id: | ||
| 215 | type: integer | ||
| 216 | game_id: | ||
| 217 | type: integer | ||
| 218 | map_id: | ||
| 219 | type: integer | ||
| 220 | map_name: | ||
| 221 | type: string | ||
| 222 | map_wr_count: | ||
| 223 | type: integer | ||
| 224 | placement: | ||
| 225 | type: integer | ||
| 226 | scores: | ||
| 227 | items: | ||
| 228 | $ref: '#/definitions/handlers.ProfileScores' | ||
| 229 | type: array | ||
| 230 | type: object | ||
| 231 | handlers.ProfileResponse: | ||
| 232 | properties: | ||
| 233 | avatar_link: | ||
| 234 | type: string | ||
| 235 | country_code: | ||
| 236 | type: string | ||
| 237 | links: | ||
| 238 | $ref: '#/definitions/models.Links' | ||
| 239 | pagination: | ||
| 240 | $ref: '#/definitions/models.Pagination' | ||
| 241 | profile: | ||
| 242 | type: boolean | ||
| 243 | rankings: | ||
| 244 | $ref: '#/definitions/handlers.ProfileRankings' | ||
| 245 | records: | ||
| 246 | items: | ||
| 247 | $ref: '#/definitions/handlers.ProfileRecords' | ||
| 248 | type: array | ||
| 249 | steam_id: | ||
| 250 | type: string | ||
| 251 | titles: | ||
| 252 | items: | ||
| 253 | $ref: '#/definitions/models.Title' | ||
| 254 | type: array | ||
| 255 | user_name: | ||
| 256 | type: string | ||
| 257 | type: object | ||
| 258 | handlers.ProfileScores: | ||
| 259 | properties: | ||
| 260 | date: | ||
| 261 | type: string | ||
| 262 | demo_id: | ||
| 263 | type: string | ||
| 264 | record_id: | ||
| 265 | type: integer | ||
| 266 | score_count: | ||
| 267 | type: integer | ||
| 268 | score_time: | ||
| 269 | type: integer | ||
| 270 | type: object | ||
| 271 | handlers.RankingsResponse: | ||
| 272 | properties: | ||
| 273 | rankings_multiplayer: | ||
| 274 | items: | ||
| 275 | $ref: '#/definitions/models.UserRanking' | ||
| 276 | type: array | ||
| 277 | rankings_overall: | ||
| 278 | items: | ||
| 279 | $ref: '#/definitions/models.UserRanking' | ||
| 280 | type: array | ||
| 281 | rankings_singleplayer: | ||
| 282 | items: | ||
| 283 | $ref: '#/definitions/models.UserRanking' | ||
| 284 | type: array | ||
| 285 | type: object | ||
| 286 | handlers.RecordResponse: | ||
| 287 | properties: | ||
| 288 | score_count: | ||
| 289 | type: integer | ||
| 290 | score_time: | ||
| 291 | type: integer | ||
| 292 | type: object | ||
| 293 | handlers.ScoreLogsResponse: | ||
| 294 | properties: | ||
| 295 | scores: | ||
| 296 | items: | ||
| 297 | $ref: '#/definitions/handlers.ScoreLogsResponseDetails' | ||
| 298 | type: array | ||
| 299 | type: object | ||
| 300 | handlers.ScoreLogsResponseDetails: | ||
| 301 | properties: | ||
| 302 | date: | ||
| 303 | type: string | ||
| 304 | demo_id: | ||
| 305 | type: string | ||
| 306 | game: | ||
| 307 | $ref: '#/definitions/models.Game' | ||
| 308 | map: | ||
| 309 | $ref: '#/definitions/models.MapShort' | ||
| 310 | score_count: | ||
| 311 | type: integer | ||
| 312 | score_time: | ||
| 313 | type: integer | ||
| 314 | user: | ||
| 315 | $ref: '#/definitions/models.UserShort' | ||
| 316 | type: object | ||
| 317 | handlers.SearchResponse: | ||
| 318 | properties: | ||
| 319 | maps: | ||
| 320 | items: | ||
| 321 | $ref: '#/definitions/handlers.MapShortWithGame' | ||
| 322 | type: array | ||
| 323 | players: | ||
| 324 | items: | ||
| 325 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 326 | type: array | ||
| 327 | type: object | ||
| 328 | models.Category: | ||
| 329 | properties: | ||
| 330 | id: | ||
| 331 | type: integer | ||
| 332 | name: | ||
| 333 | type: string | ||
| 334 | type: object | ||
| 335 | models.CategoryPortal: | ||
| 336 | properties: | ||
| 337 | category: | ||
| 338 | $ref: '#/definitions/models.Category' | ||
| 339 | portal_count: | ||
| 340 | type: integer | ||
| 341 | type: object | ||
| 342 | models.Chapter: | ||
| 343 | properties: | ||
| 344 | id: | ||
| 345 | type: integer | ||
| 346 | image: | ||
| 347 | type: string | ||
| 348 | is_disabled: | ||
| 349 | type: boolean | ||
| 350 | name: | ||
| 351 | type: string | ||
| 352 | type: object | ||
| 353 | models.Game: | ||
| 354 | properties: | ||
| 355 | category_portals: | ||
| 356 | items: | ||
| 357 | $ref: '#/definitions/models.CategoryPortal' | ||
| 358 | type: array | ||
| 359 | id: | ||
| 360 | type: integer | ||
| 361 | image: | ||
| 362 | type: string | ||
| 363 | is_coop: | ||
| 364 | type: boolean | ||
| 365 | name: | ||
| 366 | type: string | ||
| 367 | type: object | ||
| 368 | models.Links: | ||
| 369 | properties: | ||
| 370 | p2sr: | ||
| 371 | type: string | ||
| 372 | steam: | ||
| 373 | type: string | ||
| 374 | twitch: | ||
| 375 | type: string | ||
| 376 | youtube: | ||
| 377 | type: string | ||
| 378 | type: object | ||
| 379 | models.Map: | ||
| 380 | properties: | ||
| 381 | chapter_name: | ||
| 382 | type: string | ||
| 383 | game_name: | ||
| 384 | type: string | ||
| 385 | id: | ||
| 386 | type: integer | ||
| 387 | image: | ||
| 388 | type: string | ||
| 389 | is_coop: | ||
| 390 | type: boolean | ||
| 391 | is_disabled: | ||
| 392 | type: boolean | ||
| 393 | map_name: | ||
| 394 | type: string | ||
| 395 | type: object | ||
| 396 | models.MapHistory: | ||
| 397 | properties: | ||
| 398 | date: | ||
| 399 | type: string | ||
| 400 | runner_name: | ||
| 401 | type: string | ||
| 402 | score_count: | ||
| 403 | type: integer | ||
| 404 | type: object | ||
| 405 | models.MapRoute: | ||
| 406 | properties: | ||
| 407 | category: | ||
| 408 | $ref: '#/definitions/models.Category' | ||
| 409 | completion_count: | ||
| 410 | type: integer | ||
| 411 | description: | ||
| 412 | type: string | ||
| 413 | history: | ||
| 414 | $ref: '#/definitions/models.MapHistory' | ||
| 415 | rating: | ||
| 416 | type: number | ||
| 417 | route_id: | ||
| 418 | type: integer | ||
| 419 | showcase: | ||
| 420 | type: string | ||
| 421 | type: object | ||
| 422 | models.MapSelect: | ||
| 423 | properties: | ||
| 424 | category_portals: | ||
| 425 | items: | ||
| 426 | $ref: '#/definitions/models.CategoryPortal' | ||
| 427 | type: array | ||
| 428 | difficulty: | ||
| 429 | type: integer | ||
| 430 | id: | ||
| 431 | type: integer | ||
| 432 | image: | ||
| 433 | type: string | ||
| 434 | is_disabled: | ||
| 435 | type: boolean | ||
| 436 | name: | ||
| 437 | type: string | ||
| 438 | type: object | ||
| 439 | models.MapShort: | ||
| 440 | properties: | ||
| 441 | difficulty: | ||
| 442 | type: integer | ||
| 443 | id: | ||
| 444 | type: integer | ||
| 445 | image: | ||
| 446 | type: string | ||
| 447 | is_disabled: | ||
| 448 | type: boolean | ||
| 449 | name: | ||
| 450 | type: string | ||
| 451 | portal_count: | ||
| 452 | type: integer | ||
| 453 | type: object | ||
| 454 | models.MapSummary: | ||
| 455 | properties: | ||
| 456 | routes: | ||
| 457 | items: | ||
| 458 | $ref: '#/definitions/models.MapRoute' | ||
| 459 | type: array | ||
| 460 | type: object | ||
| 461 | models.Pagination: | ||
| 462 | properties: | ||
| 463 | current_page: | ||
| 464 | type: integer | ||
| 465 | page_size: | ||
| 466 | type: integer | ||
| 467 | total_pages: | ||
| 468 | type: integer | ||
| 469 | total_records: | ||
| 470 | type: integer | ||
| 471 | type: object | ||
| 472 | models.Response: | ||
| 473 | properties: | ||
| 474 | data: {} | ||
| 475 | message: | ||
| 476 | type: string | ||
| 477 | success: | ||
| 478 | type: boolean | ||
| 479 | type: object | ||
| 480 | models.Title: | ||
| 481 | properties: | ||
| 482 | color: | ||
| 483 | type: string | ||
| 484 | name: | ||
| 485 | type: string | ||
| 486 | type: object | ||
| 487 | models.UserRanking: | ||
| 488 | properties: | ||
| 489 | placement: | ||
| 490 | type: integer | ||
| 491 | total_score: | ||
| 492 | type: integer | ||
| 493 | user: | ||
| 494 | $ref: '#/definitions/models.UserShortWithAvatar' | ||
| 495 | type: object | ||
| 496 | models.UserShort: | ||
| 497 | properties: | ||
| 498 | steam_id: | ||
| 499 | type: string | ||
| 500 | user_name: | ||
| 501 | type: string | ||
| 502 | type: object | ||
| 503 | models.UserShortWithAvatar: | ||
| 504 | properties: | ||
| 505 | avatar_link: | ||
| 506 | type: string | ||
| 507 | steam_id: | ||
| 508 | type: string | ||
| 509 | user_name: | ||
| 510 | type: string | ||
| 511 | type: object | ||
| 512 | host: lp.ardapektezol.com | ||
| 513 | info: | ||
| 514 | contact: {} | ||
| 515 | description: Backend API endpoints for the Least Portals Database. | ||
| 516 | license: | ||
| 517 | name: GNU Affero General Public License, Version 3 | ||
| 518 | url: https://www.gnu.org/licenses/agpl-3.0.html | ||
| 519 | title: Least Portals Database API | ||
| 520 | version: "1.0" | ||
| 521 | paths: | ||
| 522 | /chapters/{chapterid}: | ||
| 523 | get: | ||
| 524 | description: Get maps from the specified chapter id. | ||
| 525 | parameters: | ||
| 526 | - description: Chapter ID | ||
| 527 | in: path | ||
| 528 | name: chapterid | ||
| 529 | required: true | ||
| 530 | type: integer | ||
| 531 | produces: | ||
| 532 | - application/json | ||
| 533 | responses: | ||
| 534 | "200": | ||
| 535 | description: OK | ||
| 536 | schema: | ||
| 537 | allOf: | ||
| 538 | - $ref: '#/definitions/models.Response' | ||
| 539 | - properties: | ||
| 540 | data: | ||
| 541 | $ref: '#/definitions/handlers.ChapterMapsResponse' | ||
| 542 | type: object | ||
| 543 | "400": | ||
| 544 | description: Bad Request | ||
| 545 | schema: | ||
| 546 | $ref: '#/definitions/models.Response' | ||
| 547 | tags: | ||
| 548 | - games & chapters | ||
| 549 | /demos: | ||
| 550 | get: | ||
| 551 | consumes: | ||
| 552 | - application/json | ||
| 553 | description: Get demo with specified demo uuid. | ||
| 554 | parameters: | ||
| 555 | - description: Demo UUID | ||
| 556 | in: query | ||
| 557 | name: uuid | ||
| 558 | required: true | ||
| 559 | type: string | ||
| 560 | produces: | ||
| 561 | - application/octet-stream | ||
| 562 | responses: | ||
| 563 | "200": | ||
| 564 | description: Demo File | ||
| 565 | schema: | ||
| 566 | type: file | ||
| 567 | tags: | ||
| 568 | - demo | ||
| 569 | /games: | ||
| 570 | get: | ||
| 571 | description: Get games from the leaderboards. | ||
| 572 | produces: | ||
| 573 | - application/json | ||
| 574 | responses: | ||
| 575 | "200": | ||
| 576 | description: OK | ||
| 577 | schema: | ||
| 578 | allOf: | ||
| 579 | - $ref: '#/definitions/models.Response' | ||
| 580 | - properties: | ||
| 581 | data: | ||
| 582 | items: | ||
| 583 | $ref: '#/definitions/models.Game' | ||
| 584 | type: array | ||
| 585 | type: object | ||
| 586 | "400": | ||
| 587 | description: Bad Request | ||
| 588 | schema: | ||
| 589 | $ref: '#/definitions/models.Response' | ||
| 590 | tags: | ||
| 591 | - games & chapters | ||
| 592 | /games/{gameid}: | ||
| 593 | get: | ||
| 594 | description: Get chapters from the specified game id. | ||
| 595 | parameters: | ||
| 596 | - description: Game ID | ||
| 597 | in: path | ||
| 598 | name: gameid | ||
| 599 | required: true | ||
| 600 | type: integer | ||
| 601 | produces: | ||
| 602 | - application/json | ||
| 603 | responses: | ||
| 604 | "200": | ||
| 605 | description: OK | ||
| 606 | schema: | ||
| 607 | allOf: | ||
| 608 | - $ref: '#/definitions/models.Response' | ||
| 609 | - properties: | ||
| 610 | data: | ||
| 611 | $ref: '#/definitions/handlers.ChaptersResponse' | ||
| 612 | type: object | ||
| 613 | tags: | ||
| 614 | - games & chapters | ||
| 615 | /games/{gameid}/maps: | ||
| 616 | get: | ||
| 617 | description: Get maps from the specified game id. | ||
| 618 | parameters: | ||
| 619 | - description: Game ID | ||
| 620 | in: path | ||
| 621 | name: gameid | ||
| 622 | required: true | ||
| 623 | type: integer | ||
| 624 | produces: | ||
| 625 | - application/json | ||
| 626 | responses: | ||
| 627 | "200": | ||
| 628 | description: OK | ||
| 629 | schema: | ||
| 630 | allOf: | ||
| 631 | - $ref: '#/definitions/models.Response' | ||
| 632 | - properties: | ||
| 633 | data: | ||
| 634 | $ref: '#/definitions/handlers.ChaptersResponse' | ||
| 635 | type: object | ||
| 636 | tags: | ||
| 637 | - games & chapters | ||
| 638 | /login: | ||
| 639 | get: | ||
| 640 | consumes: | ||
| 641 | - application/json | ||
| 642 | description: Get (redirect) login page for Steam auth. | ||
| 643 | produces: | ||
| 644 | - application/json | ||
| 645 | responses: | ||
| 646 | "200": | ||
| 647 | description: OK | ||
| 648 | schema: | ||
| 649 | allOf: | ||
| 650 | - $ref: '#/definitions/models.Response' | ||
| 651 | - properties: | ||
| 652 | data: | ||
| 653 | $ref: '#/definitions/handlers.LoginResponse' | ||
| 654 | type: object | ||
| 655 | tags: | ||
| 656 | - login | ||
| 657 | /logs/mod: | ||
| 658 | get: | ||
| 659 | description: Get mod logs. | ||
| 660 | parameters: | ||
| 661 | - description: JWT Token | ||
| 662 | in: header | ||
| 663 | name: Authorization | ||
| 664 | required: true | ||
| 665 | type: string | ||
| 666 | produces: | ||
| 667 | - application/json | ||
| 668 | responses: | ||
| 669 | "200": | ||
| 670 | description: OK | ||
| 671 | schema: | ||
| 672 | allOf: | ||
| 673 | - $ref: '#/definitions/models.Response' | ||
| 674 | - properties: | ||
| 675 | data: | ||
| 676 | $ref: '#/definitions/handlers.LogsResponse' | ||
| 677 | type: object | ||
| 678 | tags: | ||
| 679 | - logs | ||
| 680 | /logs/score: | ||
| 681 | get: | ||
| 682 | description: Get score logs of every player. | ||
| 683 | produces: | ||
| 684 | - application/json | ||
| 685 | responses: | ||
| 686 | "200": | ||
| 687 | description: OK | ||
| 688 | schema: | ||
| 689 | allOf: | ||
| 690 | - $ref: '#/definitions/models.Response' | ||
| 691 | - properties: | ||
| 692 | data: | ||
| 693 | $ref: '#/definitions/handlers.ScoreLogsResponse' | ||
| 694 | type: object | ||
| 695 | tags: | ||
| 696 | - logs | ||
| 697 | /maps/{mapid}/discussions: | ||
| 698 | get: | ||
| 699 | description: Get map discussions with specified map id. | ||
| 700 | parameters: | ||
| 701 | - description: Map ID | ||
| 702 | in: path | ||
| 703 | name: mapid | ||
| 704 | required: true | ||
| 705 | type: integer | ||
| 706 | produces: | ||
| 707 | - application/json | ||
| 708 | responses: | ||
| 709 | "200": | ||
| 710 | description: OK | ||
| 711 | schema: | ||
| 712 | allOf: | ||
| 713 | - $ref: '#/definitions/models.Response' | ||
| 714 | - properties: | ||
| 715 | data: | ||
| 716 | $ref: '#/definitions/handlers.MapDiscussionsResponse' | ||
| 717 | type: object | ||
| 718 | tags: | ||
| 719 | - maps / discussions | ||
| 720 | post: | ||
| 721 | description: Create map discussion with specified map id. | ||
| 722 | parameters: | ||
| 723 | - description: JWT Token | ||
| 724 | in: header | ||
| 725 | name: Authorization | ||
| 726 | required: true | ||
| 727 | type: string | ||
| 728 | - description: Map ID | ||
| 729 | in: path | ||
| 730 | name: mapid | ||
| 731 | required: true | ||
| 732 | type: integer | ||
| 733 | - description: Body | ||
| 734 | in: body | ||
| 735 | name: request | ||
| 736 | required: true | ||
| 737 | schema: | ||
| 738 | $ref: '#/definitions/handlers.CreateMapDiscussionRequest' | ||
| 739 | produces: | ||
| 740 | - application/json | ||
| 741 | responses: | ||
| 742 | "200": | ||
| 743 | description: OK | ||
| 744 | schema: | ||
| 745 | allOf: | ||
| 746 | - $ref: '#/definitions/models.Response' | ||
| 747 | - properties: | ||
| 748 | data: | ||
| 749 | $ref: '#/definitions/handlers.CreateMapDiscussionRequest' | ||
| 750 | type: object | ||
| 751 | tags: | ||
| 752 | - maps / discussions | ||
| 753 | /maps/{mapid}/discussions/{discussionid}: | ||
| 754 | delete: | ||
| 755 | description: Delete map discussion with specified map id. | ||
| 756 | parameters: | ||
| 757 | - description: JWT Token | ||
| 758 | in: header | ||
| 759 | name: Authorization | ||
| 760 | required: true | ||
| 761 | type: string | ||
| 762 | - description: Map ID | ||
| 763 | in: path | ||
| 764 | name: mapid | ||
| 765 | required: true | ||
| 766 | type: integer | ||
| 767 | - description: Discussion ID | ||
| 768 | in: path | ||
| 769 | name: discussionid | ||
| 770 | required: true | ||
| 771 | type: integer | ||
| 772 | produces: | ||
| 773 | - application/json | ||
| 774 | responses: | ||
| 775 | "200": | ||
| 776 | description: OK | ||
| 777 | schema: | ||
| 778 | $ref: '#/definitions/models.Response' | ||
| 779 | tags: | ||
| 780 | - maps / discussions | ||
| 781 | get: | ||
| 782 | description: Get map discussion with specified map and discussion id. | ||
| 783 | parameters: | ||
| 784 | - description: Map ID | ||
| 785 | in: path | ||
| 786 | name: mapid | ||
| 787 | required: true | ||
| 788 | type: integer | ||
| 789 | - description: Discussion ID | ||
| 790 | in: path | ||
| 791 | name: discussionid | ||
| 792 | required: true | ||
| 793 | type: integer | ||
| 794 | produces: | ||
| 795 | - application/json | ||
| 796 | responses: | ||
| 797 | "200": | ||
| 798 | description: OK | ||
| 799 | schema: | ||
| 800 | allOf: | ||
| 801 | - $ref: '#/definitions/models.Response' | ||
| 802 | - properties: | ||
| 803 | data: | ||
| 804 | $ref: '#/definitions/handlers.MapDiscussionResponse' | ||
| 805 | type: object | ||
| 806 | tags: | ||
| 807 | - maps / discussions | ||
| 808 | post: | ||
| 809 | description: Create map discussion comment with specified map id. | ||
| 810 | parameters: | ||
| 811 | - description: JWT Token | ||
| 812 | in: header | ||
| 813 | name: Authorization | ||
| 814 | required: true | ||
| 815 | type: string | ||
| 816 | - description: Map ID | ||
| 817 | in: path | ||
| 818 | name: mapid | ||
| 819 | required: true | ||
| 820 | type: integer | ||
| 821 | - description: Discussion ID | ||
| 822 | in: path | ||
| 823 | name: discussionid | ||
| 824 | required: true | ||
| 825 | type: integer | ||
| 826 | - description: Body | ||
| 827 | in: body | ||
| 828 | name: request | ||
| 829 | required: true | ||
| 830 | schema: | ||
| 831 | $ref: '#/definitions/handlers.CreateMapDiscussionCommentRequest' | ||
| 832 | produces: | ||
| 833 | - application/json | ||
| 834 | responses: | ||
| 835 | "200": | ||
| 836 | description: OK | ||
| 837 | schema: | ||
| 838 | allOf: | ||
| 839 | - $ref: '#/definitions/models.Response' | ||
| 840 | - properties: | ||
| 841 | data: | ||
| 842 | $ref: '#/definitions/handlers.CreateMapDiscussionCommentRequest' | ||
| 843 | type: object | ||
| 844 | tags: | ||
| 845 | - maps / discussions | ||
| 846 | put: | ||
| 847 | description: Edit map discussion with specified map id. | ||
| 848 | parameters: | ||
| 849 | - description: JWT Token | ||
| 850 | in: header | ||
| 851 | name: Authorization | ||
| 852 | required: true | ||
| 853 | type: string | ||
| 854 | - description: Map ID | ||
| 855 | in: path | ||
| 856 | name: mapid | ||
| 857 | required: true | ||
| 858 | type: integer | ||
| 859 | - description: Discussion ID | ||
| 860 | in: path | ||
| 861 | name: discussionid | ||
| 862 | required: true | ||
| 863 | type: integer | ||
| 864 | - description: Body | ||
| 865 | in: body | ||
| 866 | name: request | ||
| 867 | required: true | ||
| 868 | schema: | ||
| 869 | $ref: '#/definitions/handlers.EditMapDiscussionRequest' | ||
| 870 | produces: | ||
| 871 | - application/json | ||
| 872 | responses: | ||
| 873 | "200": | ||
| 874 | description: OK | ||
| 875 | schema: | ||
| 876 | allOf: | ||
| 877 | - $ref: '#/definitions/models.Response' | ||
| 878 | - properties: | ||
| 879 | data: | ||
| 880 | $ref: '#/definitions/handlers.EditMapDiscussionRequest' | ||
| 881 | type: object | ||
| 882 | tags: | ||
| 883 | - maps / discussions | ||
| 884 | /maps/{mapid}/image: | ||
| 885 | put: | ||
| 886 | description: Edit map image with specified map id. | ||
| 887 | parameters: | ||
| 888 | - description: JWT Token | ||
| 889 | in: header | ||
| 890 | name: Authorization | ||
| 891 | required: true | ||
| 892 | type: string | ||
| 893 | - description: Map ID | ||
| 894 | in: path | ||
| 895 | name: mapid | ||
| 896 | required: true | ||
| 897 | type: integer | ||
| 898 | - description: Body | ||
| 899 | in: body | ||
| 900 | name: request | ||
| 901 | required: true | ||
| 902 | schema: | ||
| 903 | $ref: '#/definitions/handlers.EditMapImageRequest' | ||
| 904 | produces: | ||
| 905 | - application/json | ||
| 906 | responses: | ||
| 907 | "200": | ||
| 908 | description: OK | ||
| 909 | schema: | ||
| 910 | allOf: | ||
| 911 | - $ref: '#/definitions/models.Response' | ||
| 912 | - properties: | ||
| 913 | data: | ||
| 914 | $ref: '#/definitions/handlers.EditMapImageRequest' | ||
| 915 | type: object | ||
| 916 | tags: | ||
| 917 | - maps / summary | ||
| 918 | /maps/{mapid}/leaderboards: | ||
| 919 | get: | ||
| 920 | description: Get map leaderboards with specified id. | ||
| 921 | parameters: | ||
| 922 | - description: Map ID | ||
| 923 | in: path | ||
| 924 | name: mapid | ||
| 925 | required: true | ||
| 926 | type: integer | ||
| 927 | - description: 'Page Number (default: 1)' | ||
| 928 | in: query | ||
| 929 | name: page | ||
| 930 | type: integer | ||
| 931 | - description: 'Number of Records Per Page (default: 20)' | ||
| 932 | in: query | ||
| 933 | name: pageSize | ||
| 934 | type: integer | ||
| 935 | produces: | ||
| 936 | - application/json | ||
| 937 | responses: | ||
| 938 | "200": | ||
| 939 | description: OK | ||
| 940 | schema: | ||
| 941 | allOf: | ||
| 942 | - $ref: '#/definitions/models.Response' | ||
| 943 | - properties: | ||
| 944 | data: | ||
| 945 | $ref: '#/definitions/handlers.MapLeaderboardsResponse' | ||
| 946 | type: object | ||
| 947 | tags: | ||
| 948 | - maps / leaderboards | ||
| 949 | /maps/{mapid}/record: | ||
| 950 | post: | ||
| 951 | consumes: | ||
| 952 | - multipart/form-data | ||
| 953 | description: Post record with demo of a specific map. | ||
| 954 | parameters: | ||
| 955 | - description: Map ID | ||
| 956 | in: path | ||
| 957 | name: mapid | ||
| 958 | required: true | ||
| 959 | type: integer | ||
| 960 | - description: JWT Token | ||
| 961 | in: header | ||
| 962 | name: Authorization | ||
| 963 | required: true | ||
| 964 | type: string | ||
| 965 | - description: Host Demo | ||
| 966 | in: formData | ||
| 967 | name: host_demo | ||
| 968 | required: true | ||
| 969 | type: file | ||
| 970 | - description: Partner Demo | ||
| 971 | in: formData | ||
| 972 | name: partner_demo | ||
| 973 | type: file | ||
| 974 | - description: Is Partner Orange | ||
| 975 | in: formData | ||
| 976 | name: is_partner_orange | ||
| 977 | type: boolean | ||
| 978 | - description: Partner ID | ||
| 979 | in: formData | ||
| 980 | name: partner_id | ||
| 981 | type: string | ||
| 982 | produces: | ||
| 983 | - application/json | ||
| 984 | responses: | ||
| 985 | "200": | ||
| 986 | description: OK | ||
| 987 | schema: | ||
| 988 | allOf: | ||
| 989 | - $ref: '#/definitions/models.Response' | ||
| 990 | - properties: | ||
| 991 | data: | ||
| 992 | $ref: '#/definitions/handlers.RecordResponse' | ||
| 993 | type: object | ||
| 994 | tags: | ||
| 995 | - maps / leaderboards | ||
| 996 | /maps/{mapid}/record/{recordid}: | ||
| 997 | delete: | ||
| 998 | description: Delete record with specified map and record id. | ||
| 999 | parameters: | ||
| 1000 | - description: Map ID | ||
| 1001 | in: path | ||
| 1002 | name: mapid | ||
| 1003 | required: true | ||
| 1004 | type: integer | ||
| 1005 | - description: Record ID | ||
| 1006 | in: path | ||
| 1007 | name: recordid | ||
| 1008 | required: true | ||
| 1009 | type: integer | ||
| 1010 | - description: JWT Token | ||
| 1011 | in: header | ||
| 1012 | name: Authorization | ||
| 1013 | required: true | ||
| 1014 | type: string | ||
| 1015 | produces: | ||
| 1016 | - application/json | ||
| 1017 | responses: | ||
| 1018 | "200": | ||
| 1019 | description: OK | ||
| 1020 | schema: | ||
| 1021 | $ref: '#/definitions/models.Response' | ||
| 1022 | tags: | ||
| 1023 | - maps / leaderboards | ||
| 1024 | /maps/{mapid}/summary: | ||
| 1025 | delete: | ||
| 1026 | description: Delete map summary with specified map id. | ||
| 1027 | parameters: | ||
| 1028 | - description: JWT Token | ||
| 1029 | in: header | ||
| 1030 | name: Authorization | ||
| 1031 | required: true | ||
| 1032 | type: string | ||
| 1033 | - description: Map ID | ||
| 1034 | in: path | ||
| 1035 | name: mapid | ||
| 1036 | required: true | ||
| 1037 | type: integer | ||
| 1038 | - description: Body | ||
| 1039 | in: body | ||
| 1040 | name: request | ||
| 1041 | required: true | ||
| 1042 | schema: | ||
| 1043 | $ref: '#/definitions/handlers.DeleteMapSummaryRequest' | ||
| 1044 | produces: | ||
| 1045 | - application/json | ||
| 1046 | responses: | ||
| 1047 | "200": | ||
| 1048 | description: OK | ||
| 1049 | schema: | ||
| 1050 | allOf: | ||
| 1051 | - $ref: '#/definitions/models.Response' | ||
| 1052 | - properties: | ||
| 1053 | data: | ||
| 1054 | $ref: '#/definitions/handlers.DeleteMapSummaryRequest' | ||
| 1055 | type: object | ||
| 1056 | tags: | ||
| 1057 | - maps / summary | ||
| 1058 | get: | ||
| 1059 | description: Get map summary with specified id. | ||
| 1060 | parameters: | ||
| 1061 | - description: Map ID | ||
| 1062 | in: path | ||
| 1063 | name: mapid | ||
| 1064 | required: true | ||
| 1065 | type: integer | ||
| 1066 | produces: | ||
| 1067 | - application/json | ||
| 1068 | responses: | ||
| 1069 | "200": | ||
| 1070 | description: OK | ||
| 1071 | schema: | ||
| 1072 | allOf: | ||
| 1073 | - $ref: '#/definitions/models.Response' | ||
| 1074 | - properties: | ||
| 1075 | data: | ||
| 1076 | $ref: '#/definitions/handlers.MapSummaryResponse' | ||
| 1077 | type: object | ||
| 1078 | tags: | ||
| 1079 | - maps / summary | ||
| 1080 | post: | ||
| 1081 | description: Create map summary with specified map id. | ||
| 1082 | parameters: | ||
| 1083 | - description: JWT Token | ||
| 1084 | in: header | ||
| 1085 | name: Authorization | ||
| 1086 | required: true | ||
| 1087 | type: string | ||
| 1088 | - description: Map ID | ||
| 1089 | in: path | ||
| 1090 | name: mapid | ||
| 1091 | required: true | ||
| 1092 | type: integer | ||
| 1093 | - description: Body | ||
| 1094 | in: body | ||
| 1095 | name: request | ||
| 1096 | required: true | ||
| 1097 | schema: | ||
| 1098 | $ref: '#/definitions/handlers.CreateMapSummaryRequest' | ||
| 1099 | produces: | ||
| 1100 | - application/json | ||
| 1101 | responses: | ||
| 1102 | "200": | ||
| 1103 | description: OK | ||
| 1104 | schema: | ||
| 1105 | allOf: | ||
| 1106 | - $ref: '#/definitions/models.Response' | ||
| 1107 | - properties: | ||
| 1108 | data: | ||
| 1109 | $ref: '#/definitions/handlers.CreateMapSummaryRequest' | ||
| 1110 | type: object | ||
| 1111 | tags: | ||
| 1112 | - maps / summary | ||
| 1113 | put: | ||
| 1114 | description: Edit map summary with specified map id. | ||
| 1115 | parameters: | ||
| 1116 | - description: JWT Token | ||
| 1117 | in: header | ||
| 1118 | name: Authorization | ||
| 1119 | required: true | ||
| 1120 | type: string | ||
| 1121 | - description: Map ID | ||
| 1122 | in: path | ||
| 1123 | name: mapid | ||
| 1124 | required: true | ||
| 1125 | type: integer | ||
| 1126 | - description: Body | ||
| 1127 | in: body | ||
| 1128 | name: request | ||
| 1129 | required: true | ||
| 1130 | schema: | ||
| 1131 | $ref: '#/definitions/handlers.EditMapSummaryRequest' | ||
| 1132 | produces: | ||
| 1133 | - application/json | ||
| 1134 | responses: | ||
| 1135 | "200": | ||
| 1136 | description: OK | ||
| 1137 | schema: | ||
| 1138 | allOf: | ||
| 1139 | - $ref: '#/definitions/models.Response' | ||
| 1140 | - properties: | ||
| 1141 | data: | ||
| 1142 | $ref: '#/definitions/handlers.EditMapSummaryRequest' | ||
| 1143 | type: object | ||
| 1144 | tags: | ||
| 1145 | - maps / summary | ||
| 1146 | /profile: | ||
| 1147 | get: | ||
| 1148 | consumes: | ||
| 1149 | - application/json | ||
| 1150 | description: Get profile page of session user. | ||
| 1151 | parameters: | ||
| 1152 | - description: JWT Token | ||
| 1153 | in: header | ||
| 1154 | name: Authorization | ||
| 1155 | required: true | ||
| 1156 | type: string | ||
| 1157 | produces: | ||
| 1158 | - application/json | ||
| 1159 | responses: | ||
| 1160 | "200": | ||
| 1161 | description: OK | ||
| 1162 | schema: | ||
| 1163 | allOf: | ||
| 1164 | - $ref: '#/definitions/models.Response' | ||
| 1165 | - properties: | ||
| 1166 | data: | ||
| 1167 | $ref: '#/definitions/handlers.ProfileResponse' | ||
| 1168 | type: object | ||
| 1169 | tags: | ||
| 1170 | - users | ||
| 1171 | post: | ||
| 1172 | consumes: | ||
| 1173 | - application/json | ||
| 1174 | description: Update profile page of session user. | ||
| 1175 | parameters: | ||
| 1176 | - description: JWT Token | ||
| 1177 | in: header | ||
| 1178 | name: Authorization | ||
| 1179 | required: true | ||
| 1180 | type: string | ||
| 1181 | produces: | ||
| 1182 | - application/json | ||
| 1183 | responses: | ||
| 1184 | "200": | ||
| 1185 | description: OK | ||
| 1186 | schema: | ||
| 1187 | allOf: | ||
| 1188 | - $ref: '#/definitions/models.Response' | ||
| 1189 | - properties: | ||
| 1190 | data: | ||
| 1191 | $ref: '#/definitions/handlers.ProfileResponse' | ||
| 1192 | type: object | ||
| 1193 | tags: | ||
| 1194 | - users | ||
| 1195 | put: | ||
| 1196 | consumes: | ||
| 1197 | - application/json | ||
| 1198 | description: Update country code of session user. | ||
| 1199 | parameters: | ||
| 1200 | - description: JWT Token | ||
| 1201 | in: header | ||
| 1202 | name: Authorization | ||
| 1203 | required: true | ||
| 1204 | type: string | ||
| 1205 | - description: Country Code [XX] | ||
| 1206 | in: query | ||
| 1207 | name: country_code | ||
| 1208 | required: true | ||
| 1209 | type: string | ||
| 1210 | produces: | ||
| 1211 | - application/json | ||
| 1212 | responses: | ||
| 1213 | "200": | ||
| 1214 | description: OK | ||
| 1215 | schema: | ||
| 1216 | $ref: '#/definitions/models.Response' | ||
| 1217 | tags: | ||
| 1218 | - users | ||
| 1219 | /rankings: | ||
| 1220 | get: | ||
| 1221 | description: Get rankings of every player. | ||
| 1222 | produces: | ||
| 1223 | - application/json | ||
| 1224 | responses: | ||
| 1225 | "200": | ||
| 1226 | description: OK | ||
| 1227 | schema: | ||
| 1228 | allOf: | ||
| 1229 | - $ref: '#/definitions/models.Response' | ||
| 1230 | - properties: | ||
| 1231 | data: | ||
| 1232 | $ref: '#/definitions/handlers.RankingsResponse' | ||
| 1233 | type: object | ||
| 1234 | tags: | ||
| 1235 | - rankings | ||
| 1236 | /search: | ||
| 1237 | get: | ||
| 1238 | description: Get all user and map data matching to the query. | ||
| 1239 | parameters: | ||
| 1240 | - description: Search user or map name. | ||
| 1241 | in: query | ||
| 1242 | name: q | ||
| 1243 | type: string | ||
| 1244 | produces: | ||
| 1245 | - application/json | ||
| 1246 | responses: | ||
| 1247 | "200": | ||
| 1248 | description: OK | ||
| 1249 | schema: | ||
| 1250 | allOf: | ||
| 1251 | - $ref: '#/definitions/models.Response' | ||
| 1252 | - properties: | ||
| 1253 | data: | ||
| 1254 | $ref: '#/definitions/handlers.SearchResponse' | ||
| 1255 | type: object | ||
| 1256 | tags: | ||
| 1257 | - search | ||
| 1258 | /token: | ||
| 1259 | delete: | ||
| 1260 | description: Deletes the token cookie from the user. | ||
| 1261 | produces: | ||
| 1262 | - application/json | ||
| 1263 | responses: | ||
| 1264 | "200": | ||
| 1265 | description: OK | ||
| 1266 | schema: | ||
| 1267 | allOf: | ||
| 1268 | - $ref: '#/definitions/models.Response' | ||
| 1269 | - properties: | ||
| 1270 | data: | ||
| 1271 | $ref: '#/definitions/handlers.LoginResponse' | ||
| 1272 | type: object | ||
| 1273 | "404": | ||
| 1274 | description: Not Found | ||
| 1275 | schema: | ||
| 1276 | $ref: '#/definitions/models.Response' | ||
| 1277 | tags: | ||
| 1278 | - auth | ||
| 1279 | get: | ||
| 1280 | description: Gets the token cookie value from the user. | ||
| 1281 | produces: | ||
| 1282 | - application/json | ||
| 1283 | responses: | ||
| 1284 | "200": | ||
| 1285 | description: OK | ||
| 1286 | schema: | ||
| 1287 | allOf: | ||
| 1288 | - $ref: '#/definitions/models.Response' | ||
| 1289 | - properties: | ||
| 1290 | data: | ||
| 1291 | $ref: '#/definitions/handlers.LoginResponse' | ||
| 1292 | type: object | ||
| 1293 | "404": | ||
| 1294 | description: Not Found | ||
| 1295 | schema: | ||
| 1296 | $ref: '#/definitions/models.Response' | ||
| 1297 | tags: | ||
| 1298 | - auth | ||
| 1299 | /users/{userid}: | ||
| 1300 | get: | ||
| 1301 | consumes: | ||
| 1302 | - application/json | ||
| 1303 | description: Get profile page of another user. | ||
| 1304 | parameters: | ||
| 1305 | - description: User ID | ||
| 1306 | in: path | ||
| 1307 | name: userid | ||
| 1308 | required: true | ||
| 1309 | type: integer | ||
| 1310 | produces: | ||
| 1311 | - application/json | ||
| 1312 | responses: | ||
| 1313 | "200": | ||
| 1314 | description: OK | ||
| 1315 | schema: | ||
| 1316 | allOf: | ||
| 1317 | - $ref: '#/definitions/models.Response' | ||
| 1318 | - properties: | ||
| 1319 | data: | ||
| 1320 | $ref: '#/definitions/handlers.ProfileResponse' | ||
| 1321 | type: object | ||
| 1322 | tags: | ||
| 1323 | - users | ||
| 1324 | swagger: "2.0" | ||