This repository has been 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
/
v1.yml
592 lines (592 loc) · 15.9 KB
/
v1.yml
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
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
openapi: 3.0.2
info:
title: ToneAPI
version: '1.0'
contact:
name: Legonzaur
url: 'https://github.com/Legonzaur'
license:
name: The Unlicense
url: 'https://unlicense.org/'
description: 'Stats tracking API for Titanfall 2 Northstar '
servers:
- url: 'https://tone.sleepycat.date/v1'
paths:
/client/servers:
get:
summary: List of servers
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
title: Server
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: fvnknoots 7v7
examples:
Example 1:
value:
- id: 1
name: fvnknoots 7v7
operationId: get-server-list
description: An array containing the list of servers as objects
parameters: []
/client/weapons:
get:
summary: Statistics for all weapons
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
hemlock:
title: Weapon
type: object
properties:
max_kill_distance:
type: integer
avg_kill_distance:
type: number
kills:
type: integer
examples:
Example 1:
value:
hemlock:
max_kill_distance: 0
avg_kill_distance: 0
kills: 0
lstar:
max_kill_distance: 0
avg_kill_distance: 0
kills: 0
operationId: get-client-weapons
parameters:
- name: server
in: query
required: false
schema:
type: number
example: 2
description: Fetch data for specific server
- name: player
in: query
required: false
schema:
type: number
example: 1005930844007
description: Fetch data for specific player
requestBody:
content: {}
description: A JSON Object with weapon IDS as keys and weapon data as value
description: A JSON Object with weapon IDs as key and weapon data as value
parameters: []
'/client/weapons/{weaponId}':
parameters:
- schema:
type: string
example: epg
name: weaponId
in: path
required: true
description: ID of a weapon
get:
summary: Statistics for a single weapon
operationId: get-client-weapons-weaponId
requestBody:
content: {}
parameters:
- name: server
in: query
required: false
schema:
type: number
example: 2
description: Fetch data for specific server
- name: player
in: query
required: false
schema:
type: number
example: 1005930844007
description: Fetch data for specific player
description: Data for a specific weapon
responses:
'200':
description: OK
content:
application/json:
schema:
title: Weapon
type: object
properties:
max_kill_distance:
type: integer
x-stoplight:
id: npckmqv4zdoje
avg_kill_distance:
type: number
x-stoplight:
id: 8plgr96gp1ke8
kills:
type: integer
x-stoplight:
id: pha6hu1qjfsgk
/client/players:
get:
summary: Statistics for all players
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
'2250125460':
title: Player
type: object
properties:
name:
type: string
example: Legonzaur
deaths:
type: integer
kills:
type: integer
max_kill_distance:
type: integer
avg_kill_distance:
type: number
examples:
Example 1:
value:
'2250125460':
name: Legonzaur
deaths: 0
kills: 0
max_kill_distance: 0
avg_kill_distance: 0
operationId: get-client-players
parameters:
- name: weapon
in: query
required: false
schema:
type: string
example: epg
description: Fetch data for specific weapon
- name: server
in: query
required: false
schema:
type: number
example: 2
description: Fetch data for specific server
description: A JSON Object with player IDs as key and player data as value
'/client/players/{playerId}':
parameters:
- schema:
type: string
name: playerId
in: path
required: true
description: ID of a player
get:
summary: Statistics for a single player
responses:
'200':
description: OK
content:
application/json:
schema:
title: Player
type: object
properties:
name:
type: string
example: Legonzaur
deaths:
type: integer
x-stoplight:
id: xhi261df7kcqo
kills:
type: integer
x-stoplight:
id: ofjpw5sevnf64
max_kill_distance:
type: integer
x-stoplight:
id: qjqm0t2n6o93p
avg_kill_distance:
type: number
x-stoplight:
id: y0i5i1eja7v84
operationId: get-client-players-playerId
parameters:
- name: server
in: query
required: false
schema:
type: number
example: 2
description: Fetch data for specific server
- name: weapon
in: query
required: false
schema:
type: string
example: epg
description: Fetch data for specific weapon
description: Data for a specific player
'/servers/{serverId}':
parameters:
- schema:
type: string
example: '2'
name: serverId
in: path
required: true
description: ID of the server
post:
summary: ''
operationId: post-servers-serverId
responses:
'200':
description: OK
'403':
description: Forbidden
description: Used to test auth
security:
- Auth_Token: []
'/servers/{serverId}/kill':
post:
summary: Post kills
operationId: post-kills
responses:
'201':
description: Created
'400':
description: Bad Request
'401':
description: Unauthorized
parameters: []
security:
- Auth_Token: []
description: Allows a Northstar server to record kills on the database
requestBody:
content:
application/json:
schema:
title: Kill
type: object
properties:
id:
type: integer
readOnly: true
server:
type: string
readOnly: true
tone_version:
type: string
match_id:
type: string
game_mode:
type: string
map:
type: string
game_time:
type: string
format: time
player_count:
type: integer
attacker_name:
type: string
attacker_id:
type: integer
attacker_current_weapon:
type: string
attacker_current_weapon_mods:
type: integer
attacker_weapon_1:
type: string
attacker_weapon_1_mods:
type: integer
attacker_weapon_2:
type: string
attacker_weapon_2_mods:
type: integer
attacker_weapon_3:
type: string
attacker_weapon_3_mods:
type: integer
attacker_offhand_weapon_1:
type: integer
attacker_offhand_weapon_2:
type: integer
victim_name:
type: string
victim_id:
type: integer
victim_current_weapon:
type: string
victim_current_weapon_mods:
type: integer
victim_weapon_1:
type: string
victim_weapon_1_mods:
type: integer
victim_weapon_2:
type: string
victim_weapon_2_mods:
type: integer
victim_weapon_3:
type: string
victim_weapon_3_mods:
type: integer
victim_offhand_weapon_1:
type: integer
victim_offhand_weapon_2:
type: integer
cause_of_death:
type: string
distance:
type: number
required:
- cause_of_death
description: ''
parameters:
- schema:
type: string
example: '2'
name: serverId
in: path
required: true
description: ID of the server
components:
schemas:
Player:
title: Player
x-stoplight:
id: c9lv0bwq7hdx7
type: object
x-examples:
Example 1:
name: Legonzaur
deaths: 0
kills: 0
max_kill_distance: 0
avg_kill_distance: 0
properties:
name:
type: string
example: Legonzaur
deaths:
type: integer
x-stoplight:
id: xhi261df7kcqo
kills:
type: integer
x-stoplight:
id: ofjpw5sevnf64
max_kill_distance:
type: integer
x-stoplight:
id: qjqm0t2n6o93p
avg_kill_distance:
type: number
x-stoplight:
id: y0i5i1eja7v84
Weapon:
title: Weapon
x-stoplight:
id: l8j4cdsuxxrx0
type: object
x-examples:
Example 1:
max_kill_distance: 0
avg_kill_distance: 0
kills: 0
properties:
max_kill_distance:
type: integer
x-stoplight:
id: npckmqv4zdoje
avg_kill_distance:
type: number
x-stoplight:
id: 8plgr96gp1ke8
kills:
type: integer
x-stoplight:
id: pha6hu1qjfsgk
Server:
title: Server
x-stoplight:
id: g45919da0b3rc
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: fvnknoots 7v7
Kill:
title: Kill
x-stoplight:
id: 8w7qpo5dz7fo9
type: object
x-examples:
Example 1:
id: 0
server: string
tone_version: ks_3.0.0
match_id: 1cde15ee
game_mode: tdm
map: string
game_time: 385.417
player_count: 1
attacker_name: Legonzaur
attacker_id: 0
attacker_current_weapon: rspn101
attacker_current_weapon_mods: 0
attacker_weapon_1: rspn101
attacker_weapon_1_mods: 0
attacker_weapon_2: autopistol
attacker_weapon_2_mods: 0
attacker_weapon_3: defender
attacker_weapon_3_mods: 0
attacker_offhand_weapon_1: 0
attacker_offhand_weapon_2: 8
victim_name: Legonzaur
victim_id: 0
victim_current_weapon: rspn101
victim_current_weapon_mods: 0
victim_weapon_1: rspn101
victim_weapon_1_mods: 0
victim_weapon_2: autopistol
victim_weapon_2_mods: 0
victim_weapon_3: defender
victim_weapon_3_mods: 0
victim_offhand_weapon_1: 0
victim_offhand_weapon_2: 8
cause_of_death: frag_grenade
distance: 0
properties:
id:
type: integer
readOnly: true
server:
type: string
readOnly: true
tone_version:
type: string
match_id:
type: string
game_mode:
type: string
map:
type: string
game_time:
type: string
format: time
player_count:
type: integer
attacker_name:
type: string
attacker_id:
type: integer
attacker_current_weapon:
type: string
attacker_current_weapon_mods:
type: integer
attacker_weapon_1:
type: string
attacker_weapon_1_mods:
type: integer
attacker_weapon_2:
type: string
attacker_weapon_2_mods:
type: integer
attacker_weapon_3:
type: string
attacker_weapon_3_mods:
type: integer
attacker_offhand_weapon_1:
type: integer
attacker_offhand_weapon_2:
type: integer
victim_name:
type: string
victim_id:
type: integer
victim_current_weapon:
type: string
victim_current_weapon_mods:
type: integer
victim_weapon_1:
type: string
victim_weapon_1_mods:
type: integer
victim_weapon_2:
type: string
victim_weapon_2_mods:
type: integer
victim_weapon_3:
type: string
victim_weapon_3_mods:
type: integer
victim_offhand_weapon_1:
type: integer
victim_offhand_weapon_2:
type: integer
cause_of_death:
type: string
distance:
type: number
required:
- cause_of_death
securitySchemes:
Auth_Token:
type: http
scheme: basic
parameters:
server:
name: server
in: query
required: false
schema:
type: number
example: 2
description: Fetch data for specific server
player:
name: player
in: query
required: false
schema:
type: number
example: 1005930844007
description: Fetch data for specific player
weapon:
name: weapon
in: query
required: false
schema:
type: string
example: epg
description: Fetch data for specific weapon
responses: {}
examples: {}