aboutsummaryrefslogtreecommitdiff
path: root/docs/swagger.yaml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/swagger.yaml129
1 files changed, 116 insertions, 13 deletions
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index c134197..e24ca39 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -7,18 +7,59 @@ 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:
27 type: integer
28 no_sla:
20 type: integer 29 type: integer
21 type: object 30 type: object
31 models.MapHistory:
32 properties:
33 date:
34 type: string
35 runner_name:
36 type: string
37 score_count:
38 type: integer
39 type: object
40 models.MapRecords:
41 properties:
42 records: {}
43 type: object
44 models.MapSummary:
45 properties:
46 category_scores:
47 $ref: '#/definitions/models.MapCategoryScores'
48 description:
49 type: string
50 history:
51 items:
52 $ref: '#/definitions/models.MapHistory'
53 type: array
54 rating:
55 type: number
56 routers:
57 items:
58 type: string
59 type: array
60 showcase:
61 type: string
62 type: object
22 models.ProfileResponse: 63 models.ProfileResponse:
23 properties: 64 properties:
24 avatar_link: 65 avatar_link:
@@ -37,7 +78,7 @@ definitions:
37 type: array 78 type: array
38 steam_id: 79 steam_id:
39 type: string 80 type: string
40 username: 81 user_name:
41 type: string 82 type: string
42 type: object 83 type: object
43 models.RankingsResponse: 84 models.RankingsResponse:
@@ -87,7 +128,7 @@ definitions:
87 type: integer 128 type: integer
88 user_id: 129 user_id:
89 type: string 130 type: string
90 username: 131 user_name:
91 type: string 132 type: string
92 type: object 133 type: object
93host: lp.ardapektezol.com/api 134host: lp.ardapektezol.com/api
@@ -104,9 +145,32 @@ paths:
104 get: 145 get:
105 consumes: 146 consumes:
106 - application/json 147 - application/json
148 produces:
149 - application/json
150 responses:
151 "200":
152 description: OK
153 schema:
154 allOf:
155 - $ref: '#/definitions/models.Response'
156 - properties:
157 data:
158 $ref: '#/definitions/models.RankingsResponse'
159 type: object
160 "400":
161 description: Bad Request
162 schema:
163 $ref: '#/definitions/models.Response'
164 summary: Get rankings of every player.
165 tags:
166 - rankings
167 /demos:
168 get:
169 consumes:
170 - application/json
107 parameters: 171 parameters:
108 - description: Demo UUID 172 - description: Demo UUID
109 in: path 173 in: query
110 name: uuid 174 name: uuid
111 required: true 175 required: true
112 type: integer 176 type: integer
@@ -147,7 +211,7 @@ paths:
147 summary: Get (redirect) login page for Steam auth. 211 summary: Get (redirect) login page for Steam auth.
148 tags: 212 tags:
149 - login 213 - login
150 /maps/{id}: 214 /maps/{id}/leaderboards:
151 get: 215 get:
152 consumes: 216 consumes:
153 - application/json 217 - application/json
@@ -167,13 +231,18 @@ paths:
167 - $ref: '#/definitions/models.Response' 231 - $ref: '#/definitions/models.Response'
168 - properties: 232 - properties:
169 data: 233 data:
170 $ref: '#/definitions/models.Map' 234 allOf:
235 - $ref: '#/definitions/models.Map'
236 - properties:
237 data:
238 $ref: '#/definitions/models.MapRecords'
239 type: object
171 type: object 240 type: object
172 "400": 241 "400":
173 description: Bad Request 242 description: Bad Request
174 schema: 243 schema:
175 $ref: '#/definitions/models.Response' 244 $ref: '#/definitions/models.Response'
176 summary: Get map page with specified id. 245 summary: Get map leaderboards with specified id.
177 tags: 246 tags:
178 - maps 247 - maps
179 /maps/{id}/record: 248 /maps/{id}/record:
@@ -236,6 +305,40 @@ paths:
236 summary: Post record with demo of a specific map. 305 summary: Post record with demo of a specific map.
237 tags: 306 tags:
238 - maps 307 - maps
308 /maps/{id}/summary:
309 get:
310 consumes:
311 - application/json
312 parameters:
313 - description: Map ID
314 in: path
315 name: id
316 required: true
317 type: integer
318 produces:
319 - application/json
320 responses:
321 "200":
322 description: OK
323 schema:
324 allOf:
325 - $ref: '#/definitions/models.Response'
326 - properties:
327 data:
328 allOf:
329 - $ref: '#/definitions/models.Map'
330 - properties:
331 data:
332 $ref: '#/definitions/models.MapSummary'
333 type: object
334 type: object
335 "400":
336 description: Bad Request
337 schema:
338 $ref: '#/definitions/models.Response'
339 summary: Get map summary with specified id.
340 tags:
341 - maps
239 /profile: 342 /profile:
240 get: 343 get:
241 consumes: 344 consumes:
@@ -338,7 +441,7 @@ paths:
338 summary: Update country code of session user. 441 summary: Update country code of session user.
339 tags: 442 tags:
340 - users 443 - users
341 /user/{id}: 444 /users/{id}:
342 get: 445 get:
343 consumes: 446 consumes:
344 - application/json 447 - application/json