diff options
Diffstat (limited to 'docs/swagger.yaml')
| -rw-r--r-- | docs/swagger.yaml | 422 |
1 files changed, 308 insertions, 114 deletions
diff --git a/docs/swagger.yaml b/docs/swagger.yaml index d62b46b..7571073 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | basePath: /v1 | 1 | basePath: /v1 |
| 2 | definitions: | 2 | definitions: |
| 3 | models.Category: | ||
| 4 | properties: | ||
| 5 | id: | ||
| 6 | type: integer | ||
| 7 | name: | ||
| 8 | type: string | ||
| 9 | type: object | ||
| 3 | models.Chapter: | 10 | models.Chapter: |
| 4 | properties: | 11 | properties: |
| 5 | id: | 12 | id: |
| @@ -25,10 +32,68 @@ definitions: | |||
| 25 | game: | 32 | game: |
| 26 | $ref: '#/definitions/models.Game' | 33 | $ref: '#/definitions/models.Game' |
| 27 | type: object | 34 | type: object |
| 35 | models.CreateMapSummaryRequest: | ||
| 36 | properties: | ||
| 37 | category_id: | ||
| 38 | type: integer | ||
| 39 | description: | ||
| 40 | type: string | ||
| 41 | record_date: | ||
| 42 | type: string | ||
| 43 | score_count: | ||
| 44 | type: integer | ||
| 45 | showcase: | ||
| 46 | type: string | ||
| 47 | user_name: | ||
| 48 | type: string | ||
| 49 | required: | ||
| 50 | - category_id | ||
| 51 | - description | ||
| 52 | - record_date | ||
| 53 | - score_count | ||
| 54 | - user_name | ||
| 55 | type: object | ||
| 56 | models.DeleteMapSummaryRequest: | ||
| 57 | properties: | ||
| 58 | route_id: | ||
| 59 | type: integer | ||
| 60 | required: | ||
| 61 | - route_id | ||
| 62 | type: object | ||
| 63 | models.EditMapImageRequest: | ||
| 64 | properties: | ||
| 65 | image: | ||
| 66 | type: string | ||
| 67 | required: | ||
| 68 | - image | ||
| 69 | type: object | ||
| 70 | models.EditMapSummaryRequest: | ||
| 71 | properties: | ||
| 72 | description: | ||
| 73 | type: string | ||
| 74 | record_date: | ||
| 75 | type: string | ||
| 76 | route_id: | ||
| 77 | type: integer | ||
| 78 | score_count: | ||
| 79 | type: integer | ||
| 80 | showcase: | ||
| 81 | type: string | ||
| 82 | user_name: | ||
| 83 | type: string | ||
| 84 | required: | ||
| 85 | - description | ||
| 86 | - record_date | ||
| 87 | - route_id | ||
| 88 | - score_count | ||
| 89 | - user_name | ||
| 90 | type: object | ||
| 28 | models.Game: | 91 | models.Game: |
| 29 | properties: | 92 | properties: |
| 30 | id: | 93 | id: |
| 31 | type: integer | 94 | type: integer |
| 95 | is_coop: | ||
| 96 | type: boolean | ||
| 32 | name: | 97 | name: |
| 33 | type: string | 98 | type: string |
| 34 | type: object | 99 | type: object |
| @@ -41,25 +106,17 @@ definitions: | |||
| 41 | properties: | 106 | properties: |
| 42 | chapter_name: | 107 | chapter_name: |
| 43 | type: string | 108 | type: string |
| 44 | data: {} | ||
| 45 | game_name: | 109 | game_name: |
| 46 | type: string | 110 | type: string |
| 47 | id: | 111 | id: |
| 48 | type: integer | 112 | type: integer |
| 113 | image: | ||
| 114 | type: string | ||
| 115 | is_coop: | ||
| 116 | type: boolean | ||
| 49 | map_name: | 117 | map_name: |
| 50 | type: string | 118 | type: string |
| 51 | type: object | 119 | type: object |
| 52 | models.MapCategoryScores: | ||
| 53 | properties: | ||
| 54 | any: | ||
| 55 | type: integer | ||
| 56 | cm: | ||
| 57 | type: integer | ||
| 58 | inbounds_sla: | ||
| 59 | type: integer | ||
| 60 | no_sla: | ||
| 61 | type: integer | ||
| 62 | type: object | ||
| 63 | models.MapHistory: | 120 | models.MapHistory: |
| 64 | properties: | 121 | properties: |
| 65 | date: | 122 | date: |
| @@ -73,6 +130,21 @@ definitions: | |||
| 73 | properties: | 130 | properties: |
| 74 | records: {} | 131 | records: {} |
| 75 | type: object | 132 | type: object |
| 133 | models.MapRoute: | ||
| 134 | properties: | ||
| 135 | category: | ||
| 136 | $ref: '#/definitions/models.Category' | ||
| 137 | description: | ||
| 138 | type: string | ||
| 139 | history: | ||
| 140 | $ref: '#/definitions/models.MapHistory' | ||
| 141 | rating: | ||
| 142 | type: number | ||
| 143 | route_id: | ||
| 144 | type: integer | ||
| 145 | showcase: | ||
| 146 | type: string | ||
| 147 | type: object | ||
| 76 | models.MapShort: | 148 | models.MapShort: |
| 77 | properties: | 149 | properties: |
| 78 | id: | 150 | id: |
| @@ -82,22 +154,17 @@ definitions: | |||
| 82 | type: object | 154 | type: object |
| 83 | models.MapSummary: | 155 | models.MapSummary: |
| 84 | properties: | 156 | properties: |
| 85 | category_scores: | 157 | routes: |
| 86 | $ref: '#/definitions/models.MapCategoryScores' | ||
| 87 | description: | ||
| 88 | type: string | ||
| 89 | history: | ||
| 90 | items: | ||
| 91 | $ref: '#/definitions/models.MapHistory' | ||
| 92 | type: array | ||
| 93 | rating: | ||
| 94 | type: number | ||
| 95 | routers: | ||
| 96 | items: | 158 | items: |
| 97 | type: string | 159 | $ref: '#/definitions/models.MapRoute' |
| 98 | type: array | 160 | type: array |
| 99 | showcase: | 161 | type: object |
| 100 | type: string | 162 | models.MapSummaryResponse: |
| 163 | properties: | ||
| 164 | map: | ||
| 165 | $ref: '#/definitions/models.Map' | ||
| 166 | summary: | ||
| 167 | $ref: '#/definitions/models.MapSummary' | ||
| 101 | type: object | 168 | type: object |
| 102 | models.ProfileResponse: | 169 | models.ProfileResponse: |
| 103 | properties: | 170 | properties: |
| @@ -131,21 +198,12 @@ definitions: | |||
| 131 | $ref: '#/definitions/models.UserRanking' | 198 | $ref: '#/definitions/models.UserRanking' |
| 132 | type: array | 199 | type: array |
| 133 | type: object | 200 | type: object |
| 134 | models.RecordRequest: | 201 | models.RecordResponse: |
| 135 | properties: | 202 | properties: |
| 136 | is_partner_orange: | ||
| 137 | type: boolean | ||
| 138 | partner_id: | ||
| 139 | type: string | ||
| 140 | score_count: | 203 | score_count: |
| 141 | type: integer | 204 | type: integer |
| 142 | score_time: | 205 | score_time: |
| 143 | type: integer | 206 | type: integer |
| 144 | required: | ||
| 145 | - is_partner_orange | ||
| 146 | - partner_id | ||
| 147 | - score_count | ||
| 148 | - score_time | ||
| 149 | type: object | 207 | type: object |
| 150 | models.Response: | 208 | models.Response: |
| 151 | properties: | 209 | properties: |
| @@ -165,21 +223,11 @@ definitions: | |||
| 165 | properties: | 223 | properties: |
| 166 | maps: | 224 | maps: |
| 167 | items: | 225 | items: |
| 168 | properties: | 226 | $ref: '#/definitions/models.MapShort' |
| 169 | id: | ||
| 170 | type: integer | ||
| 171 | name: | ||
| 172 | type: string | ||
| 173 | type: object | ||
| 174 | type: array | 227 | type: array |
| 175 | players: | 228 | players: |
| 176 | items: | 229 | items: |
| 177 | properties: | 230 | $ref: '#/definitions/models.UserShort' |
| 178 | steam_id: | ||
| 179 | type: string | ||
| 180 | user_name: | ||
| 181 | type: string | ||
| 182 | type: object | ||
| 183 | type: array | 231 | type: array |
| 184 | type: object | 232 | type: object |
| 185 | models.UserRanking: | 233 | models.UserRanking: |
| @@ -191,6 +239,13 @@ definitions: | |||
| 191 | user_name: | 239 | user_name: |
| 192 | type: string | 240 | type: string |
| 193 | type: object | 241 | type: object |
| 242 | models.UserShort: | ||
| 243 | properties: | ||
| 244 | steam_id: | ||
| 245 | type: string | ||
| 246 | user_name: | ||
| 247 | type: string | ||
| 248 | type: object | ||
| 194 | host: lp.ardapektezol.com/api | 249 | host: lp.ardapektezol.com/api |
| 195 | info: | 250 | info: |
| 196 | contact: {} | 251 | contact: {} |
| @@ -203,6 +258,7 @@ info: | |||
| 203 | paths: | 258 | paths: |
| 204 | /chapters/{id}: | 259 | /chapters/{id}: |
| 205 | get: | 260 | get: |
| 261 | description: Get maps from the specified chapter id. | ||
| 206 | parameters: | 262 | parameters: |
| 207 | - description: Chapter ID | 263 | - description: Chapter ID |
| 208 | in: path | 264 | in: path |
| @@ -225,40 +281,19 @@ paths: | |||
| 225 | description: Bad Request | 281 | description: Bad Request |
| 226 | schema: | 282 | schema: |
| 227 | $ref: '#/definitions/models.Response' | 283 | $ref: '#/definitions/models.Response' |
| 228 | summary: Get maps from the specified chapter id. | ||
| 229 | tags: | 284 | tags: |
| 230 | - games & chapters | 285 | - games & chapters |
| 231 | /demo: | ||
| 232 | get: | ||
| 233 | produces: | ||
| 234 | - application/json | ||
| 235 | responses: | ||
| 236 | "200": | ||
| 237 | description: OK | ||
| 238 | schema: | ||
| 239 | allOf: | ||
| 240 | - $ref: '#/definitions/models.Response' | ||
| 241 | - properties: | ||
| 242 | data: | ||
| 243 | $ref: '#/definitions/models.RankingsResponse' | ||
| 244 | type: object | ||
| 245 | "400": | ||
| 246 | description: Bad Request | ||
| 247 | schema: | ||
| 248 | $ref: '#/definitions/models.Response' | ||
| 249 | summary: Get rankings of every player. | ||
| 250 | tags: | ||
| 251 | - rankings | ||
| 252 | /demos: | 286 | /demos: |
| 253 | get: | 287 | get: |
| 254 | consumes: | 288 | consumes: |
| 255 | - application/json | 289 | - application/json |
| 290 | description: Get demo with specified demo uuid. | ||
| 256 | parameters: | 291 | parameters: |
| 257 | - description: Demo UUID | 292 | - description: Demo UUID |
| 258 | in: query | 293 | in: query |
| 259 | name: uuid | 294 | name: uuid |
| 260 | required: true | 295 | required: true |
| 261 | type: integer | 296 | type: string |
| 262 | produces: | 297 | produces: |
| 263 | - application/octet-stream | 298 | - application/octet-stream |
| 264 | responses: | 299 | responses: |
| @@ -270,11 +305,11 @@ paths: | |||
| 270 | description: Bad Request | 305 | description: Bad Request |
| 271 | schema: | 306 | schema: |
| 272 | $ref: '#/definitions/models.Response' | 307 | $ref: '#/definitions/models.Response' |
| 273 | summary: Get demo with specified demo uuid. | ||
| 274 | tags: | 308 | tags: |
| 275 | - demo | 309 | - demo |
| 276 | /games: | 310 | /games: |
| 277 | get: | 311 | get: |
| 312 | description: Get games from the leaderboards. | ||
| 278 | produces: | 313 | produces: |
| 279 | - application/json | 314 | - application/json |
| 280 | responses: | 315 | responses: |
| @@ -293,11 +328,11 @@ paths: | |||
| 293 | description: Bad Request | 328 | description: Bad Request |
| 294 | schema: | 329 | schema: |
| 295 | $ref: '#/definitions/models.Response' | 330 | $ref: '#/definitions/models.Response' |
| 296 | summary: Get games from the leaderboards. | ||
| 297 | tags: | 331 | tags: |
| 298 | - games & chapters | 332 | - games & chapters |
| 299 | /games/{id}: | 333 | /games/{id}: |
| 300 | get: | 334 | get: |
| 335 | description: Get chapters from the specified game id. | ||
| 301 | parameters: | 336 | parameters: |
| 302 | - description: Game ID | 337 | - description: Game ID |
| 303 | in: path | 338 | in: path |
| @@ -320,13 +355,13 @@ paths: | |||
| 320 | description: Bad Request | 355 | description: Bad Request |
| 321 | schema: | 356 | schema: |
| 322 | $ref: '#/definitions/models.Response' | 357 | $ref: '#/definitions/models.Response' |
| 323 | summary: Get chapters from the specified game id. | ||
| 324 | tags: | 358 | tags: |
| 325 | - games & chapters | 359 | - games & chapters |
| 326 | /login: | 360 | /login: |
| 327 | get: | 361 | get: |
| 328 | consumes: | 362 | consumes: |
| 329 | - application/json | 363 | - application/json |
| 364 | description: Get (redirect) login page for Steam auth. | ||
| 330 | produces: | 365 | produces: |
| 331 | - application/json | 366 | - application/json |
| 332 | responses: | 367 | responses: |
| @@ -343,11 +378,49 @@ paths: | |||
| 343 | description: Bad Request | 378 | description: Bad Request |
| 344 | schema: | 379 | schema: |
| 345 | $ref: '#/definitions/models.Response' | 380 | $ref: '#/definitions/models.Response' |
| 346 | summary: Get (redirect) login page for Steam auth. | ||
| 347 | tags: | 381 | tags: |
| 348 | - login | 382 | - login |
| 383 | /maps/{id}/image: | ||
| 384 | put: | ||
| 385 | description: Edit map image with specified map id. | ||
| 386 | parameters: | ||
| 387 | - description: JWT Token | ||
| 388 | in: header | ||
| 389 | name: Authorization | ||
| 390 | required: true | ||
| 391 | type: string | ||
| 392 | - description: Map ID | ||
| 393 | in: path | ||
| 394 | name: id | ||
| 395 | required: true | ||
| 396 | type: integer | ||
| 397 | - description: Body | ||
| 398 | in: body | ||
| 399 | name: request | ||
| 400 | required: true | ||
| 401 | schema: | ||
| 402 | $ref: '#/definitions/models.EditMapImageRequest' | ||
| 403 | produces: | ||
| 404 | - application/json | ||
| 405 | responses: | ||
| 406 | "200": | ||
| 407 | description: OK | ||
| 408 | schema: | ||
| 409 | allOf: | ||
| 410 | - $ref: '#/definitions/models.Response' | ||
| 411 | - properties: | ||
| 412 | data: | ||
| 413 | $ref: '#/definitions/models.EditMapImageRequest' | ||
| 414 | type: object | ||
| 415 | "400": | ||
| 416 | description: Bad Request | ||
| 417 | schema: | ||
| 418 | $ref: '#/definitions/models.Response' | ||
| 419 | tags: | ||
| 420 | - maps | ||
| 349 | /maps/{id}/leaderboards: | 421 | /maps/{id}/leaderboards: |
| 350 | get: | 422 | get: |
| 423 | description: Get map leaderboards with specified id. | ||
| 351 | parameters: | 424 | parameters: |
| 352 | - description: Map ID | 425 | - description: Map ID |
| 353 | in: path | 426 | in: path |
| @@ -375,45 +448,40 @@ paths: | |||
| 375 | description: Bad Request | 448 | description: Bad Request |
| 376 | schema: | 449 | schema: |
| 377 | $ref: '#/definitions/models.Response' | 450 | $ref: '#/definitions/models.Response' |
| 378 | summary: Get map leaderboards with specified id. | ||
| 379 | tags: | 451 | tags: |
| 380 | - maps | 452 | - maps |
| 381 | /maps/{id}/record: | 453 | /maps/{id}/record: |
| 382 | post: | 454 | post: |
| 383 | consumes: | 455 | consumes: |
| 384 | - multipart/form-data | 456 | - multipart/form-data |
| 457 | description: Post record with demo of a specific map. | ||
| 385 | parameters: | 458 | parameters: |
| 459 | - description: Map ID | ||
| 460 | in: path | ||
| 461 | name: id | ||
| 462 | required: true | ||
| 463 | type: integer | ||
| 386 | - description: JWT Token | 464 | - description: JWT Token |
| 387 | in: header | 465 | in: header |
| 388 | name: Authorization | 466 | name: Authorization |
| 389 | required: true | 467 | required: true |
| 390 | type: string | 468 | type: string |
| 391 | - description: Demos | 469 | - description: Host Demo |
| 392 | in: formData | 470 | in: formData |
| 393 | items: | 471 | name: host_demo |
| 394 | type: file | ||
| 395 | name: demos | ||
| 396 | required: true | 472 | required: true |
| 397 | type: array | 473 | type: file |
| 398 | - description: Score Count | 474 | - description: Partner Demo |
| 399 | in: formData | 475 | in: formData |
| 400 | name: score_count | 476 | name: partner_demo |
| 401 | required: true | 477 | type: file |
| 402 | type: integer | ||
| 403 | - description: Score Time | ||
| 404 | in: formData | ||
| 405 | name: score_time | ||
| 406 | required: true | ||
| 407 | type: integer | ||
| 408 | - description: Is Partner Orange | 478 | - description: Is Partner Orange |
| 409 | in: formData | 479 | in: formData |
| 410 | name: is_partner_orange | 480 | name: is_partner_orange |
| 411 | required: true | ||
| 412 | type: boolean | 481 | type: boolean |
| 413 | - description: Partner ID | 482 | - description: Partner ID |
| 414 | in: formData | 483 | in: formData |
| 415 | name: partner_id | 484 | name: partner_id |
| 416 | required: true | ||
| 417 | type: string | 485 | type: string |
| 418 | produces: | 486 | produces: |
| 419 | - application/json | 487 | - application/json |
| @@ -425,7 +493,7 @@ paths: | |||
| 425 | - $ref: '#/definitions/models.Response' | 493 | - $ref: '#/definitions/models.Response' |
| 426 | - properties: | 494 | - properties: |
| 427 | data: | 495 | data: |
| 428 | $ref: '#/definitions/models.RecordRequest' | 496 | $ref: '#/definitions/models.RecordResponse' |
| 429 | type: object | 497 | type: object |
| 430 | "400": | 498 | "400": |
| 431 | description: Bad Request | 499 | description: Bad Request |
| @@ -435,11 +503,48 @@ paths: | |||
| 435 | description: Unauthorized | 503 | description: Unauthorized |
| 436 | schema: | 504 | schema: |
| 437 | $ref: '#/definitions/models.Response' | 505 | $ref: '#/definitions/models.Response' |
| 438 | summary: Post record with demo of a specific map. | ||
| 439 | tags: | 506 | tags: |
| 440 | - maps | 507 | - maps |
| 441 | /maps/{id}/summary: | 508 | /maps/{id}/summary: |
| 509 | delete: | ||
| 510 | description: Delete map summary with specified map id. | ||
| 511 | parameters: | ||
| 512 | - description: JWT Token | ||
| 513 | in: header | ||
| 514 | name: Authorization | ||
| 515 | required: true | ||
| 516 | type: string | ||
| 517 | - description: Map ID | ||
| 518 | in: path | ||
| 519 | name: id | ||
| 520 | required: true | ||
| 521 | type: integer | ||
| 522 | - description: Body | ||
| 523 | in: body | ||
| 524 | name: request | ||
| 525 | required: true | ||
| 526 | schema: | ||
| 527 | $ref: '#/definitions/models.DeleteMapSummaryRequest' | ||
| 528 | produces: | ||
| 529 | - application/json | ||
| 530 | responses: | ||
| 531 | "200": | ||
| 532 | description: OK | ||
| 533 | schema: | ||
| 534 | allOf: | ||
| 535 | - $ref: '#/definitions/models.Response' | ||
| 536 | - properties: | ||
| 537 | data: | ||
| 538 | $ref: '#/definitions/models.DeleteMapSummaryRequest' | ||
| 539 | type: object | ||
| 540 | "400": | ||
| 541 | description: Bad Request | ||
| 542 | schema: | ||
| 543 | $ref: '#/definitions/models.Response' | ||
| 544 | tags: | ||
| 545 | - maps | ||
| 442 | get: | 546 | get: |
| 547 | description: Get map summary with specified id. | ||
| 443 | parameters: | 548 | parameters: |
| 444 | - description: Map ID | 549 | - description: Map ID |
| 445 | in: path | 550 | in: path |
| @@ -456,24 +561,93 @@ paths: | |||
| 456 | - $ref: '#/definitions/models.Response' | 561 | - $ref: '#/definitions/models.Response' |
| 457 | - properties: | 562 | - properties: |
| 458 | data: | 563 | data: |
| 459 | allOf: | 564 | $ref: '#/definitions/models.MapSummaryResponse' |
| 460 | - $ref: '#/definitions/models.Map' | 565 | type: object |
| 461 | - properties: | 566 | "400": |
| 462 | data: | 567 | description: Bad Request |
| 463 | $ref: '#/definitions/models.MapSummary' | 568 | schema: |
| 464 | type: object | 569 | $ref: '#/definitions/models.Response' |
| 570 | tags: | ||
| 571 | - maps | ||
| 572 | post: | ||
| 573 | description: Create map summary with specified map id. | ||
| 574 | parameters: | ||
| 575 | - description: JWT Token | ||
| 576 | in: header | ||
| 577 | name: Authorization | ||
| 578 | required: true | ||
| 579 | type: string | ||
| 580 | - description: Map ID | ||
| 581 | in: path | ||
| 582 | name: id | ||
| 583 | required: true | ||
| 584 | type: integer | ||
| 585 | - description: Body | ||
| 586 | in: body | ||
| 587 | name: request | ||
| 588 | required: true | ||
| 589 | schema: | ||
| 590 | $ref: '#/definitions/models.CreateMapSummaryRequest' | ||
| 591 | produces: | ||
| 592 | - application/json | ||
| 593 | responses: | ||
| 594 | "200": | ||
| 595 | description: OK | ||
| 596 | schema: | ||
| 597 | allOf: | ||
| 598 | - $ref: '#/definitions/models.Response' | ||
| 599 | - properties: | ||
| 600 | data: | ||
| 601 | $ref: '#/definitions/models.CreateMapSummaryRequest' | ||
| 602 | type: object | ||
| 603 | "400": | ||
| 604 | description: Bad Request | ||
| 605 | schema: | ||
| 606 | $ref: '#/definitions/models.Response' | ||
| 607 | tags: | ||
| 608 | - maps | ||
| 609 | put: | ||
| 610 | description: Edit map summary with specified map id. | ||
| 611 | parameters: | ||
| 612 | - description: JWT Token | ||
| 613 | in: header | ||
| 614 | name: Authorization | ||
| 615 | required: true | ||
| 616 | type: string | ||
| 617 | - description: Map ID | ||
| 618 | in: path | ||
| 619 | name: id | ||
| 620 | required: true | ||
| 621 | type: integer | ||
| 622 | - description: Body | ||
| 623 | in: body | ||
| 624 | name: request | ||
| 625 | required: true | ||
| 626 | schema: | ||
| 627 | $ref: '#/definitions/models.EditMapSummaryRequest' | ||
| 628 | produces: | ||
| 629 | - application/json | ||
| 630 | responses: | ||
| 631 | "200": | ||
| 632 | description: OK | ||
| 633 | schema: | ||
| 634 | allOf: | ||
| 635 | - $ref: '#/definitions/models.Response' | ||
| 636 | - properties: | ||
| 637 | data: | ||
| 638 | $ref: '#/definitions/models.EditMapSummaryRequest' | ||
| 465 | type: object | 639 | type: object |
| 466 | "400": | 640 | "400": |
| 467 | description: Bad Request | 641 | description: Bad Request |
| 468 | schema: | 642 | schema: |
| 469 | $ref: '#/definitions/models.Response' | 643 | $ref: '#/definitions/models.Response' |
| 470 | summary: Get map summary with specified id. | ||
| 471 | tags: | 644 | tags: |
| 472 | - maps | 645 | - maps |
| 473 | /profile: | 646 | /profile: |
| 474 | get: | 647 | get: |
| 475 | consumes: | 648 | consumes: |
| 476 | - application/json | 649 | - application/json |
| 650 | description: Get profile page of session user. | ||
| 477 | parameters: | 651 | parameters: |
| 478 | - description: JWT Token | 652 | - description: JWT Token |
| 479 | in: header | 653 | in: header |
| @@ -500,12 +674,12 @@ paths: | |||
| 500 | description: Unauthorized | 674 | description: Unauthorized |
| 501 | schema: | 675 | schema: |
| 502 | $ref: '#/definitions/models.Response' | 676 | $ref: '#/definitions/models.Response' |
| 503 | summary: Get profile page of session user. | ||
| 504 | tags: | 677 | tags: |
| 505 | - users | 678 | - users |
| 506 | post: | 679 | post: |
| 507 | consumes: | 680 | consumes: |
| 508 | - application/json | 681 | - application/json |
| 682 | description: Update profile page of session user. | ||
| 509 | parameters: | 683 | parameters: |
| 510 | - description: JWT Token | 684 | - description: JWT Token |
| 511 | in: header | 685 | in: header |
| @@ -532,12 +706,12 @@ paths: | |||
| 532 | description: Unauthorized | 706 | description: Unauthorized |
| 533 | schema: | 707 | schema: |
| 534 | $ref: '#/definitions/models.Response' | 708 | $ref: '#/definitions/models.Response' |
| 535 | summary: Update profile page of session user. | ||
| 536 | tags: | 709 | tags: |
| 537 | - users | 710 | - users |
| 538 | put: | 711 | put: |
| 539 | consumes: | 712 | consumes: |
| 540 | - application/json | 713 | - application/json |
| 714 | description: Update country code of session user. | ||
| 541 | parameters: | 715 | parameters: |
| 542 | - description: JWT Token | 716 | - description: JWT Token |
| 543 | in: header | 717 | in: header |
| @@ -555,12 +729,7 @@ paths: | |||
| 555 | "200": | 729 | "200": |
| 556 | description: OK | 730 | description: OK |
| 557 | schema: | 731 | schema: |
| 558 | allOf: | 732 | $ref: '#/definitions/models.Response' |
| 559 | - $ref: '#/definitions/models.Response' | ||
| 560 | - properties: | ||
| 561 | data: | ||
| 562 | $ref: '#/definitions/models.ProfileResponse' | ||
| 563 | type: object | ||
| 564 | "400": | 733 | "400": |
| 565 | description: Bad Request | 734 | description: Bad Request |
| 566 | schema: | 735 | schema: |
| @@ -569,11 +738,37 @@ paths: | |||
| 569 | description: Unauthorized | 738 | description: Unauthorized |
| 570 | schema: | 739 | schema: |
| 571 | $ref: '#/definitions/models.Response' | 740 | $ref: '#/definitions/models.Response' |
| 572 | summary: Update country code of session user. | ||
| 573 | tags: | 741 | tags: |
| 574 | - users | 742 | - users |
| 743 | /rankings: | ||
| 744 | get: | ||
| 745 | description: Get rankings of every player. | ||
| 746 | produces: | ||
| 747 | - application/json | ||
| 748 | responses: | ||
| 749 | "200": | ||
| 750 | description: OK | ||
| 751 | schema: | ||
| 752 | allOf: | ||
| 753 | - $ref: '#/definitions/models.Response' | ||
| 754 | - properties: | ||
| 755 | data: | ||
| 756 | $ref: '#/definitions/models.RankingsResponse' | ||
| 757 | type: object | ||
| 758 | "400": | ||
| 759 | description: Bad Request | ||
| 760 | schema: | ||
| 761 | $ref: '#/definitions/models.Response' | ||
| 762 | tags: | ||
| 763 | - rankings | ||
| 575 | /search: | 764 | /search: |
| 576 | get: | 765 | get: |
| 766 | description: Get all user and map data matching to the query. | ||
| 767 | parameters: | ||
| 768 | - description: Search user or map name. | ||
| 769 | in: query | ||
| 770 | name: q | ||
| 771 | type: string | ||
| 577 | produces: | 772 | produces: |
| 578 | - application/json | 773 | - application/json |
| 579 | responses: | 774 | responses: |
| @@ -590,11 +785,11 @@ paths: | |||
| 590 | description: Bad Request | 785 | description: Bad Request |
| 591 | schema: | 786 | schema: |
| 592 | $ref: '#/definitions/models.Response' | 787 | $ref: '#/definitions/models.Response' |
| 593 | summary: Get all user and map data. | ||
| 594 | tags: | 788 | tags: |
| 595 | - search | 789 | - search |
| 596 | /token: | 790 | /token: |
| 597 | delete: | 791 | delete: |
| 792 | description: Deletes the token cookie from the user. | ||
| 598 | produces: | 793 | produces: |
| 599 | - application/json | 794 | - application/json |
| 600 | responses: | 795 | responses: |
| @@ -611,10 +806,10 @@ paths: | |||
| 611 | description: Not Found | 806 | description: Not Found |
| 612 | schema: | 807 | schema: |
| 613 | $ref: '#/definitions/models.Response' | 808 | $ref: '#/definitions/models.Response' |
| 614 | summary: Deletes the token cookie from the user. | ||
| 615 | tags: | 809 | tags: |
| 616 | - auth | 810 | - auth |
| 617 | get: | 811 | get: |
| 812 | description: Gets the token cookie value from the user. | ||
| 618 | produces: | 813 | produces: |
| 619 | - application/json | 814 | - application/json |
| 620 | responses: | 815 | responses: |
| @@ -631,13 +826,13 @@ paths: | |||
| 631 | description: Not Found | 826 | description: Not Found |
| 632 | schema: | 827 | schema: |
| 633 | $ref: '#/definitions/models.Response' | 828 | $ref: '#/definitions/models.Response' |
| 634 | summary: Gets the token cookie value from the user. | ||
| 635 | tags: | 829 | tags: |
| 636 | - auth | 830 | - auth |
| 637 | /users/{id}: | 831 | /users/{id}: |
| 638 | get: | 832 | get: |
| 639 | consumes: | 833 | consumes: |
| 640 | - application/json | 834 | - application/json |
| 835 | description: Get profile page of another user. | ||
| 641 | parameters: | 836 | parameters: |
| 642 | - description: User ID | 837 | - description: User ID |
| 643 | in: path | 838 | in: path |
| @@ -664,7 +859,6 @@ paths: | |||
| 664 | description: Not Found | 859 | description: Not Found |
| 665 | schema: | 860 | schema: |
| 666 | $ref: '#/definitions/models.Response' | 861 | $ref: '#/definitions/models.Response' |
| 667 | summary: Get profile page of another user. | ||
| 668 | tags: | 862 | tags: |
| 669 | - users | 863 | - users |
| 670 | swagger: "2.0" | 864 | swagger: "2.0" |