diff options
Diffstat (limited to '')
| -rw-r--r-- | docs/docs.go | 641 |
1 files changed, 472 insertions, 169 deletions
diff --git a/docs/docs.go b/docs/docs.go index d39fd1c..423afad 100644 --- a/docs/docs.go +++ b/docs/docs.go | |||
| @@ -22,13 +22,13 @@ const docTemplate = `{ | |||
| 22 | "paths": { | 22 | "paths": { |
| 23 | "/chapters/{id}": { | 23 | "/chapters/{id}": { |
| 24 | "get": { | 24 | "get": { |
| 25 | "description": "Get maps from the specified chapter id.", | ||
| 25 | "produces": [ | 26 | "produces": [ |
| 26 | "application/json" | 27 | "application/json" |
| 27 | ], | 28 | ], |
| 28 | "tags": [ | 29 | "tags": [ |
| 29 | "games \u0026 chapters" | 30 | "games \u0026 chapters" |
| 30 | ], | 31 | ], |
| 31 | "summary": "Get maps from the specified chapter id.", | ||
| 32 | "parameters": [ | 32 | "parameters": [ |
| 33 | { | 33 | { |
| 34 | "type": "integer", | 34 | "type": "integer", |
| @@ -66,45 +66,9 @@ const docTemplate = `{ | |||
| 66 | } | 66 | } |
| 67 | } | 67 | } |
| 68 | }, | 68 | }, |
| 69 | "/demo": { | ||
| 70 | "get": { | ||
| 71 | "produces": [ | ||
| 72 | "application/json" | ||
| 73 | ], | ||
| 74 | "tags": [ | ||
| 75 | "rankings" | ||
| 76 | ], | ||
| 77 | "summary": "Get rankings of every player.", | ||
| 78 | "responses": { | ||
| 79 | "200": { | ||
| 80 | "description": "OK", | ||
| 81 | "schema": { | ||
| 82 | "allOf": [ | ||
| 83 | { | ||
| 84 | "$ref": "#/definitions/models.Response" | ||
| 85 | }, | ||
| 86 | { | ||
| 87 | "type": "object", | ||
| 88 | "properties": { | ||
| 89 | "data": { | ||
| 90 | "$ref": "#/definitions/models.RankingsResponse" | ||
| 91 | } | ||
| 92 | } | ||
| 93 | } | ||
| 94 | ] | ||
| 95 | } | ||
| 96 | }, | ||
| 97 | "400": { | ||
| 98 | "description": "Bad Request", | ||
| 99 | "schema": { | ||
| 100 | "$ref": "#/definitions/models.Response" | ||
| 101 | } | ||
| 102 | } | ||
| 103 | } | ||
| 104 | } | ||
| 105 | }, | ||
| 106 | "/demos": { | 69 | "/demos": { |
| 107 | "get": { | 70 | "get": { |
| 71 | "description": "Get demo with specified demo uuid.", | ||
| 108 | "consumes": [ | 72 | "consumes": [ |
| 109 | "application/json" | 73 | "application/json" |
| 110 | ], | 74 | ], |
| @@ -114,10 +78,9 @@ const docTemplate = `{ | |||
| 114 | "tags": [ | 78 | "tags": [ |
| 115 | "demo" | 79 | "demo" |
| 116 | ], | 80 | ], |
| 117 | "summary": "Get demo with specified demo uuid.", | ||
| 118 | "parameters": [ | 81 | "parameters": [ |
| 119 | { | 82 | { |
| 120 | "type": "integer", | 83 | "type": "string", |
| 121 | "description": "Demo UUID", | 84 | "description": "Demo UUID", |
| 122 | "name": "uuid", | 85 | "name": "uuid", |
| 123 | "in": "query", | 86 | "in": "query", |
| @@ -142,13 +105,13 @@ const docTemplate = `{ | |||
| 142 | }, | 105 | }, |
| 143 | "/games": { | 106 | "/games": { |
| 144 | "get": { | 107 | "get": { |
| 108 | "description": "Get games from the leaderboards.", | ||
| 145 | "produces": [ | 109 | "produces": [ |
| 146 | "application/json" | 110 | "application/json" |
| 147 | ], | 111 | ], |
| 148 | "tags": [ | 112 | "tags": [ |
| 149 | "games \u0026 chapters" | 113 | "games \u0026 chapters" |
| 150 | ], | 114 | ], |
| 151 | "summary": "Get games from the leaderboards.", | ||
| 152 | "responses": { | 115 | "responses": { |
| 153 | "200": { | 116 | "200": { |
| 154 | "description": "OK", | 117 | "description": "OK", |
| @@ -182,13 +145,13 @@ const docTemplate = `{ | |||
| 182 | }, | 145 | }, |
| 183 | "/games/{id}": { | 146 | "/games/{id}": { |
| 184 | "get": { | 147 | "get": { |
| 148 | "description": "Get chapters from the specified game id.", | ||
| 185 | "produces": [ | 149 | "produces": [ |
| 186 | "application/json" | 150 | "application/json" |
| 187 | ], | 151 | ], |
| 188 | "tags": [ | 152 | "tags": [ |
| 189 | "games \u0026 chapters" | 153 | "games \u0026 chapters" |
| 190 | ], | 154 | ], |
| 191 | "summary": "Get chapters from the specified game id.", | ||
| 192 | "parameters": [ | 155 | "parameters": [ |
| 193 | { | 156 | { |
| 194 | "type": "integer", | 157 | "type": "integer", |
| @@ -228,6 +191,7 @@ const docTemplate = `{ | |||
| 228 | }, | 191 | }, |
| 229 | "/login": { | 192 | "/login": { |
| 230 | "get": { | 193 | "get": { |
| 194 | "description": "Get (redirect) login page for Steam auth.", | ||
| 231 | "consumes": [ | 195 | "consumes": [ |
| 232 | "application/json" | 196 | "application/json" |
| 233 | ], | 197 | ], |
| @@ -237,7 +201,6 @@ const docTemplate = `{ | |||
| 237 | "tags": [ | 201 | "tags": [ |
| 238 | "login" | 202 | "login" |
| 239 | ], | 203 | ], |
| 240 | "summary": "Get (redirect) login page for Steam auth.", | ||
| 241 | "responses": { | 204 | "responses": { |
| 242 | "200": { | 205 | "200": { |
| 243 | "description": "OK", | 206 | "description": "OK", |
| @@ -266,15 +229,77 @@ const docTemplate = `{ | |||
| 266 | } | 229 | } |
| 267 | } | 230 | } |
| 268 | }, | 231 | }, |
| 232 | "/maps/{id}/image": { | ||
| 233 | "put": { | ||
| 234 | "description": "Edit map image with specified map id.", | ||
| 235 | "produces": [ | ||
| 236 | "application/json" | ||
| 237 | ], | ||
| 238 | "tags": [ | ||
| 239 | "maps" | ||
| 240 | ], | ||
| 241 | "parameters": [ | ||
| 242 | { | ||
| 243 | "type": "string", | ||
| 244 | "description": "JWT Token", | ||
| 245 | "name": "Authorization", | ||
| 246 | "in": "header", | ||
| 247 | "required": true | ||
| 248 | }, | ||
| 249 | { | ||
| 250 | "type": "integer", | ||
| 251 | "description": "Map ID", | ||
| 252 | "name": "id", | ||
| 253 | "in": "path", | ||
| 254 | "required": true | ||
| 255 | }, | ||
| 256 | { | ||
| 257 | "description": "Body", | ||
| 258 | "name": "request", | ||
| 259 | "in": "body", | ||
| 260 | "required": true, | ||
| 261 | "schema": { | ||
| 262 | "$ref": "#/definitions/models.EditMapImageRequest" | ||
| 263 | } | ||
| 264 | } | ||
| 265 | ], | ||
| 266 | "responses": { | ||
| 267 | "200": { | ||
| 268 | "description": "OK", | ||
| 269 | "schema": { | ||
| 270 | "allOf": [ | ||
| 271 | { | ||
| 272 | "$ref": "#/definitions/models.Response" | ||
| 273 | }, | ||
| 274 | { | ||
| 275 | "type": "object", | ||
| 276 | "properties": { | ||
| 277 | "data": { | ||
| 278 | "$ref": "#/definitions/models.EditMapImageRequest" | ||
| 279 | } | ||
| 280 | } | ||
| 281 | } | ||
| 282 | ] | ||
| 283 | } | ||
| 284 | }, | ||
| 285 | "400": { | ||
| 286 | "description": "Bad Request", | ||
| 287 | "schema": { | ||
| 288 | "$ref": "#/definitions/models.Response" | ||
| 289 | } | ||
| 290 | } | ||
| 291 | } | ||
| 292 | } | ||
| 293 | }, | ||
| 269 | "/maps/{id}/leaderboards": { | 294 | "/maps/{id}/leaderboards": { |
| 270 | "get": { | 295 | "get": { |
| 296 | "description": "Get map leaderboards with specified id.", | ||
| 271 | "produces": [ | 297 | "produces": [ |
| 272 | "application/json" | 298 | "application/json" |
| 273 | ], | 299 | ], |
| 274 | "tags": [ | 300 | "tags": [ |
| 275 | "maps" | 301 | "maps" |
| 276 | ], | 302 | ], |
| 277 | "summary": "Get map leaderboards with specified id.", | ||
| 278 | "parameters": [ | 303 | "parameters": [ |
| 279 | { | 304 | { |
| 280 | "type": "integer", | 305 | "type": "integer", |
| @@ -326,6 +351,7 @@ const docTemplate = `{ | |||
| 326 | }, | 351 | }, |
| 327 | "/maps/{id}/record": { | 352 | "/maps/{id}/record": { |
| 328 | "post": { | 353 | "post": { |
| 354 | "description": "Post record with demo of a specific map.", | ||
| 329 | "consumes": [ | 355 | "consumes": [ |
| 330 | "multipart/form-data" | 356 | "multipart/form-data" |
| 331 | ], | 357 | ], |
| @@ -335,9 +361,15 @@ const docTemplate = `{ | |||
| 335 | "tags": [ | 361 | "tags": [ |
| 336 | "maps" | 362 | "maps" |
| 337 | ], | 363 | ], |
| 338 | "summary": "Post record with demo of a specific map.", | ||
| 339 | "parameters": [ | 364 | "parameters": [ |
| 340 | { | 365 | { |
| 366 | "type": "integer", | ||
| 367 | "description": "Map ID", | ||
| 368 | "name": "id", | ||
| 369 | "in": "path", | ||
| 370 | "required": true | ||
| 371 | }, | ||
| 372 | { | ||
| 341 | "type": "string", | 373 | "type": "string", |
| 342 | "description": "JWT Token", | 374 | "description": "JWT Token", |
| 343 | "name": "Authorization", | 375 | "name": "Authorization", |
| @@ -345,42 +377,29 @@ const docTemplate = `{ | |||
| 345 | "required": true | 377 | "required": true |
| 346 | }, | 378 | }, |
| 347 | { | 379 | { |
| 348 | "type": "array", | 380 | "type": "file", |
| 349 | "items": { | 381 | "description": "Host Demo", |
| 350 | "type": "file" | 382 | "name": "host_demo", |
| 351 | }, | ||
| 352 | "description": "Demos", | ||
| 353 | "name": "demos", | ||
| 354 | "in": "formData", | 383 | "in": "formData", |
| 355 | "required": true | 384 | "required": true |
| 356 | }, | 385 | }, |
| 357 | { | 386 | { |
| 358 | "type": "integer", | 387 | "type": "file", |
| 359 | "description": "Score Count", | 388 | "description": "Partner Demo", |
| 360 | "name": "score_count", | 389 | "name": "partner_demo", |
| 361 | "in": "formData", | 390 | "in": "formData" |
| 362 | "required": true | ||
| 363 | }, | ||
| 364 | { | ||
| 365 | "type": "integer", | ||
| 366 | "description": "Score Time", | ||
| 367 | "name": "score_time", | ||
| 368 | "in": "formData", | ||
| 369 | "required": true | ||
| 370 | }, | 391 | }, |
| 371 | { | 392 | { |
| 372 | "type": "boolean", | 393 | "type": "boolean", |
| 373 | "description": "Is Partner Orange", | 394 | "description": "Is Partner Orange", |
| 374 | "name": "is_partner_orange", | 395 | "name": "is_partner_orange", |
| 375 | "in": "formData", | 396 | "in": "formData" |
| 376 | "required": true | ||
| 377 | }, | 397 | }, |
| 378 | { | 398 | { |
| 379 | "type": "string", | 399 | "type": "string", |
| 380 | "description": "Partner ID", | 400 | "description": "Partner ID", |
| 381 | "name": "partner_id", | 401 | "name": "partner_id", |
| 382 | "in": "formData", | 402 | "in": "formData" |
| 383 | "required": true | ||
| 384 | } | 403 | } |
| 385 | ], | 404 | ], |
| 386 | "responses": { | 405 | "responses": { |
| @@ -395,7 +414,7 @@ const docTemplate = `{ | |||
| 395 | "type": "object", | 414 | "type": "object", |
| 396 | "properties": { | 415 | "properties": { |
| 397 | "data": { | 416 | "data": { |
| 398 | "$ref": "#/definitions/models.RecordRequest" | 417 | "$ref": "#/definitions/models.RecordResponse" |
| 399 | } | 418 | } |
| 400 | } | 419 | } |
| 401 | } | 420 | } |
| @@ -419,13 +438,13 @@ const docTemplate = `{ | |||
| 419 | }, | 438 | }, |
| 420 | "/maps/{id}/summary": { | 439 | "/maps/{id}/summary": { |
| 421 | "get": { | 440 | "get": { |
| 441 | "description": "Get map summary with specified id.", | ||
| 422 | "produces": [ | 442 | "produces": [ |
| 423 | "application/json" | 443 | "application/json" |
| 424 | ], | 444 | ], |
| 425 | "tags": [ | 445 | "tags": [ |
| 426 | "maps" | 446 | "maps" |
| 427 | ], | 447 | ], |
| 428 | "summary": "Get map summary with specified id.", | ||
| 429 | "parameters": [ | 448 | "parameters": [ |
| 430 | { | 449 | { |
| 431 | "type": "integer", | 450 | "type": "integer", |
| @@ -447,19 +466,187 @@ const docTemplate = `{ | |||
| 447 | "type": "object", | 466 | "type": "object", |
| 448 | "properties": { | 467 | "properties": { |
| 449 | "data": { | 468 | "data": { |
| 450 | "allOf": [ | 469 | "$ref": "#/definitions/models.MapSummaryResponse" |
| 451 | { | 470 | } |
| 452 | "$ref": "#/definitions/models.Map" | 471 | } |
| 453 | }, | 472 | } |
| 454 | { | 473 | ] |
| 455 | "type": "object", | 474 | } |
| 456 | "properties": { | 475 | }, |
| 457 | "data": { | 476 | "400": { |
| 458 | "$ref": "#/definitions/models.MapSummary" | 477 | "description": "Bad Request", |
| 459 | } | 478 | "schema": { |
| 460 | } | 479 | "$ref": "#/definitions/models.Response" |
| 461 | } | 480 | } |
| 462 | ] | 481 | } |
| 482 | } | ||
| 483 | }, | ||
| 484 | "put": { | ||
| 485 | "description": "Edit map summary with specified map id.", | ||
| 486 | "produces": [ | ||
| 487 | "application/json" | ||
| 488 | ], | ||
| 489 | "tags": [ | ||
| 490 | "maps" | ||
| 491 | ], | ||
| 492 | "parameters": [ | ||
| 493 | { | ||
| 494 | "type": "string", | ||
| 495 | "description": "JWT Token", | ||
| 496 | "name": "Authorization", | ||
| 497 | "in": "header", | ||
| 498 | "required": true | ||
| 499 | }, | ||
| 500 | { | ||
| 501 | "type": "integer", | ||
| 502 | "description": "Map ID", | ||
| 503 | "name": "id", | ||
| 504 | "in": "path", | ||
| 505 | "required": true | ||
| 506 | }, | ||
| 507 | { | ||
| 508 | "description": "Body", | ||
| 509 | "name": "request", | ||
| 510 | "in": "body", | ||
| 511 | "required": true, | ||
| 512 | "schema": { | ||
| 513 | "$ref": "#/definitions/models.EditMapSummaryRequest" | ||
| 514 | } | ||
| 515 | } | ||
| 516 | ], | ||
| 517 | "responses": { | ||
| 518 | "200": { | ||
| 519 | "description": "OK", | ||
| 520 | "schema": { | ||
| 521 | "allOf": [ | ||
| 522 | { | ||
| 523 | "$ref": "#/definitions/models.Response" | ||
| 524 | }, | ||
| 525 | { | ||
| 526 | "type": "object", | ||
| 527 | "properties": { | ||
| 528 | "data": { | ||
| 529 | "$ref": "#/definitions/models.EditMapSummaryRequest" | ||
| 530 | } | ||
| 531 | } | ||
| 532 | } | ||
| 533 | ] | ||
| 534 | } | ||
| 535 | }, | ||
| 536 | "400": { | ||
| 537 | "description": "Bad Request", | ||
| 538 | "schema": { | ||
| 539 | "$ref": "#/definitions/models.Response" | ||
| 540 | } | ||
| 541 | } | ||
| 542 | } | ||
| 543 | }, | ||
| 544 | "post": { | ||
| 545 | "description": "Create map summary with specified map id.", | ||
| 546 | "produces": [ | ||
| 547 | "application/json" | ||
| 548 | ], | ||
| 549 | "tags": [ | ||
| 550 | "maps" | ||
| 551 | ], | ||
| 552 | "parameters": [ | ||
| 553 | { | ||
| 554 | "type": "string", | ||
| 555 | "description": "JWT Token", | ||
| 556 | "name": "Authorization", | ||
| 557 | "in": "header", | ||
| 558 | "required": true | ||
| 559 | }, | ||
| 560 | { | ||
| 561 | "type": "integer", | ||
| 562 | "description": "Map ID", | ||
| 563 | "name": "id", | ||
| 564 | "in": "path", | ||
| 565 | "required": true | ||
| 566 | }, | ||
| 567 | { | ||
| 568 | "description": "Body", | ||
| 569 | "name": "request", | ||
| 570 | "in": "body", | ||
| 571 | "required": true, | ||
| 572 | "schema": { | ||
| 573 | "$ref": "#/definitions/models.CreateMapSummaryRequest" | ||
| 574 | } | ||
| 575 | } | ||
| 576 | ], | ||
| 577 | "responses": { | ||
| 578 | "200": { | ||
| 579 | "description": "OK", | ||
| 580 | "schema": { | ||
| 581 | "allOf": [ | ||
| 582 | { | ||
| 583 | "$ref": "#/definitions/models.Response" | ||
| 584 | }, | ||
| 585 | { | ||
| 586 | "type": "object", | ||
| 587 | "properties": { | ||
| 588 | "data": { | ||
| 589 | "$ref": "#/definitions/models.CreateMapSummaryRequest" | ||
| 590 | } | ||
| 591 | } | ||
| 592 | } | ||
| 593 | ] | ||
| 594 | } | ||
| 595 | }, | ||
| 596 | "400": { | ||
| 597 | "description": "Bad Request", | ||
| 598 | "schema": { | ||
| 599 | "$ref": "#/definitions/models.Response" | ||
| 600 | } | ||
| 601 | } | ||
| 602 | } | ||
| 603 | }, | ||
| 604 | "delete": { | ||
| 605 | "description": "Delete map summary with specified map id.", | ||
| 606 | "produces": [ | ||
| 607 | "application/json" | ||
| 608 | ], | ||
| 609 | "tags": [ | ||
| 610 | "maps" | ||
| 611 | ], | ||
| 612 | "parameters": [ | ||
| 613 | { | ||
| 614 | "type": "string", | ||
| 615 | "description": "JWT Token", | ||
| 616 | "name": "Authorization", | ||
| 617 | "in": "header", | ||
| 618 | "required": true | ||
| 619 | }, | ||
| 620 | { | ||
| 621 | "type": "integer", | ||
| 622 | "description": "Map ID", | ||
| 623 | "name": "id", | ||
| 624 | "in": "path", | ||
| 625 | "required": true | ||
| 626 | }, | ||
| 627 | { | ||
| 628 | "description": "Body", | ||
| 629 | "name": "request", | ||
| 630 | "in": "body", | ||
| 631 | "required": true, | ||
| 632 | "schema": { | ||
| 633 | "$ref": "#/definitions/models.DeleteMapSummaryRequest" | ||
| 634 | } | ||
| 635 | } | ||
| 636 | ], | ||
| 637 | "responses": { | ||
| 638 | "200": { | ||
| 639 | "description": "OK", | ||
| 640 | "schema": { | ||
| 641 | "allOf": [ | ||
| 642 | { | ||
| 643 | "$ref": "#/definitions/models.Response" | ||
| 644 | }, | ||
| 645 | { | ||
| 646 | "type": "object", | ||
| 647 | "properties": { | ||
| 648 | "data": { | ||
| 649 | "$ref": "#/definitions/models.DeleteMapSummaryRequest" | ||
| 463 | } | 650 | } |
| 464 | } | 651 | } |
| 465 | } | 652 | } |
| @@ -477,6 +664,7 @@ const docTemplate = `{ | |||
| 477 | }, | 664 | }, |
| 478 | "/profile": { | 665 | "/profile": { |
| 479 | "get": { | 666 | "get": { |
| 667 | "description": "Get profile page of session user.", | ||
| 480 | "consumes": [ | 668 | "consumes": [ |
| 481 | "application/json" | 669 | "application/json" |
| 482 | ], | 670 | ], |
| @@ -486,7 +674,6 @@ const docTemplate = `{ | |||
| 486 | "tags": [ | 674 | "tags": [ |
| 487 | "users" | 675 | "users" |
| 488 | ], | 676 | ], |
| 489 | "summary": "Get profile page of session user.", | ||
| 490 | "parameters": [ | 677 | "parameters": [ |
| 491 | { | 678 | { |
| 492 | "type": "string", | 679 | "type": "string", |
| @@ -530,6 +717,7 @@ const docTemplate = `{ | |||
| 530 | } | 717 | } |
| 531 | }, | 718 | }, |
| 532 | "put": { | 719 | "put": { |
| 720 | "description": "Update country code of session user.", | ||
| 533 | "consumes": [ | 721 | "consumes": [ |
| 534 | "application/json" | 722 | "application/json" |
| 535 | ], | 723 | ], |
| @@ -539,7 +727,6 @@ const docTemplate = `{ | |||
| 539 | "tags": [ | 727 | "tags": [ |
| 540 | "users" | 728 | "users" |
| 541 | ], | 729 | ], |
| 542 | "summary": "Update country code of session user.", | ||
| 543 | "parameters": [ | 730 | "parameters": [ |
| 544 | { | 731 | { |
| 545 | "type": "string", | 732 | "type": "string", |
| @@ -560,19 +747,7 @@ const docTemplate = `{ | |||
| 560 | "200": { | 747 | "200": { |
| 561 | "description": "OK", | 748 | "description": "OK", |
| 562 | "schema": { | 749 | "schema": { |
| 563 | "allOf": [ | 750 | "$ref": "#/definitions/models.Response" |
| 564 | { | ||
| 565 | "$ref": "#/definitions/models.Response" | ||
| 566 | }, | ||
| 567 | { | ||
| 568 | "type": "object", | ||
| 569 | "properties": { | ||
| 570 | "data": { | ||
| 571 | "$ref": "#/definitions/models.ProfileResponse" | ||
| 572 | } | ||
| 573 | } | ||
| 574 | } | ||
| 575 | ] | ||
| 576 | } | 751 | } |
| 577 | }, | 752 | }, |
| 578 | "400": { | 753 | "400": { |
| @@ -590,6 +765,7 @@ const docTemplate = `{ | |||
| 590 | } | 765 | } |
| 591 | }, | 766 | }, |
| 592 | "post": { | 767 | "post": { |
| 768 | "description": "Update profile page of session user.", | ||
| 593 | "consumes": [ | 769 | "consumes": [ |
| 594 | "application/json" | 770 | "application/json" |
| 595 | ], | 771 | ], |
| @@ -599,7 +775,6 @@ const docTemplate = `{ | |||
| 599 | "tags": [ | 775 | "tags": [ |
| 600 | "users" | 776 | "users" |
| 601 | ], | 777 | ], |
| 602 | "summary": "Update profile page of session user.", | ||
| 603 | "parameters": [ | 778 | "parameters": [ |
| 604 | { | 779 | { |
| 605 | "type": "string", | 780 | "type": "string", |
| @@ -643,15 +818,60 @@ const docTemplate = `{ | |||
| 643 | } | 818 | } |
| 644 | } | 819 | } |
| 645 | }, | 820 | }, |
| 821 | "/rankings": { | ||
| 822 | "get": { | ||
| 823 | "description": "Get rankings of every player.", | ||
| 824 | "produces": [ | ||
| 825 | "application/json" | ||
| 826 | ], | ||
| 827 | "tags": [ | ||
| 828 | "rankings" | ||
| 829 | ], | ||
| 830 | "responses": { | ||
| 831 | "200": { | ||
| 832 | "description": "OK", | ||
| 833 | "schema": { | ||
| 834 | "allOf": [ | ||
| 835 | { | ||
| 836 | "$ref": "#/definitions/models.Response" | ||
| 837 | }, | ||
| 838 | { | ||
| 839 | "type": "object", | ||
| 840 | "properties": { | ||
| 841 | "data": { | ||
| 842 | "$ref": "#/definitions/models.RankingsResponse" | ||
| 843 | } | ||
| 844 | } | ||
| 845 | } | ||
| 846 | ] | ||
| 847 | } | ||
| 848 | }, | ||
| 849 | "400": { | ||
| 850 | "description": "Bad Request", | ||
| 851 | "schema": { | ||
| 852 | "$ref": "#/definitions/models.Response" | ||
| 853 | } | ||
| 854 | } | ||
| 855 | } | ||
| 856 | } | ||
| 857 | }, | ||
| 646 | "/search": { | 858 | "/search": { |
| 647 | "get": { | 859 | "get": { |
| 860 | "description": "Get all user and map data matching to the query.", | ||
| 648 | "produces": [ | 861 | "produces": [ |
| 649 | "application/json" | 862 | "application/json" |
| 650 | ], | 863 | ], |
| 651 | "tags": [ | 864 | "tags": [ |
| 652 | "search" | 865 | "search" |
| 653 | ], | 866 | ], |
| 654 | "summary": "Get all user and map data.", | 867 | "parameters": [ |
| 868 | { | ||
| 869 | "type": "string", | ||
| 870 | "description": "Search user or map name.", | ||
| 871 | "name": "q", | ||
| 872 | "in": "query" | ||
| 873 | } | ||
| 874 | ], | ||
| 655 | "responses": { | 875 | "responses": { |
| 656 | "200": { | 876 | "200": { |
| 657 | "description": "OK", | 877 | "description": "OK", |
| @@ -682,13 +902,13 @@ const docTemplate = `{ | |||
| 682 | }, | 902 | }, |
| 683 | "/token": { | 903 | "/token": { |
| 684 | "get": { | 904 | "get": { |
| 905 | "description": "Gets the token cookie value from the user.", | ||
| 685 | "produces": [ | 906 | "produces": [ |
| 686 | "application/json" | 907 | "application/json" |
| 687 | ], | 908 | ], |
| 688 | "tags": [ | 909 | "tags": [ |
| 689 | "auth" | 910 | "auth" |
| 690 | ], | 911 | ], |
| 691 | "summary": "Gets the token cookie value from the user.", | ||
| 692 | "responses": { | 912 | "responses": { |
| 693 | "200": { | 913 | "200": { |
| 694 | "description": "OK", | 914 | "description": "OK", |
| @@ -717,13 +937,13 @@ const docTemplate = `{ | |||
| 717 | } | 937 | } |
| 718 | }, | 938 | }, |
| 719 | "delete": { | 939 | "delete": { |
| 940 | "description": "Deletes the token cookie from the user.", | ||
| 720 | "produces": [ | 941 | "produces": [ |
| 721 | "application/json" | 942 | "application/json" |
| 722 | ], | 943 | ], |
| 723 | "tags": [ | 944 | "tags": [ |
| 724 | "auth" | 945 | "auth" |
| 725 | ], | 946 | ], |
| 726 | "summary": "Deletes the token cookie from the user.", | ||
| 727 | "responses": { | 947 | "responses": { |
| 728 | "200": { | 948 | "200": { |
| 729 | "description": "OK", | 949 | "description": "OK", |
| @@ -754,6 +974,7 @@ const docTemplate = `{ | |||
| 754 | }, | 974 | }, |
| 755 | "/users/{id}": { | 975 | "/users/{id}": { |
| 756 | "get": { | 976 | "get": { |
| 977 | "description": "Get profile page of another user.", | ||
| 757 | "consumes": [ | 978 | "consumes": [ |
| 758 | "application/json" | 979 | "application/json" |
| 759 | ], | 980 | ], |
| @@ -763,7 +984,6 @@ const docTemplate = `{ | |||
| 763 | "tags": [ | 984 | "tags": [ |
| 764 | "users" | 985 | "users" |
| 765 | ], | 986 | ], |
| 766 | "summary": "Get profile page of another user.", | ||
| 767 | "parameters": [ | 987 | "parameters": [ |
| 768 | { | 988 | { |
| 769 | "type": "integer", | 989 | "type": "integer", |
| @@ -809,6 +1029,17 @@ const docTemplate = `{ | |||
| 809 | } | 1029 | } |
| 810 | }, | 1030 | }, |
| 811 | "definitions": { | 1031 | "definitions": { |
| 1032 | "models.Category": { | ||
| 1033 | "type": "object", | ||
| 1034 | "properties": { | ||
| 1035 | "id": { | ||
| 1036 | "type": "integer" | ||
| 1037 | }, | ||
| 1038 | "name": { | ||
| 1039 | "type": "string" | ||
| 1040 | } | ||
| 1041 | } | ||
| 1042 | }, | ||
| 812 | "models.Chapter": { | 1043 | "models.Chapter": { |
| 813 | "type": "object", | 1044 | "type": "object", |
| 814 | "properties": { | 1045 | "properties": { |
| @@ -848,12 +1079,97 @@ const docTemplate = `{ | |||
| 848 | } | 1079 | } |
| 849 | } | 1080 | } |
| 850 | }, | 1081 | }, |
| 1082 | "models.CreateMapSummaryRequest": { | ||
| 1083 | "type": "object", | ||
| 1084 | "required": [ | ||
| 1085 | "category_id", | ||
| 1086 | "description", | ||
| 1087 | "record_date", | ||
| 1088 | "score_count", | ||
| 1089 | "user_name" | ||
| 1090 | ], | ||
| 1091 | "properties": { | ||
| 1092 | "category_id": { | ||
| 1093 | "type": "integer" | ||
| 1094 | }, | ||
| 1095 | "description": { | ||
| 1096 | "type": "string" | ||
| 1097 | }, | ||
| 1098 | "record_date": { | ||
| 1099 | "type": "string" | ||
| 1100 | }, | ||
| 1101 | "score_count": { | ||
| 1102 | "type": "integer" | ||
| 1103 | }, | ||
| 1104 | "showcase": { | ||
| 1105 | "type": "string" | ||
| 1106 | }, | ||
| 1107 | "user_name": { | ||
| 1108 | "type": "string" | ||
| 1109 | } | ||
| 1110 | } | ||
| 1111 | }, | ||
| 1112 | "models.DeleteMapSummaryRequest": { | ||
| 1113 | "type": "object", | ||
| 1114 | "required": [ | ||
| 1115 | "route_id" | ||
| 1116 | ], | ||
| 1117 | "properties": { | ||
| 1118 | "route_id": { | ||
| 1119 | "type": "integer" | ||
| 1120 | } | ||
| 1121 | } | ||
| 1122 | }, | ||
| 1123 | "models.EditMapImageRequest": { | ||
| 1124 | "type": "object", | ||
| 1125 | "required": [ | ||
| 1126 | "image" | ||
| 1127 | ], | ||
| 1128 | "properties": { | ||
| 1129 | "image": { | ||
| 1130 | "type": "string" | ||
| 1131 | } | ||
| 1132 | } | ||
| 1133 | }, | ||
| 1134 | "models.EditMapSummaryRequest": { | ||
| 1135 | "type": "object", | ||
| 1136 | "required": [ | ||
| 1137 | "description", | ||
| 1138 | "record_date", | ||
| 1139 | "route_id", | ||
| 1140 | "score_count", | ||
| 1141 | "user_name" | ||
| 1142 | ], | ||
| 1143 | "properties": { | ||
| 1144 | "description": { | ||
| 1145 | "type": "string" | ||
| 1146 | }, | ||
| 1147 | "record_date": { | ||
| 1148 | "type": "string" | ||
| 1149 | }, | ||
| 1150 | "route_id": { | ||
| 1151 | "type": "integer" | ||
| 1152 | }, | ||
| 1153 | "score_count": { | ||
| 1154 | "type": "integer" | ||
| 1155 | }, | ||
| 1156 | "showcase": { | ||
| 1157 | "type": "string" | ||
| 1158 | }, | ||
| 1159 | "user_name": { | ||
| 1160 | "type": "string" | ||
| 1161 | } | ||
| 1162 | } | ||
| 1163 | }, | ||
| 851 | "models.Game": { | 1164 | "models.Game": { |
| 852 | "type": "object", | 1165 | "type": "object", |
| 853 | "properties": { | 1166 | "properties": { |
| 854 | "id": { | 1167 | "id": { |
| 855 | "type": "integer" | 1168 | "type": "integer" |
| 856 | }, | 1169 | }, |
| 1170 | "is_coop": { | ||
| 1171 | "type": "boolean" | ||
| 1172 | }, | ||
| 857 | "name": { | 1173 | "name": { |
| 858 | "type": "string" | 1174 | "type": "string" |
| 859 | } | 1175 | } |
| @@ -873,32 +1189,20 @@ const docTemplate = `{ | |||
| 873 | "chapter_name": { | 1189 | "chapter_name": { |
| 874 | "type": "string" | 1190 | "type": "string" |
| 875 | }, | 1191 | }, |
| 876 | "data": {}, | ||
| 877 | "game_name": { | 1192 | "game_name": { |
| 878 | "type": "string" | 1193 | "type": "string" |
| 879 | }, | 1194 | }, |
| 880 | "id": { | 1195 | "id": { |
| 881 | "type": "integer" | 1196 | "type": "integer" |
| 882 | }, | 1197 | }, |
| 883 | "map_name": { | 1198 | "image": { |
| 884 | "type": "string" | 1199 | "type": "string" |
| 885 | } | ||
| 886 | } | ||
| 887 | }, | ||
| 888 | "models.MapCategoryScores": { | ||
| 889 | "type": "object", | ||
| 890 | "properties": { | ||
| 891 | "any": { | ||
| 892 | "type": "integer" | ||
| 893 | }, | 1200 | }, |
| 894 | "cm": { | 1201 | "is_coop": { |
| 895 | "type": "integer" | 1202 | "type": "boolean" |
| 896 | }, | ||
| 897 | "inbounds_sla": { | ||
| 898 | "type": "integer" | ||
| 899 | }, | 1203 | }, |
| 900 | "no_sla": { | 1204 | "map_name": { |
| 901 | "type": "integer" | 1205 | "type": "string" |
| 902 | } | 1206 | } |
| 903 | } | 1207 | } |
| 904 | }, | 1208 | }, |
| @@ -922,6 +1226,29 @@ const docTemplate = `{ | |||
| 922 | "records": {} | 1226 | "records": {} |
| 923 | } | 1227 | } |
| 924 | }, | 1228 | }, |
| 1229 | "models.MapRoute": { | ||
| 1230 | "type": "object", | ||
| 1231 | "properties": { | ||
| 1232 | "category": { | ||
| 1233 | "$ref": "#/definitions/models.Category" | ||
| 1234 | }, | ||
| 1235 | "description": { | ||
| 1236 | "type": "string" | ||
| 1237 | }, | ||
| 1238 | "history": { | ||
| 1239 | "$ref": "#/definitions/models.MapHistory" | ||
| 1240 | }, | ||
| 1241 | "rating": { | ||
| 1242 | "type": "number" | ||
| 1243 | }, | ||
| 1244 | "route_id": { | ||
| 1245 | "type": "integer" | ||
| 1246 | }, | ||
| 1247 | "showcase": { | ||
| 1248 | "type": "string" | ||
| 1249 | } | ||
| 1250 | } | ||
| 1251 | }, | ||
| 925 | "models.MapShort": { | 1252 | "models.MapShort": { |
| 926 | "type": "object", | 1253 | "type": "object", |
| 927 | "properties": { | 1254 | "properties": { |
| @@ -936,29 +1263,22 @@ const docTemplate = `{ | |||
| 936 | "models.MapSummary": { | 1263 | "models.MapSummary": { |
| 937 | "type": "object", | 1264 | "type": "object", |
| 938 | "properties": { | 1265 | "properties": { |
| 939 | "category_scores": { | 1266 | "routes": { |
| 940 | "$ref": "#/definitions/models.MapCategoryScores" | ||
| 941 | }, | ||
| 942 | "description": { | ||
| 943 | "type": "string" | ||
| 944 | }, | ||
| 945 | "history": { | ||
| 946 | "type": "array", | ||
| 947 | "items": { | ||
| 948 | "$ref": "#/definitions/models.MapHistory" | ||
| 949 | } | ||
| 950 | }, | ||
| 951 | "rating": { | ||
| 952 | "type": "number" | ||
| 953 | }, | ||
| 954 | "routers": { | ||
| 955 | "type": "array", | 1267 | "type": "array", |
| 956 | "items": { | 1268 | "items": { |
| 957 | "type": "string" | 1269 | "$ref": "#/definitions/models.MapRoute" |
| 958 | } | 1270 | } |
| 1271 | } | ||
| 1272 | } | ||
| 1273 | }, | ||
| 1274 | "models.MapSummaryResponse": { | ||
| 1275 | "type": "object", | ||
| 1276 | "properties": { | ||
| 1277 | "map": { | ||
| 1278 | "$ref": "#/definitions/models.Map" | ||
| 959 | }, | 1279 | }, |
| 960 | "showcase": { | 1280 | "summary": { |
| 961 | "type": "string" | 1281 | "$ref": "#/definitions/models.MapSummary" |
| 962 | } | 1282 | } |
| 963 | } | 1283 | } |
| 964 | }, | 1284 | }, |
| @@ -1011,21 +1331,9 @@ const docTemplate = `{ | |||
| 1011 | } | 1331 | } |
| 1012 | } | 1332 | } |
| 1013 | }, | 1333 | }, |
| 1014 | "models.RecordRequest": { | 1334 | "models.RecordResponse": { |
| 1015 | "type": "object", | 1335 | "type": "object", |
| 1016 | "required": [ | ||
| 1017 | "is_partner_orange", | ||
| 1018 | "partner_id", | ||
| 1019 | "score_count", | ||
| 1020 | "score_time" | ||
| 1021 | ], | ||
| 1022 | "properties": { | 1336 | "properties": { |
| 1023 | "is_partner_orange": { | ||
| 1024 | "type": "boolean" | ||
| 1025 | }, | ||
| 1026 | "partner_id": { | ||
| 1027 | "type": "string" | ||
| 1028 | }, | ||
| 1029 | "score_count": { | 1337 | "score_count": { |
| 1030 | "type": "integer" | 1338 | "type": "integer" |
| 1031 | }, | 1339 | }, |
| @@ -1061,29 +1369,13 @@ const docTemplate = `{ | |||
| 1061 | "maps": { | 1369 | "maps": { |
| 1062 | "type": "array", | 1370 | "type": "array", |
| 1063 | "items": { | 1371 | "items": { |
| 1064 | "type": "object", | 1372 | "$ref": "#/definitions/models.MapShort" |
| 1065 | "properties": { | ||
| 1066 | "id": { | ||
| 1067 | "type": "integer" | ||
| 1068 | }, | ||
| 1069 | "name": { | ||
| 1070 | "type": "string" | ||
| 1071 | } | ||
| 1072 | } | ||
| 1073 | } | 1373 | } |
| 1074 | }, | 1374 | }, |
| 1075 | "players": { | 1375 | "players": { |
| 1076 | "type": "array", | 1376 | "type": "array", |
| 1077 | "items": { | 1377 | "items": { |
| 1078 | "type": "object", | 1378 | "$ref": "#/definitions/models.UserShort" |
| 1079 | "properties": { | ||
| 1080 | "steam_id": { | ||
| 1081 | "type": "string" | ||
| 1082 | }, | ||
| 1083 | "user_name": { | ||
| 1084 | "type": "string" | ||
| 1085 | } | ||
| 1086 | } | ||
| 1087 | } | 1379 | } |
| 1088 | } | 1380 | } |
| 1089 | } | 1381 | } |
| @@ -1101,6 +1393,17 @@ const docTemplate = `{ | |||
| 1101 | "type": "string" | 1393 | "type": "string" |
| 1102 | } | 1394 | } |
| 1103 | } | 1395 | } |
| 1396 | }, | ||
| 1397 | "models.UserShort": { | ||
| 1398 | "type": "object", | ||
| 1399 | "properties": { | ||
| 1400 | "steam_id": { | ||
| 1401 | "type": "string" | ||
| 1402 | }, | ||
| 1403 | "user_name": { | ||
| 1404 | "type": "string" | ||
| 1405 | } | ||
| 1406 | } | ||
| 1104 | } | 1407 | } |
| 1105 | } | 1408 | } |
| 1106 | }` | 1409 | }` |