This repository was archived by the owner on Dec 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv3.yml
More file actions
510 lines (509 loc) · 13.1 KB
/
v3.yml
File metadata and controls
510 lines (509 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
openapi: 3.0.2
info:
version: '3.0'
title: ToneAPI
description: |-
Stats tracking API for Titanfall 2 Northstar
All query params can be negated using `!`. Example : (`https://tone.sleepycat.date/v2/client/gamemodes?gamemode=!sns`)
contact:
name: Legonzaur
url: 'https://github.com/Legonzaur'
license:
url: 'https://unlicense.org/'
name: The Unlicense
servers:
- url: 'https://toneapi.ovh/v3'
paths:
/servers:
post:
tags:
- server
summary: Test Authentication
description: Used to test auth
operationId: server-auth-test
responses:
'200':
description: OK
'401':
$ref: '#/components/responses/Invalid-Auth'
security:
- Auth_Token: []
servers:
- url: 'https://tone.sleepycat.date/v3'
/servers/match:
post:
tags:
- server
summary: Create a match
description: Allows a Northstar server to create a match on the database
operationId: server-match-create
requestBody:
description: ''
content:
application/json:
schema:
type: object
properties:
server_name:
type: string
x-stoplight:
id: wjy89zlbesgsg
game_map:
type: string
x-stoplight:
id: pg5fzotd8lyxw
gamemode:
type: string
x-stoplight:
id: xh2lhokfc24eb
air_accel:
type: boolean
x-stoplight:
id: jcpfrheglszl0
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
properties:
match:
type: integer
'400':
$ref: '#/components/responses/Bad-Request'
'401':
$ref: '#/components/responses/Invalid-Auth'
'500':
$ref: '#/components/responses/Internal-Server-Error'
security:
- Auth_Token: []
servers:
- url: 'https://tone.sleepycat.date/v3'
'/servers/match/{match_id}/close':
post:
tags:
- server
summary: Close a match
description: Close the match and save statistics
operationId: server-match-close
requestBody:
description: ''
content:
application/json:
schema:
type: object
properties:
'[string] player_id':
type: object
x-stoplight:
id: 3q3o0pwulezj2
properties:
weapons:
type: object
x-stoplight:
id: 0gsa5enmd4uzm
properties:
'[string] weaponID':
$ref: '#/components/schemas/MatchCloseWeaponData'
titans:
type: object
x-stoplight:
id: o36gf0e9j9gsh
properties:
'[string] titanID':
$ref: '#/components/schemas/MatchCloseWeaponData'
stats:
type: object
x-stoplight:
id: h5i5dfb3zdlk1
properties:
distance:
$ref: '#/components/schemas/matchClosePlayerStats'
time:
$ref: '#/components/schemas/matchClosePlayerStats'
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
properties:
match:
type: integer
'400':
$ref: '#/components/responses/Bad-Request'
'401':
$ref: '#/components/responses/Invalid-Auth'
'500':
$ref: '#/components/responses/Internal-Server-Error'
security:
- Auth_Token: []
servers:
- url: 'https://tone.sleepycat.date/v3'
x-stoplight:
id: 4jc5qvqwxlsue
parameters:
- schema:
type: integer
name: match_id
in: path
required: true
'/servers/player/{player_id}/connect':
parameters:
- schema:
type: string
name: player_id
in: path
required: true
put:
summary: Player username update
operationId: server-player-connect
responses:
'201':
description: Created
x-stoplight:
id: 50hgv66l3d4z6
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
x-stoplight:
id: 0fm9gzrvmia6j
match_id:
type: number
x-stoplight:
id: 062q6ygb5k5il
/servers/kill:
post:
tags:
- server
summary: Kill
description: Allows a Northstar server to record kills on the database
operationId: server-kill
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Kill'
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
properties:
id:
type: string
'400':
$ref: '#/components/responses/Bad-Request'
'401':
$ref: '#/components/responses/Invalid-Auth'
'403':
description: |-
Match ID invalid.
Use /servers/match to create a match.
content:
application/json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
'409':
description: Match is already closed
content:
application/json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
'500':
$ref: '#/components/responses/Internal-Server-Error'
security:
- Auth_Token: []
servers:
- url: 'https://tone.sleepycat.date/v3'
tags:
- name: client
description: Routes accessibles by everyone
- name: server
description: Routes accessibles only to server owners
components:
parameters:
server:
name: server
in: query
description: Fetch data for specific server
required: false
schema:
type: string
example: fvnkhead's 3v3
player:
name: player
in: query
description: Fetch data for specific player
required: false
schema:
type: integer
example: 1005930844007
weapon:
name: weapon
in: query
description: Fetch data for specific weapon
required: false
schema:
type: string
example: epg
map:
name: map
in: query
description: Fetch data for specific map
required: false
schema:
type: string
example: lf_stacks
gamemode:
name: gamemode
in: query
description: Fetch data for specific gamemode
required: false
schema:
type: string
example: aitdm
host:
name: host
in: query
description: Fetch data for specific host
required: false
schema:
type: integer
example: 1
securitySchemes:
Auth_Token:
type: http
scheme: bearer
responses:
Invalid-Auth:
description: Your token is probably invalid
content:
application/json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
Bad-Request:
description: Request body is invalid
content:
application/json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
Internal-Server-Error:
description: Internal Server Error
content:
application/json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
properties:
msg:
type: string
data:
type: string
schemas:
'[number] host_id':
type: string
example: Fvnkhead
'[string] server_name':
type: object
properties:
deaths:
type: integer
kills:
type: integer
max_distance:
type: integer
total_distance:
type: integer
host:
type: integer
'[string] weapon_id':
type: object
properties:
deaths:
type: integer
description: Number of deaths caused by this weapon
kills:
type: integer
max_distance:
type: integer
total_distance:
type: integer
deaths_while_equipped:
type: integer
description: Number of deaths while this weapon is equipped
'[number] player_id':
type: object
properties:
deaths:
type: integer
kills:
type: integer
max_distance:
type: integer
total_distance:
type: integer
username:
type: string
title: ''
KillData:
type: object
title: Killdata
properties:
deaths:
$ref: '#/components/schemas/deaths'
kills:
$ref: '#/components/schemas/kills'
max_kill_distance:
$ref: '#/components/schemas/max_kill_distance'
avg_kill_distance:
$ref: '#/components/schemas/avg_kill_distance'
deaths:
type: integer
kills:
type: integer
max_kill_distance:
type: integer
avg_kill_distance:
type: number
Kill:
type: object
title: Kill
properties:
game_time:
type: number
player_count:
type: integer
match_id:
type: integer
cause_of_death:
type: string
distance:
type: number
victim:
$ref: '#/components/schemas/PlayerKillData'
attacker:
$ref: '#/components/schemas/PlayerKillData'
PlayerKillData:
type: object
title: PlayerKillData
properties:
velocity:
type: number
loadout:
type: object
properties:
ordnance:
$ref: '#/components/schemas/WeaponKillData'
secondary:
$ref: '#/components/schemas/WeaponKillData'
primary:
$ref: '#/components/schemas/WeaponKillData'
tactical:
$ref: '#/components/schemas/WeaponKillData'
anti_titan:
$ref: '#/components/schemas/WeaponKillData'
passive1:
type: string
passive2:
type: string
current_weapon:
$ref: '#/components/schemas/WeaponKillData'
state:
type: string
titan:
type: string
id:
type: integer
cloaked:
type: boolean
WeaponKillData:
type: object
title: WeaponKillData
properties:
mods:
type: integer
id:
type: string
matchClosePlayerStats:
title: MatchClosePlayerMoveStats
x-stoplight:
id: 27jz52i808ffl
type: object
properties:
ground:
type: number
x-stoplight:
id: p101zel4w57ir
air:
type: number
x-stoplight:
id: 2xlck0xditzhl
wall:
type: number
x-stoplight:
id: awqcjkwqze40a
MatchCloseWeaponData:
title: MatchCloseWeaponData
x-stoplight:
id: gjyyzzkrcr59f
type: object
properties:
shotsFired:
type: integer
x-stoplight:
id: c9wlafwbpe6u0
shotsHit:
type: integer
x-stoplight:
id: 9kfnkdw5amlnr
shotsCrit:
type: integer
x-stoplight:
id: bn76zlry7bbe2
shotsHeadshot:
type: integer
x-stoplight:
id: aglqqfxyhpawi
shotsRichochet:
type: integer
x-stoplight:
id: 8mwo5nidybzyc
playtime:
type: number
x-stoplight:
id: z0tzic1srfe29