-
Notifications
You must be signed in to change notification settings - Fork 5
/
NakamaApiClient.gd
1158 lines (832 loc) · 39.1 KB
/
NakamaApiClient.gd
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
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
extends HTTPRequest
# coding: utf-8
"""
Nakama API v2
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
export(String) var private_key
export(String) var game_id
export(String) var base_url
export(bool) var ssl_validate_domain
export(bool) var validate
var username_cache
var token_cache
var request_type
var busy = false
const ApiAccount = ['user', 'wallet', 'email', 'devices', 'custom_id', 'verify_time']
const ApiAccountCustom = ['id']
const ApiAccountDevice = ['id']
const ApiAccountEmail = ['email', 'password']
const ApiAccountFacebook = ['token']
const ApiAccountGameCenter = ['player_id', 'bundle_id', 'timestamp_seconds', 'salt', 'signature', 'public_key_url']
const ApiAccountGoogle = ['token']
const ApiAccountSteam = ['token']
const ApiChannelMessage = ['channel_id', 'message_id', 'code', 'sender_id', 'username', 'content', 'create_time', 'update_time', 'persistent']
const ApiChannelMessageList = ['messages', 'next_cursor', 'prev_cursor']
const ApiCreateGroupRequest = ['name', 'description', 'lang_tag', 'avatar_url', 'open']
const ApiDeleteStorageObjectId = ['collection', 'key', 'version']
const ApiDeleteStorageObjectsRequest = ['object_ids']
const ApiFriend = ['user', 'state']
const ApiFriends = ['friends']
const ApiGroup = ['id', 'creator_id', 'name', 'description', 'lang_tag', 'metadata', 'avatar_url', 'open', 'edge_count', 'max_count', 'create_time', 'update_time']
const ApiGroupList = ['groups', '_cursor']
const ApiGroupUserList = ['group_users']
const ApiLeaderboardRecord = ['leaderboard_id', 'owner_id', 'username', 'score', 'subscore', 'num_score', 'metadata', 'create_time', 'update_time', 'expiry_time', 'rank', 'max_num_score']
const ApiLeaderboardRecordList = ['records', 'owner_records', 'next_cursor', 'prev_cursor']
const ApiMatch = ['match_id', 'authoritative', 'label', 'size']
const ApiMatchList = ['matches']
const ApiNotification = ['id', 'subject', 'content', 'code', 'sender_id', 'create_time', 'persistent']
const ApiNotificationList = ['notifications', 'cacheable_cursor']
const ApiReadStorageObjectId = ['collection', 'key', 'user_id']
const ApiReadStorageObjectsRequest = ['object_ids']
const ApiRpc = ['id', 'payload', 'http_key']
const ApiSession = ['created', 'token', 'udp_token']
const ApiStorageObject = ['collection', 'key', 'user_id', 'value', 'version', 'permission_read', 'permission_write', 'create_time', 'update_time']
const ApiStorageObjectAck = ['collection', 'key', 'version', 'user_id']
const ApiStorageObjectAcks = ['acks']
const ApiStorageObjectList = ['objects', '_cursor']
const ApiStorageObjects = ['objects']
const ApiTournament = ['id', 'title', 'description', 'category', 'sort_order', 'size', 'max_size', 'max_num_score', 'can_enter', 'end_active', 'next_reset', 'metadata', 'create_time', 'start_time', 'end_time', 'duration']
const ApiTournamentList = ['tournaments', '_cursor']
const ApiTournamentRecordList = ['records', 'owner_records', 'next_cursor', 'prev_cursor']
const ApiUpdateAccountRequest = ['username', 'display_name', 'avatar_url', 'lang_tag', 'location', 'timezone']
const ApiUpdateGroupRequest = ['group_id', 'name', 'description', 'lang_tag', 'avatar_url', 'open']
const ApiUser = ['id', 'username', 'display_name', 'avatar_url', 'lang_tag', 'location', 'timezone', 'metadata', 'facebook_id', 'google_id', 'gamecenter_id', 'steam_id', 'online', 'edge_count', 'create_time', 'update_time']
const ApiUserGroupList = ['user_groups']
const ApiUsers = ['users']
const ApiWriteStorageObject = ['collection', 'key', 'value', 'version', 'permission_read', 'permission_write']
const ApiWriteStorageObjectsRequest = ['objects']
const GroupUserListGroupUser = ['user', 'state']
const ProtobufEmpty = []
const UserGroupListUserGroup = ['group', 'state']
const WriteLeaderboardRecordRequestLeaderboardRecordWrite = ['score', 'subscore', 'metadata']
const WriteTournamentRecordRequestTournamentRecordWrite = ['score', 'subscore', 'metadata']
"""Add friends by ID or username to a user's account.
"""
signal api_add_friends(success)
func add_friends(kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/friend', { }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add users to a group.
:param String group_id: The group to add users to. (required)
"""
signal api_add_group_users(success)
func add_group_users(group_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/group/{group_id}/add', { }, { group_id=group_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Authenticate a user with a custom id against the server.
:param ApiAccountCustom body: The custom account details. (required)
:param bool create: Register the account if the user does not already exist.
:param String username: Set the username on the account at register. Must be unique.
"""
signal api_authenticate_custom(success)
func authenticate_custom(id, kwargs={}):
if busy: return
busy = true
var create = kwargs['create']
var username = kwargs['username']
var req = compose_req('POST', '/v2/account/authenticate/custom', { create=create, username=username }, { }, { }, { }, { id=id })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Authenticate a user with a device id against the server.
:param ApiAccountDevice body: The device account details. (required)
:param bool create: Register the account if the user does not already exist.
:param String username: Set the username on the account at register. Must be unique.
"""
signal api_authenticate_device(success)
func authenticate_device(id, kwargs={}):
if busy: return
busy = true
var create = kwargs['create']
var username = kwargs['username']
var req = compose_req('POST', '/v2/account/authenticate/device', { create=create, username=username }, { }, { }, { }, { id=id })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Authenticate a user with an email+password against the server.
:param ApiAccountEmail body: The email account details. (required)
:param bool create: Register the account if the user does not already exist.
:param String username: Set the username on the account at register. Must be unique.
"""
signal api_authenticate_email(success)
func authenticate_email(email, password, kwargs={}):
if busy: return
busy = true
var create = kwargs['create']
var username = kwargs['username']
var req = compose_req('POST', '/v2/account/authenticate/email', { create=create, username=username }, { }, { }, { }, { email=email, password=password })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Authenticate a user with a Facebook OAuth token against the server.
:param ApiAccountFacebook body: The Facebook account details. (required)
:param bool create: Register the account if the user does not already exist.
:param String username: Set the username on the account at register. Must be unique.
:param bool _sync: Import Facebook friends for the user.
"""
signal api_authenticate_facebook(success)
func authenticate_facebook(token, kwargs={}):
if busy: return
busy = true
var create = kwargs['create']
var username = kwargs['username']
var _sync = kwargs['_sync']
var req = compose_req('POST', '/v2/account/authenticate/facebook', { create=create, username=username, _sync=_sync }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Authenticate a user with Apple's GameCenter against the server.
:param ApiAccountGameCenter body: The Game Center account details. (required)
:param bool create: Register the account if the user does not already exist.
:param String username: Set the username on the account at register. Must be unique.
"""
signal api_authenticate_game_center(success)
func authenticate_game_center(player_id, bundle_id, timestamp_seconds, salt, signature, public_key_url, kwargs={}):
if busy: return
busy = true
var create = kwargs['create']
var username = kwargs['username']
var req = compose_req('POST', '/v2/account/authenticate/gamecenter', { create=create, username=username }, { }, { }, { }, { player_id=player_id, bundle_id=bundle_id, timestamp_seconds=timestamp_seconds, salt=salt, signature=signature, public_key_url=public_key_url })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Authenticate a user with Google against the server.
:param ApiAccountGoogle body: The Google account details. (required)
:param bool create: Register the account if the user does not already exist.
:param String username: Set the username on the account at register. Must be unique.
"""
signal api_authenticate_google(success)
func authenticate_google(token, kwargs={}):
if busy: return
busy = true
var create = kwargs['create']
var username = kwargs['username']
var req = compose_req('POST', '/v2/account/authenticate/google', { create=create, username=username }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Authenticate a user with Steam against the server.
:param ApiAccountSteam body: The Steam account details. (required)
:param bool create: Register the account if the user does not already exist.
:param String username: Set the username on the account at register. Must be unique.
"""
signal api_authenticate_steam(success)
func authenticate_steam(token, kwargs={}):
if busy: return
busy = true
var create = kwargs['create']
var username = kwargs['username']
var req = compose_req('POST', '/v2/account/authenticate/steam', { create=create, username=username }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Block one or more users by ID or username.
"""
signal api_block_friends(success)
func block_friends(kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/friend/block', { }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Create a new group with the current user as the owner.
:param ApiCreateGroupRequest body: (required)
"""
signal api_create_group(success)
func create_group(name, description, lang_tag, avatar_url, open, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/group', { }, { }, { }, { }, { name=name, description=description, lang_tag=lang_tag, avatar_url=avatar_url, open=open })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Delete one or more users by ID or username.
:param List[String] ids: The account id of a user.
:param List[String] usernames: The account username of a user.
"""
signal api_delete_friends(success)
func delete_friends(kwargs={}):
if busy: return
busy = true
var ids = kwargs['ids']
var usernames = kwargs['usernames']
var req = compose_req('DELETE', '/v2/friend', { ids=ids, usernames=usernames }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Delete a group by ID.
:param String group_id: The id of a group. (required)
"""
signal api_delete_group(success)
func delete_group(group_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('DELETE', '/v2/group/{group_id}', { }, { group_id=group_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Delete a leaderboard record.
:param String leaderboard_id: The leaderboard ID to delete from. (required)
"""
signal api_delete_leaderboard_record(success)
func delete_leaderboard_record(leaderboard_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('DELETE', '/v2/leaderboard/{leaderboard_id}', { }, { leaderboard_id=leaderboard_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Delete one or more notifications for the current user.
:param List[String] ids: The id of notifications.
"""
signal api_delete_notifications(success)
func delete_notifications(kwargs={}):
if busy: return
busy = true
var ids = kwargs['ids']
var req = compose_req('DELETE', '/v2/notification', { ids=ids }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Delete one or more objects by ID or username.
:param ApiDeleteStorageObjectsRequest body: (required)
"""
signal api_delete_storage_objects(success)
func delete_storage_objects(object_ids, kwargs={}):
if busy: return
busy = true
var req = compose_req('PUT', '/v2/storage/delete', { }, { }, { }, { }, { object_ids=object_ids })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Fetch the current user's account.
"""
signal api_get_account(success)
func get_account(kwargs={}):
if busy: return
busy = true
var req = compose_req('GET', '/v2/account', { }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Fetch zero or more users by ID and/or username.
:param List[String] ids: The account id of a user.
:param List[String] usernames: The account username of a user.
:param List[String] facebook_ids: The Facebook ID of a user.
"""
signal api_get_users(success)
func get_users(kwargs={}):
if busy: return
busy = true
var ids = kwargs['ids']
var usernames = kwargs['usernames']
var facebook_ids = kwargs['facebook_ids']
var req = compose_req('GET', '/v2/user', { ids=ids, usernames=usernames, facebook_ids=facebook_ids }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""A healthcheck which load balancers can use to check the service.
"""
signal api_healthcheck(success)
func healthcheck(kwargs={}):
if busy: return
busy = true
var req = compose_req('GET', '/healthcheck', { }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Import Facebook friends and add them to a user's account.
:param ApiAccountFacebook body: The Facebook account details. (required)
:param bool reset: Reset the current user's friends list.
"""
signal api_import_facebook_friends(success)
func import_facebook_friends(token, kwargs={}):
if busy: return
busy = true
var reset = kwargs['reset']
var req = compose_req('POST', '/v2/friend/facebook', { reset=reset }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Immediately join an open group, or request to join a closed one.
:param String group_id: The group ID to join. The group must already exist. (required)
"""
signal api_join_group(success)
func join_group(group_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/group/{group_id}/join', { }, { group_id=group_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Attempt to join an open and running tournament.
:param String tournament_id: The ID of the tournament to join. The tournament must already exist. (required)
"""
signal api_join_tournament(success)
func join_tournament(tournament_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/tournament/{tournament_id}/join', { }, { tournament_id=tournament_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Kick a set of users from a group.
:param String group_id: The group ID to kick from. (required)
"""
signal api_kick_group_users(success)
func kick_group_users(group_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/group/{group_id}/kick', { }, { group_id=group_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Leave a group the user is a member of.
:param String group_id: The group ID to leave. (required)
"""
signal api_leave_group(success)
func leave_group(group_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/group/{group_id}/leave', { }, { group_id=group_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add a custom ID to the social profiles on the current user's account.
:param ApiAccountCustom body: (required)
"""
signal api_link_custom(success)
func link_custom(id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/link/custom', { }, { }, { }, { }, { id=id })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add a device ID to the social profiles on the current user's account.
:param ApiAccountDevice body: (required)
"""
signal api_link_device(success)
func link_device(id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/link/device', { }, { }, { }, { }, { id=id })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add an email+password to the social profiles on the current user's account.
:param ApiAccountEmail body: (required)
"""
signal api_link_email(success)
func link_email(email, password, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/link/email', { }, { }, { }, { }, { email=email, password=password })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add Facebook to the social profiles on the current user's account.
:param ApiAccountFacebook body: The Facebook account details. (required)
:param bool _sync: Import Facebook friends for the user.
"""
signal api_link_facebook(success)
func link_facebook(token, kwargs={}):
if busy: return
busy = true
var _sync = kwargs['_sync']
var req = compose_req('POST', '/v2/account/link/facebook', { _sync=_sync }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add Apple's GameCenter to the social profiles on the current user's account.
:param ApiAccountGameCenter body: (required)
"""
signal api_link_game_center(success)
func link_game_center(player_id, bundle_id, timestamp_seconds, salt, signature, public_key_url, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/link/gamecenter', { }, { }, { }, { }, { player_id=player_id, bundle_id=bundle_id, timestamp_seconds=timestamp_seconds, salt=salt, signature=signature, public_key_url=public_key_url })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add Google to the social profiles on the current user's account.
:param ApiAccountGoogle body: (required)
"""
signal api_link_google(success)
func link_google(token, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/link/google', { }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Add Steam to the social profiles on the current user's account.
:param ApiAccountSteam body: (required)
"""
signal api_link_steam(success)
func link_steam(token, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/link/steam', { }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List a channel's message history.
:param String channel_id: The channel ID to list from. (required)
:param int limit: Max number of records to return. Between 1 and 100.
:param bool forward: True if listing should be older messages to newer, false if reverse.
:param String _cursor: A pagination cursor, if any.
"""
signal api_list_channel_messages(success)
func list_channel_messages(channel_id, kwargs={}):
if busy: return
busy = true
var limit = kwargs['limit']
var forward = kwargs['forward']
var _cursor = kwargs['_cursor']
var req = compose_req('GET', '/v2/channel/{channel_id}', { limit=limit, forward=forward, _cursor=_cursor }, { channel_id=channel_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List all friends for the current user.
"""
signal api_list_friends(success)
func list_friends(kwargs={}):
if busy: return
busy = true
var req = compose_req('GET', '/v2/friend', { }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List all users that are part of a group.
:param String group_id: The group ID to list from. (required)
"""
signal api_list_group_users(success)
func list_group_users(group_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('GET', '/v2/group/{group_id}/user', { }, { group_id=group_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List groups based on given filters.
:param String name: List groups that contain this value in their names.
:param String _cursor: Optional pagination cursor.
:param int limit: Max number of groups to return. Between 1 and 100.
"""
signal api_list_groups(success)
func list_groups(kwargs={}):
if busy: return
busy = true
var name = kwargs['name']
var _cursor = kwargs['_cursor']
var limit = kwargs['limit']
var req = compose_req('GET', '/v2/group', { name=name, _cursor=_cursor, limit=limit }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List leaderboard records.
:param String leaderboard_id: The ID of the leaderboard to list for. (required)
:param List[String] owner_ids: One or more owners to retrieve records for.
:param int limit: Max number of records to return. Between 1 and 100.
:param String _cursor: A next or previous page cursor.
"""
signal api_list_leaderboard_records(success)
func list_leaderboard_records(leaderboard_id, kwargs={}):
if busy: return
busy = true
var owner_ids = kwargs['owner_ids']
var limit = kwargs['limit']
var _cursor = kwargs['_cursor']
var req = compose_req('GET', '/v2/leaderboard/{leaderboard_id}', { owner_ids=owner_ids, limit=limit, _cursor=_cursor }, { leaderboard_id=leaderboard_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List leaderboard records that belong to a user.
:param String leaderboard_id: The ID of the tournament to list for. (required)
:param String owner_id: The owner to retrieve records around. (required)
:param int limit: Max number of records to return. Between 1 and 100.
"""
signal api_list_leaderboard_records_around_owner(success)
func list_leaderboard_records_around_owner(leaderboard_id, owner_id, kwargs={}):
if busy: return
busy = true
var limit = kwargs['limit']
var req = compose_req('GET', '/v2/leaderboard/{leaderboard_id}/owner/{owner_id}', { limit=limit }, { leaderboard_id=leaderboard_id, owner_id=owner_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Fetch list of running matches.
:param int limit: Limit the number of returned matches.
:param bool authoritative: Authoritative or relayed matches.
:param String label: Label filter.
:param int min_size: Minimum user count.
:param int max_size: Maximum user count.
:param String query: Arbitrary label query.
"""
signal api_list_matches(success)
func list_matches(kwargs={}):
if busy: return
busy = true
var limit = kwargs['limit']
var authoritative = kwargs['authoritative']
var label = kwargs['label']
var min_size = kwargs['min_size']
var max_size = kwargs['max_size']
var query = kwargs['query']
var req = compose_req('GET', '/v2/match', { limit=limit, authoritative=authoritative, label=label, min_size=min_size, max_size=max_size, query=query }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Fetch list of notifications.
:param int limit: The number of notifications to get. Between 1 and 100.
:param String cacheable_cursor: A cursor to page through notifications. May be cached by clients to get from point in time forwards.
"""
signal api_list_notifications(success)
func list_notifications(kwargs={}):
if busy: return
busy = true
var limit = kwargs['limit']
var cacheable_cursor = kwargs['cacheable_cursor']
var req = compose_req('GET', '/v2/notification', { limit=limit, cacheable_cursor=cacheable_cursor }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List publicly readable storage objects in a given collection.
:param String collection: The collection which stores the object. (required)
:param String user_id: ID of the user.
:param int limit: The number of storage objects to list. Between 1 and 100.
:param String _cursor: The cursor to page through results from.
"""
signal api_list_storage_objects(success)
func list_storage_objects(collection, kwargs={}):
if busy: return
busy = true
var user_id = kwargs['user_id']
var limit = kwargs['limit']
var _cursor = kwargs['_cursor']
var req = compose_req('GET', '/v2/storage/{collection}', { user_id=user_id, limit=limit, _cursor=_cursor }, { collection=collection }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List publicly readable storage objects in a given collection.
:param String collection: The collection which stores the object. (required)
:param String user_id: ID of the user. (required)
:param int limit: The number of storage objects to list. Between 1 and 100.
:param String _cursor: The cursor to page through results from.
"""
signal api_list_storage_objects2(success)
func list_storage_objects2(collection, user_id, kwargs={}):
if busy: return
busy = true
var limit = kwargs['limit']
var _cursor = kwargs['_cursor']
var req = compose_req('GET', '/v2/storage/{collection}/{user_id}', { limit=limit, _cursor=_cursor }, { collection=collection, user_id=user_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List tournament records.
:param String tournament_id: The ID of the tournament to list for. (required)
:param List[String] owner_ids: One or more owners to retrieve records for.
:param int limit: Max number of records to return. Between 1 and 100.
:param String _cursor: A next or previous page cursor.
"""
signal api_list_tournament_records(success)
func list_tournament_records(tournament_id, kwargs={}):
if busy: return
busy = true
var owner_ids = kwargs['owner_ids']
var limit = kwargs['limit']
var _cursor = kwargs['_cursor']
var req = compose_req('GET', '/v2/tournament/{tournament_id}', { owner_ids=owner_ids, limit=limit, _cursor=_cursor }, { tournament_id=tournament_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List tournament records for a given owner.
:param String tournament_id: The ID of the tournament to list for. (required)
:param String owner_id: The owner to retrieve records around. (required)
:param int limit: Max number of records to return. Between 1 and 100.
"""
signal api_list_tournament_records_around_owner(success)
func list_tournament_records_around_owner(tournament_id, owner_id, kwargs={}):
if busy: return
busy = true
var limit = kwargs['limit']
var req = compose_req('GET', '/v2/tournament/{tournament_id}/owner/{owner_id}', { limit=limit }, { tournament_id=tournament_id, owner_id=owner_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List current or upcoming tournaments.
:param int category_start: The start of the categories to include. Defaults to 0.
:param int category_end: The end of the categories to include. Defaults to 128.
:param int start_time: The start time for tournaments. Defaults to epoch.
:param int end_time: The end time for tournaments. Defaults to +1 year from current Unix time.
:param int limit: Max number of records to return. Between 1 and 100.
:param String _cursor: A next page cursor for listings (optional).
"""
signal api_list_tournaments(success)
func list_tournaments(kwargs={}):
if busy: return
busy = true
var category_start = kwargs['category_start']
var category_end = kwargs['category_end']
var start_time = kwargs['start_time']
var end_time = kwargs['end_time']
var limit = kwargs['limit']
var _cursor = kwargs['_cursor']
var req = compose_req('GET', '/v2/tournament', { category_start=category_start, category_end=category_end, start_time=start_time, end_time=end_time, limit=limit, _cursor=_cursor }, { }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""List groups the current user belongs to.
:param String user_id: ID of the user. (required)
"""
signal api_list_user_groups(success)
func list_user_groups(user_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('GET', '/v2/user/{user_id}/group', { }, { user_id=user_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Promote a set of users in a group to the next role up.
:param String group_id: The group ID to promote in. (required)
"""
signal api_promote_group_users(success)
func promote_group_users(group_id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/group/{group_id}/promote', { }, { group_id=group_id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Get storage objects.
:param ApiReadStorageObjectsRequest body: (required)
"""
signal api_read_storage_objects(success)
func read_storage_objects(object_ids, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/storage', { }, { }, { }, { }, { object_ids=object_ids })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Execute a Lua function on the server.
:param String id: The identifier of the function. (required)
:param String body: The payload of the function which must be a JSON object. (required)
"""
signal api_rpc_func(success)
func rpc_func(id, body, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/rpc/{id}', { }, { id=id }, { }, { }, { }, body)
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Execute a Lua function on the server.
:param String id: The identifier of the function. (required)
:param String payload: The payload of the function which must be a JSON object.
:param String http_key: The authentication key used when executed as a non-client HTTP request.
"""
signal api_rpc_func2(success)
func rpc_func2(id, kwargs={}):
if busy: return
busy = true
var payload = kwargs['payload']
var http_key = kwargs['http_key']
var req = compose_req('GET', '/v2/rpc/{id}', { payload=payload, http_key=http_key }, { id=id }, { }, { }, { })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Remove the custom ID from the social profiles on the current user's account.
:param ApiAccountCustom body: (required)
"""
signal api_unlink_custom(success)
func unlink_custom(id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/unlink/custom', { }, { }, { }, { }, { id=id })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Remove the device ID from the social profiles on the current user's account.
:param ApiAccountDevice body: (required)
"""
signal api_unlink_device(success)
func unlink_device(id, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/unlink/device', { }, { }, { }, { }, { id=id })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Remove the email+password from the social profiles on the current user's account.
:param ApiAccountEmail body: (required)
"""
signal api_unlink_email(success)
func unlink_email(email, password, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/unlink/email', { }, { }, { }, { }, { email=email, password=password })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Remove Facebook from the social profiles on the current user's account.
:param ApiAccountFacebook body: (required)
"""
signal api_unlink_facebook(success)
func unlink_facebook(token, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/unlink/facebook', { }, { }, { }, { }, { token=token })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Remove Apple's GameCenter from the social profiles on the current user's account.
:param ApiAccountGameCenter body: (required)
"""
signal api_unlink_game_center(success)
func unlink_game_center(player_id, bundle_id, timestamp_seconds, salt, signature, public_key_url, kwargs={}):
if busy: return
busy = true
var req = compose_req('POST', '/v2/account/unlink/gamecenter', { }, { }, { }, { }, { player_id=player_id, bundle_id=bundle_id, timestamp_seconds=timestamp_seconds, salt=salt, signature=signature, public_key_url=public_key_url })
request(req.url, req.headers, ssl_validate_domain, req.method, req.data)
pass
"""Remove Google from the social profiles on the current user's account.
:param ApiAccountGoogle body: (required)
"""