aboutsummaryrefslogtreecommitdiff
path: root/docs/swagger.yaml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/swagger.yaml112
1 files changed, 102 insertions, 10 deletions
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 16e5eab..873dbee 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -7,17 +7,47 @@ definitions:
7 type: object 7 type: object
8 models.Map: 8 models.Map:
9 properties: 9 properties:
10 chapter_name:
11 type: string
12 data: {}
13 game_name:
14 type: string
10 id: 15 id:
11 type: integer 16 type: integer
12 is_coop: 17 map_name:
13 type: boolean
14 name:
15 type: string 18 type: string
16 records: {} 19 type: object
17 wr_score: 20 models.MapCategoryScores:
21 properties:
22 any:
23 type: integer
24 cm:
18 type: integer 25 type: integer
19 wr_time: 26 inbounds_sla:
20 type: integer 27 type: integer
28 no_sla:
29 type: integer
30 type: object
31 models.MapRecords:
32 properties:
33 records: {}
34 type: object
35 models.MapSummary:
36 properties:
37 category_scores:
38 $ref: '#/definitions/models.MapCategoryScores'
39 description:
40 type: string
41 first_completion:
42 type: string
43 rating:
44 type: number
45 routers:
46 items:
47 type: string
48 type: array
49 showcase:
50 type: string
21 type: object 51 type: object
22 models.ProfileResponse: 52 models.ProfileResponse:
23 properties: 53 properties:
@@ -104,6 +134,29 @@ paths:
104 get: 134 get:
105 consumes: 135 consumes:
106 - application/json 136 - application/json
137 produces:
138 - application/json
139 responses:
140 "200":
141 description: OK
142 schema:
143 allOf:
144 - $ref: '#/definitions/models.Response'
145 - properties:
146 data:
147 $ref: '#/definitions/models.RankingsResponse'
148 type: object
149 "400":
150 description: Bad Request
151 schema:
152 $ref: '#/definitions/models.Response'
153 summary: Get rankings of every player.
154 tags:
155 - rankings
156 /demos:
157 get:
158 consumes:
159 - application/json
107 parameters: 160 parameters:
108 - description: Demo UUID 161 - description: Demo UUID
109 in: query 162 in: query
@@ -147,7 +200,7 @@ paths:
147 summary: Get (redirect) login page for Steam auth. 200 summary: Get (redirect) login page for Steam auth.
148 tags: 201 tags:
149 - login 202 - login
150 /maps/{id}: 203 /maps/{id}/leaderboards:
151 get: 204 get:
152 consumes: 205 consumes:
153 - application/json 206 - application/json
@@ -167,13 +220,18 @@ paths:
167 - $ref: '#/definitions/models.Response' 220 - $ref: '#/definitions/models.Response'
168 - properties: 221 - properties:
169 data: 222 data:
170 $ref: '#/definitions/models.Map' 223 allOf:
224 - $ref: '#/definitions/models.Map'
225 - properties:
226 data:
227 $ref: '#/definitions/models.MapRecords'
228 type: object
171 type: object 229 type: object
172 "400": 230 "400":
173 description: Bad Request 231 description: Bad Request
174 schema: 232 schema:
175 $ref: '#/definitions/models.Response' 233 $ref: '#/definitions/models.Response'
176 summary: Get map page with specified id. 234 summary: Get map leaderboards with specified id.
177 tags: 235 tags:
178 - maps 236 - maps
179 /maps/{id}/record: 237 /maps/{id}/record:
@@ -236,6 +294,40 @@ paths:
236 summary: Post record with demo of a specific map. 294 summary: Post record with demo of a specific map.
237 tags: 295 tags:
238 - maps 296 - maps
297 /maps/{id}/summary:
298 get:
299 consumes:
300 - application/json
301 parameters:
302 - description: Map ID
303 in: path
304 name: id
305 required: true
306 type: integer
307 produces:
308 - application/json
309 responses:
310 "200":
311 description: OK
312 schema:
313 allOf:
314 - $ref: '#/definitions/models.Response'
315 - properties:
316 data:
317 allOf:
318 - $ref: '#/definitions/models.Map'
319 - properties:
320 data:
321 $ref: '#/definitions/models.MapSummary'
322 type: object
323 type: object
324 "400":
325 description: Bad Request
326 schema:
327 $ref: '#/definitions/models.Response'
328 summary: Get map summary with specified id.
329 tags:
330 - maps
239 /profile: 331 /profile:
240 get: 332 get:
241 consumes: 333 consumes:
@@ -338,7 +430,7 @@ paths:
338 summary: Update country code of session user. 430 summary: Update country code of session user.
339 tags: 431 tags:
340 - users 432 - users
341 /user/{id}: 433 /users/{id}:
342 get: 434 get:
343 consumes: 435 consumes:
344 - application/json 436 - application/json