-
Notifications
You must be signed in to change notification settings - Fork 2
/
ravenfall-api-data.json
775 lines (775 loc) · 31.1 KB
/
ravenfall-api-data.json
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
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
{
"Settings": {
"Name": "RavenNest API Documentation",
"Version": "v1.0"
},
"Pages": [],
"Apis": [{
"Name": "Authentication API",
"Description": "Used for authenticating with the RavenNest API.",
"Path": "api/auth",
"Methods": [{
"Name": "Check current authentication state",
"Method": "GET",
"Path": "/",
"Description": "Doing a GET to this api will return whether or not you are logged in and can use the RavenNest API.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "System.String",
"Example": "\"\""
}
}, {
"Name": "Authenticate",
"Method": "POST",
"Path": "/",
"Description": "Authenticate to RavenNest API and retrieve an auth token. The auth token is required for many of the available APIs. This method be called every hour or so to keep your auth token valid.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Username\":null,\"Password\":null}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "AuthToken",
"Example": "{\"UserId\":\"00000000-0000-0000-0000-000000000000\",\"IssuedUtc\":\"0001-01-01T00:00:00\",\"ExpiresUtc\":\"0001-01-01T00:00:00\",\"Token\":null,\"Expired\":true}"
}
}]
}, {
"Name": "Game API",
"Description": "Used for handling game sessions and polling game events.",
"Path": "api/game",
"Methods": [{
"Name": "Get info about current game session",
"Method": "GET",
"Path": "/",
"Description": "This will return information about the ongoing game session such as uptime, peak player count and more.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "GameInfo",
"Example": "{\"UserId\":null,\"Uptime\":\"00:00:00\",\"PeakPlayerCount\":0,\"PlayerCount\":0,\"EventRevision\":0}"
}
}, {
"Name": "Start a game session",
"Method": "POST",
"Path": "/",
"Description": "Start a new or continue on an existing non-stopped game session. This will also return a refreshed session token, required for updating any player, marketplace or game info.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Value\": false}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "SessionToken",
"Example": "{\"SessionId\":\"00000000-0000-0000-0000-000000000000\",\"StartedUtc\":\"0001-01-01T00:00:00\",\"ExpiresUtc\":\"0001-01-01T00:00:00\",\"AuthToken\":null,\"Expired\":true}"
}
}, {
"Name": "Raid another streamer",
"Method": "DELETE",
"Path": "/raid/:username",
"Description": "When you're done with your stream, don't forget to raid someone! This will end your current game session and bring all your current playing players into the target Twitch user's stream playing Ravenfall.",
"Parameters": [{
"Type": "String",
"Name": "username",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Value\": false}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "End the session",
"Method": "DELETE",
"Path": "/",
"Description": "This will end your current game session. This should be called whenever the game stops.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Void",
"Example": "{}"
}
}, {
"Name": "Poll game events",
"Method": "GET",
"Path": "/events/:revision",
"Description": "Poll the latest game events after a specific revision. This will hold your request up to 20 seconds or until a new game event has been added.",
"Parameters": [{
"Type": "Int32",
"Name": "revision",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "EventCollection",
"Example": "[{\"GameSessionId\":\"00000000-0000-0000-0000-000000000000\",\"Type\":0,\"Revision\":0,\"Data\":null}]"
}
}]
}, {
"Name": "Items API",
"Description": "Used for managing the items database.",
"Path": "api/items",
"Methods": [{
"Name": "Get all available items",
"Method": "GET",
"Path": "/",
"Description": "This will return the list of all available items in Ravenfall. This is required as no other endpoints will give out any item data other than item id. This list of items is then necessary to do an item lookup.",
"Parameters": [],
"Authentication": {
"RequiresAuth": true,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "RavenNest.Models.ItemCollection",
"Example": "[{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"Name\":null,\"Level\":0,\"WeaponAim\":0,\"WeaponPower\":0,\"ArmorPower\":0,\"RequiredAttackLevel\":0,\"RequiredDefenseLevel\":0,\"Category\":0,\"Type\":0,\"Material\":0,\"MaleModelId\":null,\"FemaleModelId\":null,\"GenericPrefab\":null,\"MalePrefab\":null,\"FemalePrefab\":null,\"IsGenericModel\":null,\"Craftable\":null,\"RequiredCraftingLevel\":0,\"WoodCost\":0,\"OreCost\":0}]"
}
}, {
"Name": "Add a new item to the database",
"Method": "POST",
"Path": "/",
"Description": "This will add a new item to the game. This requires the authenticated user to be a Ravenfall administrator.",
"Parameters": [],
"Authentication": {
"RequiresAuth": true,
"RequiresSession": false,
"RequiresAdmin": true
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"Name\":null,\"Level\":0,\"WeaponAim\":0,\"WeaponPower\":0,\"ArmorPower\":0,\"RequiredAttackLevel\":0,\"RequiredDefenseLevel\":0,\"Category\":0,\"Type\":0,\"Material\":0,\"MaleModelId\":null,\"FemaleModelId\":null,\"GenericPrefab\":null,\"MalePrefab\":null,\"FemalePrefab\":null,\"IsGenericModel\":null,\"Craftable\":null,\"RequiredCraftingLevel\":0,\"WoodCost\":0,\"OreCost\":0}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Delete an item from the database",
"Method": "DELETE",
"Path": "/:itemId",
"Description": "This will delete an item from the game. This requires the authenticated user to be a Ravenfall administrator.",
"Parameters": [{
"Type": "Guid",
"Name": "itemId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": true,
"RequiresSession": false,
"RequiresAdmin": true
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "System.Boolean",
"Example": "false"
}
}, {
"Name": "Update an item in the database",
"Method": "PUT",
"Path": "/",
"Description": "This update the target item. This requires the authenticated user to be a Ravenfall administrator.",
"Parameters": [],
"Authentication": {
"RequiresAuth": true,
"RequiresSession": false,
"RequiresAdmin": true
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Id\":\"00000000-0000-0000-0000-000000000000\",\"Name\":null,\"Level\":0,\"WeaponAim\":0,\"WeaponPower\":0,\"ArmorPower\":0,\"RequiredAttackLevel\":0,\"RequiredDefenseLevel\":0,\"Category\":0,\"Type\":0,\"Material\":0,\"MaleModelId\":null,\"FemaleModelId\":null,\"GenericPrefab\":null,\"MalePrefab\":null,\"FemalePrefab\":null,\"IsGenericModel\":null,\"Craftable\":null,\"RequiredCraftingLevel\":0,\"WoodCost\":0,\"OreCost\":0}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "System.Boolean",
"Example": "false"
}
}]
}, {
"Name": "Marketplace API",
"Description": "Used for buying and selling items in a global marketplace.",
"Path": "api/marketplace",
"Methods": [{
"Name": "Get Marketplace Listing",
"Method": "GET",
"Path": "/:offset/:size",
"Description": "Gets a range of items available on the marketplace based on a set offset and size.",
"Parameters": [{
"Type": "Int32",
"Name": "offset",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Int32",
"Name": "size",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": true,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "MarketItemCollection",
"Example": "[{\"SellerUserId\":null,\"ItemId\":\"00000000-0000-0000-0000-000000000000\",\"Amount\":0,\"PricePerItem\":0.0}]"
}
}, {
"Name": "Sell items on the marketplace",
"Method": "GET",
"Path": "/:userId/sell/:itemId/:amount/:pricePerItem",
"Description": "Adds one or more item(s) on the marketplace listing for sale. This will remove the item(s) from the players inventory.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Guid",
"Name": "itemId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Int64",
"Name": "amount",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Decimal",
"Name": "pricePerItem",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "ItemSellResult",
"Example": "{\"State\":0}"
}
}, {
"Name": "Buy items on the marketplace",
"Method": "GET",
"Path": "/:userId/buy/:itemId/:amount/:maxPricePerItem",
"Description": "Buy the target item(s) with the cheapest price per item, this price cannot exceed the requested max price per item. The bought item(s) will be equipped automatically if they are better than the currently equipped item of same type.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Guid",
"Name": "itemId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Int64",
"Name": "amount",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Decimal",
"Name": "maxPricePerItem",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "ItemBuyResult",
"Example": "{\"State\":0,\"AmountBought\":null,\"CostPerItem\":null,\"TotalAmount\":0,\"TotalCost\":0.0}"
}
}]
}, {
"Name": "Players API",
"Description": "Used for managing player data.",
"Path": "api/players",
"Methods": [{
"Name": "Get Current Player",
"Method": "GET",
"Path": "/",
"Description": "Gets the player data for the authenticated Twitch user, authenticated RavenNest user or current Game Session user.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "Player",
"Example": "{\"UserId\":null,\"UserName\":null,\"Name\":null,\"Statistics\":null,\"Appearance\":null,\"Resources\":null,\"Skills\":null,\"InventoryItems\":null,\"Local\":false,\"OriginUserId\":\"00000000-0000-0000-0000-000000000000\",\"Revision\":0}"
}
}, {
"Name": "(Alias) Get Current Player",
"Method": "GET",
"Path": "/user",
"Description": "Gets the player data for the authenticated Twitch user, authenticated RavenNest user or current Game Session user.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "Player",
"Example": "{\"UserId\":null,\"UserName\":null,\"Name\":null,\"Statistics\":null,\"Appearance\":null,\"Resources\":null,\"Skills\":null,\"InventoryItems\":null,\"Local\":false,\"OriginUserId\":\"00000000-0000-0000-0000-000000000000\",\"Revision\":0}"
}
}, {
"Name": "Add Player to Game Session",
"Method": "POST",
"Path": "/:userId",
"Description": "Adds the target player to the ongoing session. This will lock the target player to the session and then return the player data.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Value\": \"\"}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Player",
"Example": "{\"UserId\":null,\"UserName\":null,\"Name\":null,\"Statistics\":null,\"Appearance\":null,\"Resources\":null,\"Skills\":null,\"InventoryItems\":null,\"Local\":false,\"OriginUserId\":\"00000000-0000-0000-0000-000000000000\",\"Revision\":0}"
}
}, {
"Name": "Get Player by Twitch UserId",
"Method": "GET",
"Path": "/:userId",
"Description": "Get the target player using a Twitch UserId. This requires a session token for grabbing a local player but only an auth token for a global player.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": true,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "Player",
"Example": "{\"UserId\":null,\"UserName\":null,\"Name\":null,\"Statistics\":null,\"Appearance\":null,\"Resources\":null,\"Skills\":null,\"InventoryItems\":null,\"Local\":false,\"OriginUserId\":\"00000000-0000-0000-0000-000000000000\",\"Revision\":0}"
}
}, {
"Name": "Add item to player",
"Method": "GET",
"Path": "/:userId/item/:item",
"Description": "Adds an item to the target player, the item will automatically be equipped if it is better than any other existing equipped gear.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Guid",
"Name": "item",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "AddItemResult",
"Example": "0"
}
}, {
"Name": "UnEquip item",
"Method": "GET",
"Path": "/:userId/unequip/:item",
"Description": "UnEquips an item from the target player.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Guid",
"Name": "item",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Equip item",
"Method": "GET",
"Path": "/:userId/equip/:item",
"Description": "Equips an item from the target player.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Guid",
"Name": "item",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Update player appearance as Twitch User",
"Method": "POST",
"Path": "/appearance",
"Description": "Update the target player with a new appearance. This requires you to be authenticated with Twitch to update.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Values\": [0]}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Update player appearance",
"Method": "POST",
"Path": "/:userId/appearance",
"Description": "Update the target player with a new appearance. This requires a session token to update a target player.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Values\": [0]}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Update player experience",
"Method": "POST",
"Path": "/:userId/experience",
"Description": "Update the target player with their current experience state.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Values\": [0]}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Update player statistics",
"Method": "POST",
"Path": "/:userId/statistics",
"Description": "Update the target player with their current statistics state, such as how many enemies killed, how many times they have died, etc.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Values\": [0]}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Update player resources",
"Method": "POST",
"Path": "/:userId/resources",
"Description": "Update the target player with their current resource state, such as coins, wood, ores, fish, wheat, etc.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Values\": [0]}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Gift an item to another player",
"Method": "GET",
"Path": "/:userId/gift/:receiverUserId/:itemId",
"Description": "Gift an item from one player to another, this will remove the item from the giver and add it to the receivers inventory. Gifted item will be equipped automatically if it is better than what is already equipped.",
"Parameters": [{
"Type": "String",
"Name": "userId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "String",
"Name": "receiverUserId",
"Description": "",
"Default": "",
"Optional": false
}, {
"Type": "Guid",
"Name": "itemId",
"Description": "",
"Default": "",
"Optional": false
}],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean",
"Example": "false"
}
}, {
"Name": "Bulk player update",
"Method": "POST",
"Path": "/update",
"Description": "Update many players at the same time. This is used to save all currently playing players in one request.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": true,
"RequiresAdmin": false
},
"RequestBody": {
"ContentType": "application/json",
"Example": "{\"Values\": [{\"UserId\":null,\"CurrentTask\":null,\"Experience\":null,\"Resources\":null,\"Statistics\":null,\"Revision\":0}]}"
},
"Response": {
"ContentType": "application/json",
"ReturnType": "Boolean[]",
"Example": null
}
}]
}, {
"Name": "Twitch API",
"Description": "Used by the website to allow authentication with Twitch. This is not meant to be used elsewhere.",
"Path": "api/twitch",
"Methods": [{
"Name": "Set Twitch Access Token",
"Method": "GET",
"Path": "/session",
"Description": "Updates current session with the set Twitch access token, used as an user identifier throughout the website.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "String",
"Example": "\"\""
}
}, {
"Name": "Get Access Token Request URL",
"Method": "GET",
"Path": "/access",
"Description": "Gets a Twitch access token request url with the scope user:read:email.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "System.String",
"Example": "\"\""
}
}, {
"Name": "Get Twitch User",
"Method": "GET",
"Path": "/user",
"Description": "After authenticating with Twitch, this can be used to get information about the logged in user.",
"Parameters": [],
"Authentication": {
"RequiresAuth": false,
"RequiresSession": false,
"RequiresAdmin": false
},
"RequestBody": null,
"Response": {
"ContentType": "application/json",
"ReturnType": "String",
"Example": "\"\""
}
}]
}]
}