Repository navigation
Expand file tree
/
Copy pathapi.html
More file actions
1411 lines (1408 loc) · 247 KB
/
Copy pathapi.html
File metadata and controls
1411 lines (1408 loc) · 247 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
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
<!DOCTYPE html><html><head><meta charset="utf-8"><title>ClanOfthecloud APIs</title><link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootswatch/3.1.1/flatly/bootstrap.min.css"><link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200"><style>pre code{display:block;padding:.5em;color:#333}
/* Highlight.js Theme Tomorrow */
.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}</style><style>body,
h4,
h5 {
font-family: 'Roboto' sans-serif !important;
}
h1,
h2,
h3,
.aglio {
font-family: 'Raleway' sans-serif !important;
}
h1 a,
h2 a,
h3 a,
h4 a,
h5 a {
display: none;
}
h1:hover a,
h2:hover a,
h3:hover a,
h4:hover a,
h5:hover a {
display: inline;
}
code {
color: #444;
background-color: #ddd;
font-family: 'Inconsolata' monospace !important;
}
a[data-target] {
cursor: pointer;
}
h4 {
font-size: 100%;
font-weight: bold;
text-transform: uppercase;
}
.back-to-top {
position: fixed;
z-index: 1;
bottom: 0px;
right: 24px;
padding: 4px 8px;
background-color: #eee;
text-decoration: none !important;
border-top: 1px solid rgba(0,0,0,0.1);
border-left: 1px solid rgba(0,0,0,0.1);
border-right: 1px solid rgba(0,0,0,0.1);
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
.panel {
overflow: hidden;
}
.panel-heading code {
margin-left: 3px;
background-color: rgba(255,255,255,0.7);
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.panel-heading h3 {
margin-top: 10px;
margin-bottom: 10px;
}
a.list-group-item:hover {
background-color: #f8f8f8;
border-left: 2px solid #555;
padding-left: 15px;
}
.indent {
display: block;
text-indent: 16px;
}
.list-group-item {
padding-left: 16px;
}
.list-group-item .toggle .open {
display: block;
}
.list-group-item .toggle .closed {
display: none;
}
.list-group-item.collapsed .toggle .open {
display: none;
}
.list-group-item.collapsed .toggle .closed {
display: block;
}
a.list-group-item:hover {
background-color: #f5f5f5;
border-left-color: #555;
}
a.list-group-item {
font-size: 13px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
a.list-group-item.heading {
font-size: 15px;
background-color: #ecf0f1;
}
a.list-group-item.heading:hover {
background-color: #f5f5f5;
}
.list-group-item.collapse {
display: none;
}
.list-group-item.collapse.in {
display: block;
}
.list-group-item a span.closed {
display: none;
}
.list-group-item a span.open {
display: block;
}
.list-group-item a.collapsed span.closed {
display: block;
}
.list-group-item a.collapsed span.open {
display: none;
}
#nav {
width: inherit;
margin-top: 38px;
max-width: 255px;
top: 0;
bottom: 0;
padding-right: 12px;
padding-bottom: 12px;
overflow-y: auto;
}
@media (max-width: 1199px) {
#nav {
max-width: 212px;
}
}
</style></head><body><a href="#top" class="text-muted back-to-top"><i class="fa fa-toggle-up"></i> Back to top</a><div class="container"><div class="row"><div class="col-md-3"><nav id="nav" class="hidden-sm hidden-xs affix nav"><div class="list-group"><a data-toggle="" data-target="#login-routes-menu" href="#login-routes" class="list-group-item heading collapsed">Login routes</a><div id="login-routes-menu"><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/login</a><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/login/anonymous</a><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/logout</a><a href="#login-routes-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/unlink</a></div></div><div class="list-group"><a data-toggle="" data-target="#gamer-profile-menu" href="#gamer-profile" class="list-group-item heading collapsed">Gamer profile</a><div id="gamer-profile-menu"><a href="#gamer-profile-profile" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Profile</a><a href="#gamer-profile-profile-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set Profile</span></a><a href="#gamer-profile-profile-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get profile</span></a></div></div><div class="list-group"><a data-toggle="" data-target="#gamer-querying-menu" href="#gamer-querying" class="list-group-item heading collapsed">Gamer Querying</a><div id="gamer-querying-menu"><a href="#gamer-querying-find-users" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Find Users</a><a href="#gamer-querying-validate-gamer_id" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Validate gamer_id</a><a href="#gamer-querying-find-a-"network"-gamer_id" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Find a "Network" gamer_id</a></div></div><div class="list-group"><a data-toggle="" data-target="#key-value-store-menu" href="#key-value-store" class="list-group-item heading collapsed">Key-Value Store</a><div id="key-value-store-menu"><a href="#key-value-store-gamer-vfs" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Gamer VFS</a><a href="#key-value-store-gamer-vfs-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get gamer's data</span></a><a href="#key-value-store-gamer-vfs-put" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-warning"><i class="fa fa-pencil"></i></span><span class="indent">Set gamer's data</span></a><a href="#key-value-store-gamer-vfs-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">Remove gamer's data</span></a><a href="#key-value-store-game-vfs" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>Game VFS</a></div></div><div class="list-group"><a data-toggle="" data-target="#transactions-menu" href="#transactions" class="list-group-item heading collapsed">Transactions</a><div id="transactions-menu"><a href="#transactions-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v2.2/gamer/tx/{domain}</a><a href="#transactions-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.4/gamer/tx/{domain}{?unit}{&skip}{&limit}</a><a href="#transactions-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/tx/{domain}/balance</a></div></div><div class="list-group"><a data-toggle="" data-target="#gamer-properties-menu" href="#gamer-properties" class="list-group-item heading collapsed">Gamer Properties</a><div id="gamer-properties-menu"><a href="#gamer-properties-properties" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Properties</a><a href="#gamer-properties-properties-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set properties</span></a><a href="#gamer-properties-properties-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get properties</span></a><a href="#gamer-properties-properties-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">delete properties</span></a><a href="#gamer-properties-property" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Property</a><a href="#gamer-properties-property-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set property</span></a><a href="#gamer-properties-property-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get property</span></a><a href="#gamer-properties-property-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">delete property</span></a></div></div><div class="list-group"><a data-toggle="" data-target="#social-features-menu" href="#social-features" class="list-group-item heading collapsed">Social features</a><div id="social-features-menu"><a href="#social-features-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/friends/{domain}/{?status}</a><a href="#social-features-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v2.6/gamer/friends/{domain}/{friendid}?{status}</a></div></div><div class="list-group"><a data-toggle="" data-target="#sponsoring-menu" href="#sponsoring" class="list-group-item heading collapsed">Sponsoring</a><div id="sponsoring-menu"><a href="#sponsoring-god-father" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">God father</a><a href="#sponsoring-god-father-put" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-warning"><i class="fa fa-pencil"></i></span><span class="indent">Get sponsoring code</span></a><a href="#sponsoring-god-father-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set godfather</span></a><a href="#sponsoring-god-father-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Get godfather</span></a><a href="#sponsoring-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/godchidren/{domain}</a></div></div><div class="list-group"><a data-toggle="" data-target="#scores-and-leaderboards-menu" href="#scores-and-leaderboards" class="list-group-item heading collapsed">Scores and Leaderboards</a><div id="scores-and-leaderboards-menu"><a href="#scores-and-leaderboards-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&force}</a><a href="#scores-and-leaderboards-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&type}{&page}{&count}</a><a href="#scores-and-leaderboards-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v2.6/gamer/bestscores/{domain}</a></div></div><div class="list-group"><a data-toggle="" data-target="#events-menu" href="#events" class="list-group-item heading collapsed">Events</a><div id="events-menu"><a href="#events-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/event/{domain}/{gamer_id}</a><a href="#events-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/event/{domain}{?ack}{&timeout}</a></div></div><div class="list-group"><a data-toggle="" data-target="#achievements-menu" href="#achievements" class="list-group-item heading collapsed">Achievements</a><div id="achievements-menu"><a href="#achievements-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/achievements/{domain}</a><a href="#achievements-custom-information-about-an-achievement" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Custom information about an achievement</a><a href="#achievements-custom-information-about-an-achievement-post" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span><span class="indent">Set custom information about an achievement, for an user</span></a><a href="#achievements-custom-information-about-an-achievement-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Extract custom information about an achievement</span></a></div></div><div class="list-group"><a data-toggle="" data-target="#matches-menu" href="#matches" class="list-group-item heading collapsed">Matches</a><div id="matches-menu"><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches{?domain}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/gamer/matches{?domain}{&properties}{&participating}{&finished}{&invited}</a><a href="#matches-working-with-a-match" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item">Working with a match</a><a href="#matches-working-with-a-match-get" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span><span class="indent">Fetching in-depth information about a match</span></a><a href="#matches-working-with-a-match-delete" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span><span class="indent">Deleting a match</span></a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/join</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/leave</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/invite/{gamer_id}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span>DELETE /v1/gamer/matches/{id}/invitation</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/move{?lastEventId}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/shoe/draw{?count}{&lastEventId}</a><a href="#matches-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/gamer/matches/{id}/finish{?lastEventId}</a></div></div><div class="list-group"><a data-toggle="" data-target="#indexing-menu" href="#indexing" class="list-group-item heading collapsed">Indexing</a><div id="indexing-menu"><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/index/{domain}/{indexName}</a><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-success"><i class="fa fa-plus"></i></span>POST /v1/index/{domain}/{indexName}/search?{q}&{sort}&{from}&{max}</a><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-info"><i class="fa fa-arrow-down"></i></span>GET /v1/index/{domain}/{indexName}/{id}</a><a href="#indexing-" style="border-top-left-radius: 0; border-top-right-radius: 0" class="list-group-item"><span class="badge alert-danger"><i class="fa fa-times"></i></span>DELETE /v1/index/{domain}/{indexName}/{id}</a></div></div><p style="text-align: center; word-wrap: break-word;"><a href="https://sandbox-api01.clanofthecloud.mobi/">https://sandbox-api01.clanofthecloud.mobi/</a></p></nav></div><div class="col-md-8"><div><header><div class="page-header"><h1 id="top">ClanOfthecloud APIs</h1></div></header><div class="description"><p><a href="http://www.clanofthecloud.com">ClanOfTheCloud</a> is a Mobile Gaming Backend as a Service (Baas) Company. You can create an account on our website,
and try us with your next social game! We’re scalable, multiplateform and we offer a full API.</p>
<h2>Server’s addresses, load balancing and failover</h2>
<p>The Sandbox servers are:</p>
<ul>
<li><p><a href="https://sandbox-api01.clanofthecloud.mobi/">https://sandbox-api01.clanofthecloud.mobi/</a></p></li>
<li><p><a href="https://sandbox-api02.clanofthecloud.mobi/">https://sandbox-api02.clanofthecloud.mobi/</a></p></li>
<li><p>to api16…</p></li>
</ul>
<p>And the production servers are:</p>
<ul>
<li><p><a href="https://prod-api01.clanofthecloud.mobi/">https://prod-api01.clanofthecloud.mobi/</a></p></li>
<li><p><a href="https://prod-api02.clanofthecloud.mobi/">https://prod-api02.clanofthecloud.mobi/</a></p></li>
<li><p>to api16</p></li>
</ul>
<p>Each of these servers are load balancers… But if one of them goes down, you can failover to another load balancer.</p>
<h2>Token-based App Authentication</h2>
<p>Once you’ve created an account, you can provision a Game in the FrontOffice application in either sandbox or production mode.
We’re using a classic APIKEY / APISECRET couple to authenticate all requests.</p>
<p>Every request should have two headers set with your game credentials :</p>
<table>
<thead>
<tr><th>Header</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>x-apikey</td><td>Your API key</td></tr>
<tr><td>x-apisecret</td><td>Your API secret</td></tr>
</tbody>
</table>
<h2>After login</h2>
<p>After login has been called, HTTP Basic Authentication will be used to authenticate every request.</p>
<p>The 3 authentication headers will look like :</p>
<table>
<thead>
<tr><th>Header</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>x-apikey</td><td>Your API key</td></tr>
<tr><td>x-apisecret</td><td>Your API secret</td></tr>
<tr><td>Authorization</td><td>Basic <code>gamer_id:gamer_secret</code> <em>(base64 encoded)</em></td></tr>
</tbody>
</table>
<p>Both <code>gamer_id</code> and <code>gamer_secret</code> are returned by <code>/v1/gamer/login</code>.</p>
<p><strong>Note:</strong> It is your responsibility to store these to help the user log in later (in RAW mode).</p>
</div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="login-routes">Login routes <a href="#login-routes"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>In addition to the App Authentication above, gamers are authenticated too.
Before playing, the gamer needs an identity… Login provides such an identity.</p>
<p>The login route is used to authenticate a gamer, and get basic profile information about him.</p>
<p><strong>Note:</strong> If an existing gamer can’t be found, a new one is created and returned.</p>
<p>Login for authenticated gamers will use one of these authentication methods :</p>
<ul>
<li><p>Facebook Connect: use the <code>ID</code> and the <code>oauth token</code> from Facebook</p></li>
<li><p>Google+ Sign-in: use the <code>ID</code> and the <code>oauth token</code> from Google+</p></li>
<li><p>anonymous: use the <code>gamer_id</code> and the <code>gamer_secret</code> from a previous login</p></li>
</ul>
<h4 id="login-routes-">Resources <a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/login</code></div></div><div class="panel-body"><h3>Body description</h3>
<p>A JSON object must be sent in the request body with the following structure.</p>
<table>
<thead>
<tr><th>Field</th><th>Description</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>network</td><td>string, required</td><td>can be one of ["anonymous", "facebook", “google”]</td></tr>
<tr><td>id</td><td>string, required</td><td>the user ID for this network</td></tr>
<tr><td>secret</td><td>string, required</td><td>the user secret/token for this network</td></tr>
</tbody>
</table>
<h3>Response description</h3>
<p><strong>Note:</strong> If a new gamer was created, the response code is <code>201</code>, <code>200</code> otherwise.</p>
<p>The response is a JSON object.</p>
<table>
<thead>
<tr><th>Field</th><th>Description</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>gamer_id</td><td>string</td><td>user_id used in basic authentication for gamer authenticated requests</td></tr>
<tr><td>gamer_secret</td><td>string</td><td>secret used in basic authentication for gamer authenticated requests</td></tr>
<tr><td>profile</td><td>json</td><td>gamer’s profile, including "name", "email", "nickname", …</td></tr>
<tr><td>vfs</td><td>json</td><td>list of key/value associated to the app/game</td></tr>
<tr><td>gamervfs</td><td>json</td><td>list of key/value associated to the gamer</td></tr>
<tr><td>matches</td><td>json</td><td>array of match currently in open state of the gamer</td></tr>
</tbody>
</table>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c153bc5c245b1345579aaf68084e777f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c153bc5c245b1345579aaf68084e777f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">network</span>": <span class="hljs-value"><span class="hljs-string">"facebook"</span></span>,
"<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"1000001010"</span></span>,
"<span class="hljs-attribute">secret</span>" : <span class="hljs-value"><span class="hljs-string">"CAAIoRjU6xxYBAAy5Ymu...7XAehrcVQBUOG7oBVNatEUZD"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#18998983c34f079d0b58d37a2488a144" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="18998983c34f079d0b58d37a2488a144" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
"<span class="hljs-attribute">gamer_secret</span>" : <span class="hljs-value"><span class="hljs-string">"dsfg5dgfs654ezrt321ds31gdfs654ert"</span></span>,
"<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}</span>,
"<span class="hljs-attribute">vfs</span>" : <span class="hljs-value">{}</span>,
"<span class="hljs-attribute">gamervfs</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c153bc5c245b1345579aaf68084e777f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c153bc5c245b1345579aaf68084e777f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">INVALID KEY</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">INVALID SECRET</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">network</span>": <span class="hljs-value"><span class="hljs-string">"facebook"</span></span>,
"<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"1000001010"</span></span>,
"<span class="hljs-attribute">secret</span>" : <span class="hljs-value"><span class="hljs-string">"CAAIoRjU6xxYBAAy5Ymu...7XAehrcVQBUOG7oBVNatEUZD"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>401</code></strong><a data-toggle="collapse" data-target="#fa105f0a99f3e6afa558e11ddfbfc9ca" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="fa105f0a99f3e6afa558e11ddfbfc9ca" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid App Credentials"</span>
</span>}
</code></pre></li></ul></section><h4 id="login-routes-">Resources <a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/login/anonymous</code></div></div><div class="panel-body"><p>The login/anonymous route is used to create a new gamer without any informations.</p>
<h3>Response description</h3>
<p><strong>Note:</strong> same response as for login route.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9efc23a62d9530df54bfad107314e7af" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9efc23a62d9530df54bfad107314e7af" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#18998983c34f079d0b58d37a2488a144" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="18998983c34f079d0b58d37a2488a144" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
"<span class="hljs-attribute">gamer_secret</span>" : <span class="hljs-value"><span class="hljs-string">"dsfg5dgfs654ezrt321ds31gdfs654ert"</span></span>,
"<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}</span>,
"<span class="hljs-attribute">vfs</span>" : <span class="hljs-value">{}</span>,
"<span class="hljs-attribute">gamervfs</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9efc23a62d9530df54bfad107314e7af" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9efc23a62d9530df54bfad107314e7af" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">INVALID KEY</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">INVALID SECRET</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>401</code></strong><a data-toggle="collapse" data-target="#fa105f0a99f3e6afa558e11ddfbfc9ca" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="fa105f0a99f3e6afa558e11ddfbfc9ca" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid App Credentials"</span>
</span>}
</code></pre></li></ul></section><h4 id="login-routes-">Resources <a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/logout</code></div></div><div class="panel-body"><p>Log a gamer out</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d348da54a4570b81b9f762966acf2db0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d348da54a4570b81b9f762966acf2db0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#72eea5f70490a6e7d8d9530e955b4604" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="72eea5f70490a6e7d8d9530e955b4604" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d348da54a4570b81b9f762966acf2db0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d348da54a4570b81b9f762966acf2db0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic INVALID GAMER IDENTITY</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>401</code></strong><a data-toggle="collapse" data-target="#e6e8f0cbb04b397113d9788f1754c1b2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="e6e8f0cbb04b397113d9788f1754c1b2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid Gamer Credentials"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d348da54a4570b81b9f762966acf2db0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d348da54a4570b81b9f762966acf2db0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">INVALID API KEY</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">INVALID API SECRET</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>401</code></strong><a data-toggle="collapse" data-target="#fa105f0a99f3e6afa558e11ddfbfc9ca" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="fa105f0a99f3e6afa558e11ddfbfc9ca" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Invalid App Credentials"</span>
</span>}
</code></pre></li></ul></section><h4 id="login-routes-">Resources <a href="#login-routes-"><i class="fa fa-link"></i></a></h4><section id="login-routes--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#login-routes--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/unlink</code></div></div><div class="panel-body"><p>Used to unlink a user account from Facebook or Google+ credentials.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#de8bf4613d167fb10d834cf769b85099" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="de8bf4613d167fb10d834cf769b85099" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">network</span>": <span class="hljs-value"><span class="hljs-string">"facebook"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#72eea5f70490a6e7d8d9530e955b4604" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="72eea5f70490a6e7d8d9530e955b4604" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="gamer-profile">Gamer profile <a href="#gamer-profile"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="gamer-profile-profile">Profile <a href="#gamer-profile-profile"><i class="fa fa-link"></i></a></h4><p>Profile are data related to the user (globally)</p>
<section id="gamer-profile-profile-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set Profile</span></div><div style="float:left"><a href="#gamer-profile-profile-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/profile</code></div></div><div class="panel-body"><p>Fields can be added one be one, data are merged.
The following fields can be set :
["displayName", "lang", "firstName", "lastName", "addr1", "addr2", "addr3", “avatar”]</p>
<p><strong>note</strong> : avatar must be an URL, lang is the ISO-639-1 country code (<a href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes</a>)</p>
<p>i.e when executing POST /v1/gamer/profile {"displayName": "Wonder Mike"}
if the current profile is
“profile” : {
“email” : “<a href="mailto:michael@cotc.com">michael@cotc.com</a>”
}
then the result will be
“profile” : {
"displayName": "Wonder Mike",
“email” : “<a href="mailto:michael@cotc.com">michael@cotc.com</a>”
}</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#2ffadfedba96d7fc69ab286a53c55114" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="2ffadfedba96d7fc69ab286a53c55114" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Wonder Mike"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#4d76352997131adb3dbef5002e77a182" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4d76352997131adb3dbef5002e77a182" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Wonder Mike"</span></span>,
"<span class="hljs-attribute">email</span>" : <span class="hljs-value"><span class="hljs-string">"michael@cotc.com"</span>
</span>}</span>,
"<span class="hljs-attribute">updated</span>" : <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><section id="gamer-profile-profile-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get profile</span></div><div style="float:left"><a href="#gamer-profile-profile-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/profile</code></div></div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#2d1fbf9e4d1b6ae1736338db5ac80cd4" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="2d1fbf9e4d1b6ae1736338db5ac80cd4" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#7c9c76fc1601e0e1af53f3d760ceed1b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="7c9c76fc1601e0e1af53f3d760ceed1b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">properties</span>" : <span class="hljs-value">{
"<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
"<span class="hljs-attribute">Level</span>" : <span class="hljs-value"><span class="hljs-number">20</span>
<span class="hljs-string">"Expert"</span> : <span class="hljs-literal">false</span>
</span>}
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="gamer-querying">Gamer Querying <a href="#gamer-querying"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="gamer-querying-find-users">Find Users <a href="#gamer-querying-find-users"><i class="fa fa-link"></i></a></h4><section id="gamer-querying-find-users-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">search</span></div><div style="float:left"><a href="#gamer-querying-find-users-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer{?q}{&limit}{&skip}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>q</dt><dd><code>string</code> <span class="required">(required)</span> <p>the value to match with</p>
</dd><dt>limit</dt><dd><code>number</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>10</span></span> <p>number of desired responses</p>
</dd><dt>skip</dt><dd><code>number</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>0</span></span> <p>skip the <code>skip</code> firsts responses</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#edb70febdf8c6f143638ca9c58e5f3f0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="edb70febdf8c6f143638ca9c58e5f3f0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#61fa603dc88cb9192d843e1ab593387a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="61fa603dc88cb9192d843e1ab593387a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">count</span>" : <span class="hljs-value"><span class="hljs-number">10</span></span>,
"<span class="hljs-attribute">result</span>" : <span class="hljs-value">[
{
"<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
"<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}
</span>}
]
</span>}
</code></pre></li></ul></section><h4 id="gamer-querying-validate-gamer_id">Validate gamer_id <a href="#gamer-querying-validate-gamer_id"><i class="fa fa-link"></i></a></h4><section id="gamer-querying-validate-gamer_id-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">check</span></div><div style="float:left"><a href="#gamer-querying-validate-gamer_id-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/gamer_id/{id}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>id</dt><dd><code>string</code> <span class="required">(required)</span> <p>the id to check</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#b61dbdc0b7c96a1863f865f130bedfaf" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b61dbdc0b7c96a1863f865f130bedfaf" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#00aa64f8b54fbcb8b5bae416471976ae" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="00aa64f8b54fbcb8b5bae416471976ae" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
"<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li></ul></section><h4 id="gamer-querying-find-a-"network"-gamer_id">Find a "Network" gamer_id <a href="#gamer-querying-find-a-"network"-gamer_id"><i class="fa fa-link"></i></a></h4><section id="gamer-querying-find-a-"network"-gamer_id-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">check</span></div><div style="float:left"><a href="#gamer-querying-find-a-"network"-gamer_id-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/{network}/{id}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>network</dt><dd><code>string</code> <span class="required">(required)</span> <p>the network on which to search "facebook", “google”</p>
</dd><dt>id</dt><dd><code>string</code> <span class="required">(required)</span> <p>the id in the network referential to check</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#b3ac059729802b80c55201c2d8fc0250" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b3ac059729802b80c55201c2d8fc0250" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#ffa5600da023c52a77c2a8f6e16be903" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ffa5600da023c52a77c2a8f6e16be903" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"dfg54g2dfg54sqdf32wfds54fqdf"</span></span>,
"<span class="hljs-attribute">profile</span>" : <span class="hljs-value">{}
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="key-value-store">Key-Value Store <a href="#key-value-store"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="key-value-store-gamer-vfs">Gamer VFS <a href="#key-value-store-gamer-vfs"><i class="fa fa-link"></i></a></h4><p>Gamer VFS is a key-value store you can use to associate data with a user.</p>
<p>Use it to store state, preferences… any data your user would like to share among devices.</p>
<h3>Domains</h3>
<p>Because you might want to share Gamer VFS data between games you (or other companies) wrote,
you can define so called “domains” which protect your data and let use share it securely.</p>
<p>A Domain is a namespace, but you must know the Domain-Key for this domain to have access to it. So to share
data stored in a domain, you just have to share the Domain-Key.</p>
<p>Your game has its own private Domain (see in FrontOffice dashboard) which you probably don’t want to share
but you can create other domains to share data between apps, or even between app-developers.</p>
<section id="key-value-store-gamer-vfs-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get gamer's data</span></div><div style="float:left"><a href="#key-value-store-gamer-vfs-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/vfs/{domain}/{key}{?binary}</code></div></div><div class="panel-body"><h6>Possible values for error 404</h6>
<ul>
<li><p><code>Key not found</code> … the specified key doesn’t exist</p></li>
<li><p><code>Domain not found</code> … the specified domain doesn’t exist</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain where to retreive the key/value</p>
</dd><dt>key</dt><dd><code>string</code> <span>(optional)</span> <p>the desired key, if omited all keys and values of the domains will be returned</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#0cafeecd14c9e73a87b24c93f6b471e2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0cafeecd14c9e73a87b24c93f6b471e2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#a8326a4f5d4918ed7969acf86770655c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a8326a4f5d4918ed7969acf86770655c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">key</span>" : <span class="hljs-value"><span class="hljs-string">"data which could be a json"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#0cafeecd14c9e73a87b24c93f6b471e2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0cafeecd14c9e73a87b24c93f6b471e2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#bc0e4978ccac71b62d79cb8eafb14f02" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="bc0e4978ccac71b62d79cb8eafb14f02" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">key1</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key1"</span></span>,
"<span class="hljs-attribute">key2</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key2"</span></span>,
"<span class="hljs-attribute">key3</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key3"</span></span>,
"<span class="hljs-attribute">key4</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key4"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>401</code></strong><a data-toggle="collapse" data-target="#0b6b0b824c77ef3bab17c110f191e48f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0b6b0b824c77ef3bab17c110f191e48f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the gamer token is no longer available, call login again!"</span></span>,
"<span class="hljs-attribute">data</span>" : <span class="hljs-value"><span class="hljs-string">"optional error data"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>404</code></strong><a data-toggle="collapse" data-target="#c96a2c9ffc1af0416fe85b42cbfc2460" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c96a2c9ffc1af0416fe85b42cbfc2460" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Key not found"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the specified key is not found"</span>
<span class="hljs-string">"data"</span> : <span class="hljs-string">"optional error data"</span>
</span>}
</code></pre></li></ul></section><section id="key-value-store-gamer-vfs-put" class="panel panel-warning"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set gamer's data</span></div><div style="float:left"><a href="#key-value-store-gamer-vfs-put" class="btn btn-xs btn-warning">PUT</a></div><div style="overflow:hidden"><code>/v1/gamer/vfs/{domain}/{key}{?binary}</code></div></div><div class="panel-body"><p>You can store data easily. Simply send the data to be stored, as a JSON object, in the body of the request. Note that simple strings are not allowed. Arrays and objects are.</p>
<p><strong>if the key doesn’t exist, it’s dynamically created</strong></p>
<h4>Optional Binary storage</h4>
<p>You can opt to store your data in Amazon S3 storage. It’s the recommended option for values weighting more than 100ko.
With the <code>binary</code> option, the API will reply with two URLs: one to upload the file to, and the other with the URL to access the value on the internet.</p>
<p>So uploading a binary value becomes a two steps process:</p>
<ul>
<li><p>first call <code>PUT</code> to pre-authorize storage,</p></li>
<li><p>then upload the contents directly to Amazon S3’s preauthorized URL.</p></li>
<li><p>calling <code>GET</code> will then return the URL of the value on Amazon S3.</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain where to store the key/value</p>
</dd><dt>key</dt><dd><code>string</code> <span class="required">(required)</span> <p>the desired key</p>
</dd><dt>binary</dt><dd><code>string</code> <span>(optional)</span> <p>use S3 storage</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#98faf9004ab287eb4a1e71bcaad696ed" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="98faf9004ab287eb4a1e71bcaad696ed" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{"<span class="hljs-attribute">whatever</span>": <span class="hljs-value"><span class="hljs-string">"your JSON value"</span></span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#b35d65ff7a0a2ead9e2d77af2887c78e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b35d65ff7a0a2ead9e2d77af2887c78e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{"<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>401</code></strong><a data-toggle="collapse" data-target="#ae03ed9797146dfc86941a9dbdabaac5" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ae03ed9797146dfc86941a9dbdabaac5" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the gamer token is no longer available, call signin!"</span></span>,
"<span class="hljs-attribute">data</span>" : <span class="hljs-value"><span class="hljs-string">"optional error data"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#bad0f7fb38d8d03b22dc7f58906ab6a9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="bad0f7fb38d8d03b22dc7f58906ab6a9" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>parameters
binary : true</li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#5e428ed278a1fa2f5a56454069a87924" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5e428ed278a1fa2f5a56454069a87924" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">getURL</span>": <span class="hljs-value">url</span>,
"<span class="hljs-attribute">putURL</span>": <span class="hljs-value">url
</span>}
</code></pre></li></ul></section><section id="key-value-store-gamer-vfs-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Remove gamer's data</span></div><div style="float:left"><a href="#key-value-store-gamer-vfs-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v1/gamer/vfs/{domain}/{key}{?binary}</code></div></div><div class="panel-body"><pre><code>NOTE : we can't yet distinguish a missing key from an incorrect domain...
</code></pre>
<h6>Possible reasons for error 404</h6>
<ul>
<li><p><code>Key not found</code> … the specified key doesn’t exist</p></li>
<li><p><code>Domain not found</code> … the specified domain doesn’t exist</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain from where to get the key/value</p>
</dd><dt>key</dt><dd><code>string</code> <span>(optional)</span> <p>the key to be removed (all if not specified)</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#e535976b79cac5cd68f4cef75e127389" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="e535976b79cac5cd68f4cef75e127389" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#d95dbb40bfaa4b059f250bbb4cbf2f85" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d95dbb40bfaa4b059f250bbb4cbf2f85" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>1
</code></pre></li><li class="list-group-item"><strong>Response <code>401</code></strong><a data-toggle="collapse" data-target="#8938cfba6f8d6095e8b543fee300bc88" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8938cfba6f8d6095e8b543fee300bc88" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Unauthorized"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the gamer token is no longer available, call signin!"</span></span>,
"<span class="hljs-attribute">data</span>" : <span class="hljs-value"><span class="hljs-string">"optional error data"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>404</code></strong><a data-toggle="collapse" data-target="#039ccd417f399da3f4ce1dd6bf4aed8b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="039ccd417f399da3f4ce1dd6bf4aed8b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Key not found"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the specified key is not found"</span>
<span class="hljs-string">"data"</span> : <span class="hljs-string">"optional error data"</span>
</span>}
</code></pre></li></ul></section><h4 id="key-value-store-game-vfs">Game VFS <a href="#key-value-store-game-vfs"><i class="fa fa-link"></i></a></h4><p>Game VFS is a key-value store you can use to associate data with a game.</p>
<p>Use it to store level, booard… any data your game would like to share among users.</p>
<section id="key-value-store-game-vfs-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get game's data</span></div><div style="float:left"><a href="#key-value-store-game-vfs-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/vfs/{domain}/{key}</code></div></div><div class="panel-body"><h6>Possible values for error 404</h6>
<ul>
<li><p><code>Key not found</code> … the specified key doesn’t exist</p></li>
<li><p><code>Domain not found</code> … the specified domain doesn’t exist</p></li>
</ul>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain where to retreive the key/value</p>
</dd><dt>key</dt><dd><code>string</code> <span>(optional)</span> <p>the desired key, if omited all keys and values of the domains will be returned</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#f3ec42df568caef3bb0440230f43bf6a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f3ec42df568caef3bb0440230f43bf6a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#c740fdabeac66411232a3c2c404eccc1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c740fdabeac66411232a3c2c404eccc1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">key</span>" : <span class="hljs-value"><span class="hljs-string">"data which could be a json"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#f3ec42df568caef3bb0440230f43bf6a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f3ec42df568caef3bb0440230f43bf6a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#60dc26c294158b0bf03b944986a62a87" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="60dc26c294158b0bf03b944986a62a87" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">key1</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key1"</span></span>,
"<span class="hljs-attribute">key2</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key2"</span></span>,
"<span class="hljs-attribute">key3</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key3"</span></span>,
"<span class="hljs-attribute">key4</span>" : <span class="hljs-value"><span class="hljs-string">"any json value, object, array for key4"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>404</code></strong><a data-toggle="collapse" data-target="#1b829b95cc048e4ec1b1e0c22a46c63f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1b829b95cc048e4ec1b1e0c22a46c63f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"Key not found"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"the specified key is not found"</span>
<span class="hljs-string">"data"</span> : <span class="hljs-string">"optional error data"</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="transactions">Transactions <a href="#transactions"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Transactions are used to keep track of any inventory or portfolio or wallet… It’s basic functionality
can be used in various contexts.</p>
<p>In the case of an inventory, transactions will add or remove units from it.
When used as a portfolio (for virtual currency), transactions add or remove units too.
And feel free to invent new uses!</p>
<h2>How domains work with transactions</h2>
<p>Transactions/portfolios/inventories can be shared between games with domains. The <em>private</em> domain is private to the game
but you can create other domains shared between games.</p>
<p>This feature can be used to share a virtual currency between all your games, or to team up with other game developers
to implement cross-marketing or any incentive…</p>
<h4 id="transactions-">Resources <a href="#transactions-"><i class="fa fa-link"></i></a></h4><section id="transactions--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#transactions--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.2/gamer/tx/{domain}</code></div></div><div class="panel-body"><p>A transaction is a Hash where the key is the unit, and the value is a positive (credit) or negative (debit) amount.
So a single transaction can both credit and debit different units.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain used in the transaction</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#1dfc1863252bca7c70552da5925fc5d2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1dfc1863252bca7c70552da5925fc5d2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code><span class="hljs-collection">{
transaction: <span class="hljs-collection">{
<span class="hljs-string">"Gold"</span>: <span class="hljs-number">100</span>,
<span class="hljs-string">"Silver"</span>: <span class="hljs-number">-2.5</span>,
<span class="hljs-string">"Arrows"</span>: <span class="hljs-number">20</span>
}</span>,
description: <span class="hljs-string">"This is an example transaction"</span>
}</span>
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#bde53a5f42ac064282d799b1e5020780" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="bde53a5f42ac064282d799b1e5020780" class="list-group-item panel-collapse collapse"><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">balance</span>": <span class="hljs-value">{
"<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">130</span></span>,
"<span class="hljs-attribute">Silver</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,
"<span class="hljs-attribute">Arrows</span>": <span class="hljs-value"><span class="hljs-number">20</span>
</span>}</span>,
"<span class="hljs-attribute">achievements</span>": <span class="hljs-value">{
"<span class="hljs-attribute">achievementName</span>": <span class="hljs-value">{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"limit"</span></span>,
"<span class="hljs-attribute">config</span>": <span class="hljs-value">{
"<span class="hljs-attribute">maxValue</span>": <span class="hljs-value"><span class="hljs-number">1000</span></span>,
"<span class="hljs-attribute">unit</span>": <span class="hljs-value"><span class="hljs-string">"score"</span>
</span>}</span>,
"<span class="hljs-attribute">gameData</span>": <span class="hljs-value">{
"<span class="hljs-attribute">hidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}</span>,
"<span class="hljs-attribute">progress</span>": <span class="hljs-value"><span class="hljs-number">1</span>
</span>}
</span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#baf08e9aaeca9c7b27340b65c08dffb3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="baf08e9aaeca9c7b27340b65c08dffb3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">transaction</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value">-<span class="hljs-number">1000000</span></span>}</span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Excessive transaction"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>549</code></strong></li></ul></section><h4 id="transactions-">Resources <a href="#transactions-"><i class="fa fa-link"></i></a></h4><section id="transactions--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#transactions--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.4/gamer/tx/{domain}{?unit}{&skip}{&limit}</code></div></div><div class="panel-body"><p>Use this API to list the transactions of the current gamer. You can specify an optional
<code>?unit=xxx</code> parameter where <code>xxx</code> is the unit (Silver, Gold or Arrows in our example). If
<code>unit</code> is specified, the result will only contain transactions about this unit.
Use <code>?skip</code> and <code>?limit</code> to page through transactions.</p>
<p>Note: the <code>count</code> returned is the total number of transactions (useful whith paging)</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain used in the transaction</p>
</dd><dt>unit</dt><dd><code>string</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>Gold</span></span><p>To restrict the history to a single Unit</p>
</dd><dt>skip</dt><dd><code>number</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>30</span></span><p>The number of rows to skip</p>
</dd><dt>limit</dt><dd><code>number</code> <span>(optional)</span> <span class="text-muted example"><strong>Example: </strong><span>10</span></span><p>The number of rows to return</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#97868a24957fa4ae454cd0ba52f3be42" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="97868a24957fa4ae454cd0ba52f3be42" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#0ccbb7bcfb361adc0fe28919efa6b2de" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0ccbb7bcfb361adc0fe28919efa6b2de" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json; charset=utf-8</span><br></code></pre><h5>Body</h5><pre><code>{ "<span class="hljs-attribute">history</span>" : <span class="hljs-value">[
{ "<span class="hljs-attribute">ts</span>": <span class="hljs-value"><span class="hljs-string">"2014-08-27T16:44:17.796Z"</span></span>, "<span class="hljs-attribute">tx</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">100</span> </span>}</span>, "<span class="hljs-attribute">desc</span>": <span class="hljs-value"><span class="hljs-string">"jsclient test"</span> </span>},
{ "<span class="hljs-attribute">ts</span>": <span class="hljs-value"><span class="hljs-string">"2014-08-27T16:02:22.645Z"</span></span>, "<span class="hljs-attribute">tx</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value">-<span class="hljs-number">100</span></span>, "<span class="hljs-attribute">Silver</span>": <span class="hljs-value"><span class="hljs-number">1</span> </span>}</span>, "<span class="hljs-attribute">desc</span>": <span class="hljs-value"><span class="hljs-string">"jsclient test"</span> </span>},
{ "<span class="hljs-attribute">ts</span>": <span class="hljs-value"><span class="hljs-string">"2014-08-27T16:02:22.371Z"</span></span>, "<span class="hljs-attribute">tx</span>": <span class="hljs-value">{ "<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">100</span> </span>}</span>, "<span class="hljs-attribute">desc</span>": <span class="hljs-value"><span class="hljs-string">"jsclient test"</span> </span>}
]</span>,
"<span class="hljs-attribute">count</span>": <span class="hljs-value"><span class="hljs-number">3</span>
</span>}
</code></pre></li></ul></section><h4 id="transactions-">Resources <a href="#transactions-"><i class="fa fa-link"></i></a></h4><section id="transactions--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#transactions--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/tx/{domain}/balance</code></div></div><div class="panel-body"><p>Use this API to get the current balance. It will return a Hash of each unit and the amount held by the gamer.
The balance is also returned each time you create a new transaction</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain used in the transaction</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#97868a24957fa4ae454cd0ba52f3be42" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="97868a24957fa4ae454cd0ba52f3be42" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#a9ad6b04ed72051501060304be6c4c40" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a9ad6b04ed72051501060304be6c4c40" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">Gold</span>": <span class="hljs-value"><span class="hljs-number">130</span></span>,
"<span class="hljs-attribute">Silver</span>": <span class="hljs-value"><span class="hljs-number">1.5</span></span>,
"<span class="hljs-attribute">Arrows</span>": <span class="hljs-value"><span class="hljs-number">20</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="gamer-properties">Gamer Properties <a href="#gamer-properties"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="gamer-properties-properties">Properties <a href="#gamer-properties-properties"><i class="fa fa-link"></i></a></h4><section id="gamer-properties-properties-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set properties</span></div><div style="float:left"><a href="#gamer-properties-properties-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}</code></div></div><div class="panel-body"><p>Properties are basic type (number, stringn boolean) json</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#68ed9969e407416e85d456d48615bceb" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="68ed9969e407416e85d456d48615bceb" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
"<span class="hljs-attribute">Level</span>": <span class="hljs-value"><span class="hljs-number">20</span>
<span class="hljs-string">"Expert"</span>: <span class="hljs-literal">false</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#4de2a43c688732a5198bdea2d6e88fcb" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4de2a43c688732a5198bdea2d6e88fcb" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">properties</span>" : <span class="hljs-value">{
"<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
"<span class="hljs-attribute">Level</span>": <span class="hljs-value"><span class="hljs-number">20</span>
<span class="hljs-string">"Expert"</span>: <span class="hljs-literal">false</span>
</span>}</span>,
"<span class="hljs-attribute">updated</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><section id="gamer-properties-properties-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get properties</span></div><div style="float:left"><a href="#gamer-properties-properties-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#053e775954bce88a174e1cf1ecc3f328" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="053e775954bce88a174e1cf1ecc3f328" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#c58aa24e06d0d7e6b2a5c449cb1e42fb" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c58aa24e06d0d7e6b2a5c449cb1e42fb" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">properties</span>" : <span class="hljs-value">{
"<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
"<span class="hljs-attribute">Level</span>" : <span class="hljs-value"><span class="hljs-number">20</span>
<span class="hljs-string">"Expert"</span> : <span class="hljs-literal">false</span>
</span>}
</span>}
</code></pre></li></ul></section><section id="gamer-properties-properties-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">delete properties</span></div><div style="float:left"><a href="#gamer-properties-properties-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#525c0f90496d93dfd12f8e4903ff5a7c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="525c0f90496d93dfd12f8e4903ff5a7c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#5db9c1248a197f355dd39a6364d127a2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5db9c1248a197f355dd39a6364d127a2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><h4 id="gamer-properties-property">Property <a href="#gamer-properties-property"><i class="fa fa-link"></i></a></h4><p>Properties are used to allow match making…
They are related to a game.</p>
<section id="gamer-properties-property-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set property</span></div><div style="float:left"><a href="#gamer-properties-property-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}/{key}</code></div></div><div class="panel-body"><p>Properties are basic type (number, string, boolean) or array of basic type</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain</p>
</dd><dt>key</dt><dd><code>string</code> <span class="required">(required)</span> <p>name of the property</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c4554e4b2b70c316c2c4fa328663f79f" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c4554e4b2b70c316c2c4fa328663f79f" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">value</span>": <span class="hljs-value"><span class="hljs-string">"river"</span></span>,
}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#b45edb6c26e4d11b50937e1562d651f1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="b45edb6c26e4d11b50937e1562d651f1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">done</span>" : <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section><section id="gamer-properties-property-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get property</span></div><div style="float:left"><a href="#gamer-properties-property-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}/{key}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain</p>
</dd><dt>key</dt><dd><code>string</code> <span class="required">(required)</span> <p>name of the property</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c1cb412ef48be16db18b51259171e0a0" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c1cb412ef48be16db18b51259171e0a0" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#8bd459444db5a44de97033e2f3ab3864" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8bd459444db5a44de97033e2f3ab3864" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">Board</span>": <span class="hljs-value"><span class="hljs-string">"river"</span>
</span>}
</code></pre></li></ul></section><section id="gamer-properties-property-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">delete property</span></div><div style="float:left"><a href="#gamer-properties-property-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v2.6/gamer/properties/{domain}/{key}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain</p>
</dd><dt>key</dt><dd><code>string</code> <span class="required">(required)</span> <p>name of the property</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#5ccd80b9bada13d21b273b188d3161a9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5ccd80b9bada13d21b273b188d3161a9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#50dcd938d608f878f36cdca12492e20e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="50dcd938d608f878f36cdca12492e20e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="social-features">Social features <a href="#social-features"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h2>Friends</h2>
<h4 id="social-features-">Resources <a href="#social-features-"><i class="fa fa-link"></i></a></h4><section id="social-features--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#social-features--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/friends/{domain}/{?status}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain handling relations</p>
</dd><dt>status</dt><dd><code>string</code> <span>(optional)</span> <p>“blacklist” to retrieve the blacklisted gamer’s</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#328ced4ebada0cc0ef525bac8a847639" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="328ced4ebada0cc0ef525bac8a847639" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#e2a21a3104cad68968e258d0da108231" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="e2a21a3104cad68968e258d0da108231" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code><span class="hljs-collection">{ <span class="hljs-string">"friends|blacklisted"</span> : <span class="hljs-collection">[
<span class="hljs-collection">{ <span class="hljs-string">"<gamer_id_1>"</span> : <span class="hljs-collection">{ displayName : <span class="hljs-string">"gamer1"</span>, lang : <span class="hljs-string">"en"</span> }</span> }</span>,
<span class="hljs-collection">{<span class="hljs-string">"<gamer_id_2>"</span> : <span class="hljs-collection">{ displayName : <span class="hljs-string">"gamer2"</span>, lang : <span class="hljs-string">"fr"</span> }</span> }</span>
]</span> }</span>
</code></pre></li></ul></section><h4 id="social-features-">Resources <a href="#social-features-"><i class="fa fa-link"></i></a></h4><section id="social-features--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#social-features--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/friends/{domain}/{friendid}?{status}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain handling relations</p>
</dd><dt>friendid</dt><dd><code>string</code> <span class="required">(required)</span> <p>a gamer id</p>
</dd><dt>status</dt><dd><code>string</code> <span class="required">(required)</span> <p>must be one of [<code>add</code> | <code>forget</code> | <code>blacklist</code>]</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#3f14c9c6a657ef2dd2aa7135fe58fb9c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="3f14c9c6a657ef2dd2aa7135fe58fb9c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#d8089033fc8b4f193f2e52c52a6167a1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d8089033fc8b4f193f2e52c52a6167a1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute"><gamer_id></span>" : <span class="hljs-value"><span class="hljs-string">"<status>"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>404</code></strong><a data-toggle="collapse" data-target="#c6384bae7985f0546b4733ca2903b431" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c6384bae7985f0546b4733ca2903b431" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"GamerIdNotFound"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#3f14c9c6a657ef2dd2aa7135fe58fb9c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="3f14c9c6a657ef2dd2aa7135fe58fb9c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#d8089033fc8b4f193f2e52c52a6167a1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d8089033fc8b4f193f2e52c52a6167a1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute"><gamer_id></span>" : <span class="hljs-value"><span class="hljs-string">"<status>"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>404</code></strong><a data-toggle="collapse" data-target="#32a1cb00666aa67fcaae64f1efe5581e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="32a1cb00666aa67fcaae64f1efe5581e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"StatusNotFound"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>501</code></strong><a data-toggle="collapse" data-target="#1033efe221638046ec4e0f9928a9a431" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1033efe221638046ec4e0f9928a9a431" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"StatusNotSupported"</span>
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="sponsoring">Sponsoring <a href="#sponsoring"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h4 id="sponsoring-god-father">God father <a href="#sponsoring-god-father"><i class="fa fa-link"></i></a></h4><section id="sponsoring-god-father-put" class="panel panel-warning"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get sponsoring code</span></div><div style="float:left"><a href="#sponsoring-god-father-put" class="btn btn-xs btn-warning">PUT</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godfather/{domain}</code></div></div><div class="panel-body"><p>Obtains a code for sponsoring. The code is different for each game</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#4530c5da1e1d066060bbbff8a011c9ef" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="4530c5da1e1d066060bbbff8a011c9ef" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#6960d67b7875bd0accc0b0c2a1dceb4a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6960d67b7875bd0accc0b0c2a1dceb4a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{ "<span class="hljs-attribute">godfathercode</span>" : <span class="hljs-value"><span class="hljs-string">"wSde2dF"</span> </span>}
</code></pre></li></ul></section><section id="sponsoring-god-father-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set godfather</span></div><div style="float:left"><a href="#sponsoring-god-father-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godfather/{domain}</code></div></div><div class="panel-body"><p>Set the godfather of the current user and give a reward to the godfather.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#00252814d2b44673174d2394437a54a5" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="00252814d2b44673174d2394437a54a5" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code><span class="hljs-collection">{
<span class="hljs-string">"godfather"</span>: <span class="hljs-string">"wSde2dF"</span>,
<span class="hljs-string">"maturity"</span> : <span class="hljs-number">100</span>,
<span class="hljs-string">"reward"</span> : <span class="hljs-collection">{
transaction : <span class="hljs-collection">{ <span class="hljs-string">"gold"</span> : <span class="hljs-number">10</span>}</span>,
description : <span class="hljs-string">"this is a reward tx"</span>,
domain : <span class="hljs-string">"private"</span>
}</span>
}</span>
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#3ad00d229a4f2f09d313811dd8c7fbaa" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="3ad00d229a4f2f09d313811dd8c7fbaa" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
<span class="hljs-string">"done"</span> : <span class="hljs-number">1</span>,
<span class="hljs-string">"balance"</span> : {},
<span class="hljs-string">"achievements : {}</span>
}
</code></pre></li><li class="list-group-item"><strong>Response <code>438</code></strong><a data-toggle="collapse" data-target="#419612ab883c4851fd61b16d439ca880" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="419612ab883c4851fd61b16d439ca880" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"alreadyGodchild"</span>
</span>}
</code></pre></li></ul></section><section id="sponsoring-god-father-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Get godfather</span></div><div style="float:left"><a href="#sponsoring-god-father-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godfather/{domain}</code></div></div><div class="panel-body"><p>Retreive the godfather of the current user.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#c8bc79dfe022a0a3a1d2ce6ffcc3876c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c8bc79dfe022a0a3a1d2ce6ffcc3876c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#f5c7685d9b0578e4ccbc940a9fd7bdf7" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="f5c7685d9b0578e4ccbc940a9fd7bdf7" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute"><gamer_id></span>" : <span class="hljs-value"><span class="hljs-string">"..."</span>
</span>}
</code></pre></li></ul></section><h4 id="sponsoring-">Resources <a href="#sponsoring-"><i class="fa fa-link"></i></a></h4><section id="sponsoring--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#sponsoring--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/godchidren/{domain}</code></div></div><div class="panel-body"><p>Get every godchildren for the current user.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>the domain handling relations</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#49eb77d6113d1287d970af2247c9d831" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="49eb77d6113d1287d970af2247c9d831" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#a24bbc58b6685b5232e4dc93134fd791" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a24bbc58b6685b5232e4dc93134fd791" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">godchildren</span>" : <span class="hljs-value">[ { "<span class="hljs-attribute">gamer_id</span>" : <span class="hljs-value"><span class="hljs-string">"..."</span></span>}]
</span>}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="scores-and-leaderboards">Scores and Leaderboards <a href="#scores-and-leaderboards"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><h2>Scores</h2>
<h4 id="scores-and-leaderboards-">Resources <a href="#scores-and-leaderboards-"><i class="fa fa-link"></i></a></h4><section id="scores-and-leaderboards--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#scores-and-leaderboards--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&force}</code></div></div><div class="panel-body"><p>This is not necessarily the highest score, but only the highest is stored.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain used for this leaderboard</p>
</dd><dt>leaderboard</dt><dd><code>string</code> <span class="required">(required)</span> <p>the board where the gamer score in</p>
</dd><dt>order</dt><dd><code>string</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>hightolow</span></span> <p>the order to sort the board <code>hightolow</code> or <code>lowtohigh</code></p>
</dd><dt>force</dt><dd><code>string</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>false</span></span> <p>if true, override any previous score</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#df7394d3b498bdff2cad1a3b0fdbb555" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="df7394d3b498bdff2cad1a3b0fdbb555" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">score</span>": <span class="hljs-value"><span class="hljs-number">100</span></span>,
"<span class="hljs-attribute">info</span>" : <span class="hljs-value"><span class="hljs-string">"whatever json"</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#5c2868a3b3079d16b89c6cf5e17415f7" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="5c2868a3b3079d16b89c6cf5e17415f7" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">rank</span>" : <span class="hljs-value"><span class="hljs-number">1</span>
</span>}
</code></pre></li></ul></section><h4 id="scores-and-leaderboards-">Resources <a href="#scores-and-leaderboards-"><i class="fa fa-link"></i></a></h4><section id="scores-and-leaderboards--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#scores-and-leaderboards--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/scores/{domain}/{leaderboard}{?order}{&type}{&page}{&count}</code></div></div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain used for this leaderboard</p>
</dd><dt>leaderboard</dt><dd><code>string</code> <span class="required">(required)</span> <p>the board where the gamer score in</p>
</dd><dt>order</dt><dd><code>string</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>hightolow</span></span> <p>deprecated, defaults to leaderboard’s ordering</p>
</dd><dt>type</dt><dd><code>string</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>highscore</span></span> <p>one of ["highscore", “friendscore”]</p>
</dd><dt>page</dt><dd><code>number</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>1</span></span> <p>th epage number or a special “me” for centered scores</p>
</dd><dt>count</dt><dd><code>number</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>10</span></span> <p>the max returned rows</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#293c93547ad82288a5579db70fd53646" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="293c93547ad82288a5579db70fd53646" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#c9862fa65c714ada6b7edd22c8a2db1a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="c9862fa65c714ada6b7edd22c8a2db1a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
<span class="hljs-string">"<leaderboard>"</span> : {
<span class="hljs-string">"page"</span> : <span class="hljs-number">2</span>,
<span class="hljs-string">"maxpage"</span> : <span class="hljs-number">100</span>,
<span class="hljs-string">"rankOfFirst"</span> : <span class="hljs-number">10</span>,
<span class="hljs-label"> scores :</span> [
{ <span class="hljs-string">"gamer_id_1"</span>:
<span class="hljs-label"> { score : 100, info:</span> <span class="hljs-string">"whatever"</span>, , timestamp : <span class="hljs-string">""</span>, profile: {} }
}
{ <span class="hljs-string">"gamer_id_2"</span>:
<span class="hljs-label"> { score : 90, info:</span> <span class="hljs-string">"whatever"</span>, , timestamp : <span class="hljs-string">""</span>, profile: {} }
}
]
}
}
</code></pre></li><li class="list-group-item"><strong>Response <code>404</code></strong><a data-toggle="collapse" data-target="#8d7ac2dfb9cd8957cc19c0427bd1a04e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8d7ac2dfb9cd8957cc19c0427bd1a04e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"LeaderboardNotFound"</span></span>,
}
</code></pre></li><li class="list-group-item"><strong>Response <code>402</code></strong><a data-toggle="collapse" data-target="#7fb898f92f2f8b3f425a4205e4ff9a32" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="7fb898f92f2f8b3f425a4205e4ff9a32" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">code</span>" : <span class="hljs-value"><span class="hljs-string">"NoScoreYet"</span></span>,
"<span class="hljs-attribute">message</span>" : <span class="hljs-value"><span class="hljs-string">"Asked for centered scores on a gamer who never scores"</span>
</span>}
</code></pre></li></ul></section><h4 id="scores-and-leaderboards-">Resources <a href="#scores-and-leaderboards-"><i class="fa fa-link"></i></a></h4><section id="scores-and-leaderboards--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#scores-and-leaderboards--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v2.6/gamer/bestscores/{domain}</code></div></div><div class="panel-body"><h3>Get all the gamer’s bestscores</h3>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain used for this leaderboard</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#293c93547ad82288a5579db70fd53646" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="293c93547ad82288a5579db70fd53646" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#48073d00432b457e0d2b8eb6b4d0cff3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="48073d00432b457e0d2b8eb6b4d0cff3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
<span class="hljs-string">"easy"</span> : { <span class="hljs-string">score:</span><span class="hljs-number">100</span>, <span class="hljs-string">info :</span> <span class="hljs-string">"desc"</span> , <span class="hljs-string">timestamp :</span> <span class="hljs-string">""</span>}
<span class="hljs-string">"meduim"</span> : { <span class="hljs-string">score:</span><span class="hljs-number">20</span>, <span class="hljs-string">info :</span> <span class="hljs-string">"desc"</span>, <span class="hljs-string">timestamp :</span> <span class="hljs-string">""</span> }
<span class="hljs-string">"hard"</span> : { <span class="hljs-string">score:</span><span class="hljs-number">10</span>, <span class="hljs-string">info :</span> <span class="hljs-string">"desc"</span>, <span class="hljs-string">timestamp :</span> <span class="hljs-string">""</span> }
}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="events">Events <a href="#events"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Clan of the Cloud let’s you send and receive messages between gamers.</p>
<p>You can use this feature for inter-application messaging too, and use it to send any kind of json message.</p>
<p>Ordered delivery is guaranteed, and acknowledgement (or auto-acknowledgement) of each message is required.</p>
<h4 id="events-">Resources <a href="#events-"><i class="fa fa-link"></i></a></h4><section id="events--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#events--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/event/{domain}/{gamer_id}</code></div></div><div class="panel-body"><h4>Send a message</h4>
<p>Use this API to send a message to another user from your game. Messages are sent to a specific user, in a specific domain.
You can use domains to send messages accross games (or use <code>private</code> for messages sent to your game only).</p>
<p>Messages are <strong>always</strong> JSON objects (not strings nor binary data).</p>
<p>The response body will contain a copy of the message just sent, with an added <code>id</code> field.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain</p>
</dd><dt>gamer_id</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>5402cf700530df4fa7ed3629</span></span><p>The recepient for the message</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#99a0235302a097c79224d0561a3b345a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="99a0235302a097c79224d0561a3b345a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">key</span>": <span class="hljs-value"><span class="hljs-string">"value"</span></span>,
"<span class="hljs-attribute">anotherKey</span>" : <span class="hljs-value"><span class="hljs-string">"another value"</span></span>,
"<span class="hljs-attribute">data</span>" : <span class="hljs-value">[{
"<span class="hljs-attribute">any</span>": <span class="hljs-value"><span class="hljs-string">"data"</span>
</span>}]
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#8e363e60bce7fbc2c2a93256c7e9fa5e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="8e363e60bce7fbc2c2a93256c7e9fa5e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code> {
"<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"5cf3baf5-742c-4c3c-ad88-d12d84b01574"</span></span>,
"<span class="hljs-attribute">key</span>": <span class="hljs-value"><span class="hljs-string">"value"</span></span>,
"<span class="hljs-attribute">anotherKey</span>" : <span class="hljs-value"><span class="hljs-string">"another value"</span></span>,
"<span class="hljs-attribute">data</span>" : <span class="hljs-value">[{
"<span class="hljs-attribute">any</span>": <span class="hljs-value"><span class="hljs-string">"data"</span>
</span>}]
</span>}
</code></pre></li></ul></section><h4 id="events-">Resources <a href="#events-"><i class="fa fa-link"></i></a></h4><section id="events--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#events--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/event/{domain}{?ack}{&timeout}</code></div></div><div class="panel-body"><h4>Receive messages</h4>
<p>This route uses long polling to deliver messages, one at a time. If more than one message was queued, you will have to call <code>receive</code> more than once.
Normally, you’d setup a loop to call <code>receive</code> and deliver messages to your game asynchronously.</p>
<p><code>Receive</code> will block for a specified amount of time (with <code>?timeout=ms</code>) or 50 seconds (the default), and will be unblocked if a message is received, or if the call times out.
When a message is received, the HTTP status code is <code>200</code>. If it returns because of the timeout, the response code is <code>204</code>.</p>
<p>To guarantee delivery, acknowledgement is necessary, but you can use automatic acknowledgement (<code>?ack=auto</code>).
If you want to ack messages, pass <code>?ack=<messageId></code> where <code>messageID</code> is the ID of the latest received message.
If you don’t specify an <code>?ack</code> parameter, the message is received with no ackowledgement (to bootstrap the loop).</p>
<p>Choose if you want auto or acknowlegement as it can get hairy to mix both.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain</p>
</dd><dt>ack</dt><dd><code>string</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>auto</span></span> <span class="text-muted example"><strong>Example: </strong><span>5cf3baf5-742c-4c3c-ad88-d12d84b01574</span></span><p>The message ID to acknowledge</p>
</dd><dt>timeout</dt><dd><code>integer</code> <span>(optional)</span> <span class="text-info default"><strong>Default: </strong><span>50000</span></span> <p>The long polling timeout, in milliseconds</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#d43b969b80bcde352fe5619b6703987e" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d43b969b80bcde352fe5619b6703987e" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#1aeb965db3bb6dffb4b66fb7a4601f8d" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1aeb965db3bb6dffb4b66fb7a4601f8d" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code> {
"<span class="hljs-attribute">id</span>" : <span class="hljs-value"><span class="hljs-string">"5cf3baf5-742c-4c3c-ad88-d12d84b01574"</span></span>,
"<span class="hljs-attribute">key</span>": <span class="hljs-value"><span class="hljs-string">"value"</span></span>,
"<span class="hljs-attribute">anotherKey</span>" : <span class="hljs-value"><span class="hljs-string">"another value"</span></span>,
"<span class="hljs-attribute">data</span>" : <span class="hljs-value">[{
"<span class="hljs-attribute">any</span>": <span class="hljs-value"><span class="hljs-string">"data"</span>
</span>}]
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>204</code></strong></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="achievements">Achievements <a href="#achievements"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Clan of the Cloud provides functionality allowing to save the progress of the player and triggering Achievements, like on most popular platforms. This system is device independent and provides the tools required to notify Clan of the Cloud from progress and querying the status of achievements.</p>
<p>Achievements share functionality with the Transaction system. This is because the key/value storage affected by transactions are used to trigger achievements.</p>
<h4 id="achievements-">Resources <a href="#achievements-"><i class="fa fa-link"></i></a></h4><section id="achievements--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#achievements--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/achievements/{domain}</code></div></div><div class="panel-body"><h4>List achievements</h4>
<p>Use this API to list the achievements available for your game, along with, for each of them, the progress of the gamer logged in.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain, use <code>private</code> to return the default achievemens created for your game in the Front Office</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#9ff467287dfe45a5758aa2ff22602409" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="9ff467287dfe45a5758aa2ff22602409" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#ed1ab3c62d88aee40f112b103f0c880a" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ed1ab3c62d88aee40f112b103f0c880a" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">achievements</span>": <span class="hljs-value">{
"<span class="hljs-attribute">highScore</span>": <span class="hljs-value">{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"limit"</span></span>,
"<span class="hljs-attribute">config</span>": <span class="hljs-value">{
"<span class="hljs-attribute">maxValue</span>": <span class="hljs-value"><span class="hljs-number">1000</span></span>,
"<span class="hljs-attribute">unit</span>": <span class="hljs-value"><span class="hljs-string">"score"</span>
</span>}</span>,
"<span class="hljs-attribute">gameData</span>": <span class="hljs-value">{
"<span class="hljs-attribute">initiallyHidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}</span>,
"<span class="hljs-attribute">gamerData</span>": <span class="hljs-value">{
"<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}</span>,
"<span class="hljs-attribute">progress</span>": <span class="hljs-value"><span class="hljs-number">0.06</span>
</span>}
</span>}
</span>}
</code></pre></li></ul></section><h4 id="achievements-custom-information-about-an-achievement">Custom information about an achievement <a href="#achievements-custom-information-about-an-achievement"><i class="fa fa-link"></i></a></h4><section id="achievements-custom-information-about-an-achievement-post" class="panel panel-success"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Set custom information about an achievement, for an user</span></div><div style="float:left"><a href="#achievements-custom-information-about-an-achievement-post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/achievements/{domain}/{achievement}/gamerdata</code></div></div><div class="panel-body"><p>Use this API to set the custom data associated with a gamer for a given achievement. This data is associated between a gamer and an achievement, so you might for instance store data on how the achievement was performed.
The whole achievement, as modified is returned.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain, use <code>private</code> to return the default achievemens created for your game in the Front Office</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#a90f10421690c2d46f72d772494a845c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="a90f10421690c2d46f72d772494a845c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#86466e39ad1773f63e696915c90bb7cc" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="86466e39ad1773f63e696915c90bb7cc" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">achievement</span>": <span class="hljs-value">{
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"limit"</span></span>,
"<span class="hljs-attribute">config</span>": <span class="hljs-value">{
"<span class="hljs-attribute">maxValue</span>": <span class="hljs-value"><span class="hljs-number">1000</span></span>,
"<span class="hljs-attribute">unit</span>": <span class="hljs-value"><span class="hljs-string">"score"</span>
</span>}</span>,
"<span class="hljs-attribute">gameData</span>": <span class="hljs-value">{
"<span class="hljs-attribute">initiallyHidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}</span>,
"<span class="hljs-attribute">gamerData</span>": <span class="hljs-value">{
"<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}</span>,
"<span class="hljs-attribute">progress</span>": <span class="hljs-value"><span class="hljs-number">0.06</span>
</span>}
</span>}
</code></pre></li></ul></section><section id="achievements-custom-information-about-an-achievement-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Extract custom information about an achievement</span></div><div style="float:left"><a href="#achievements-custom-information-about-an-achievement-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/achievements/{domain}/{achievement}/gamerdata</code></div></div><div class="panel-body"><p>Use this API to fetch the custom data associated with a gamer for a given achievement.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <span class="text-muted example"><strong>Example: </strong><span>private</span></span><p>The domain, use <code>private</code> to return the default achievemens created for your game in the Front Office</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#0dafd93344d8bbec7eb7b21090481554" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="0dafd93344d8bbec7eb7b21090481554" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#d3daa42cfff1c589defe7bb6e18671fa" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d3daa42cfff1c589defe7bb6e18671fa" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">gamerData</span>": <span class="hljs-value">{
"<span class="hljs-attribute">unhidden</span>": <span class="hljs-value"><span class="hljs-literal">true</span>
</span>}</span>,
}
</code></pre></li></ul></section></div></div></div><div><div class="panel panel-default"><div class="panel-heading"><h3 id="matches">Matches <a href="#matches"><i class="fa fa-link"></i></a></h3></div><div class="panel-body"><p>Clan of the Cloud provides a simple way to run matches between a set of gamers using on the network. The match system is designed around a centralized game state stored on Clan of the Cloud servers, with gamers participating to the match making a move, updating the global game state and notifying the other players on an asynchronous basis.</p>
<p>This means that this match system is better suited to turn by turn game, rather than real time game such as an MMORPG, which may require a more sophisticated system handled on your servers.</p>
<p>As with other functionality, matches are scoped by domain, allowing to share data amongst multiple games. For more information, please take a look at the section <a href="#keyvaluestore">Key-Value Store</a>.</p>
<h4 id="matches-">Resources <a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches{?domain}</code></div></div><div class="panel-body"><p>Creates a new match, automatically attached to your gamer ID. Only the <code>maxPlayers</code> node is required.</p>
<h3>Description of a match</h3>
<table>
<thead>
<tr><th>Field</th><th>Description</th><th>Value</th></tr>
</thead>
<tbody>
<tr><td>_id</td><td>string</td><td>ID of the match, keep it safe to allow for joining it or fetching it later (read only)</td></tr>
<tr><td>creator</td><td>string</td><td>ID of the gamer who created the game (read only)</td></tr>
<tr><td>customProperties</td><td>json</td><td>JSON containing the user properties of the match (only one level, with numbers or strings as values)</td></tr>
<tr><td>domain</td><td>string</td><td>domain to which the match belongs; used for scoping purposes (read only)</td></tr>
<tr><td>description</td><td>string</td><td>description of the game (non localized)</td></tr>
<tr><td>globalState</td><td>json</td><td>global state of the match, which may be used to reconstruct the game locally (read only)</td></tr>
<tr><td>lastEventId</td><td>string</td><td>ID of the last event, which must be passed by any player who wishes to make a move (read only)</td></tr>
<tr><td>maxPlayers</td><td>number</td><td>maximum number of players who can join this game</td></tr>
<tr><td>events</td><td>json</td><td>list of pending events, cleared whenever a globalState is posted along with a move by one of the players (read only)</td></tr>
<tr><td>players</td><td>array</td><td>list of IDs of players participating to the match (read only)</td></tr>
<tr><td>seed</td><td>31-bit integer</td><td>a random number generated upon match creation, to be used by players</td></tr>
<tr><td>shoe</td><td>array</td><td>an array of objects that are shuffled when the match starts. You can put anything you want inside and use it as values for your next game.</td></tr>
<tr><td>status</td><td>string</td><td>either “running” (meaning that the match is running), either “finished” (meaning that nobody can join the match anymore) (read only)</td></tr>
</tbody>
</table>
<p>The response of most calls only include basic properties. To get all properties, including the global state and event list, you must either create, join or fetch a single match.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain on which to place the match (use private by default for a domain that is scoped for your game)</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#092f1aa54484d66251d53d8091e851c9" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="092f1aa54484d66251d53d8091e851c9" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
"<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span>
<span class="hljs-string">"customProperties"</span>: {
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
</span>}</span>,
"<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{
"<span class="hljs-attribute">startup</span>": <span class="hljs-value"><span class="hljs-string">"globalState"</span>
</span>}</span>,
"<span class="hljs-attribute">shoe</span>": <span class="hljs-value">[<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>, <span class="hljs-number">4</span>, <span class="hljs-number">5</span>, <span class="hljs-number">6</span>, <span class="hljs-number">7</span>, <span class="hljs-number">8</span>, <span class="hljs-number">9</span>, <span class="hljs-number">10</span>]
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#10ed7cc09c9db3f2905ec4c4763185c3" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="10ed7cc09c9db3f2905ec4c4763185c3" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">match</span>": <span class="hljs-value">{
"<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"54919c51f8d8690000fe5f6c"</span></span>,
"<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
"<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"54919c510bfa2100001bd548"</span></span>,
"<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
"<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
</span>}
</span>}</span>,
"<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
</span>}</span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
"<span class="hljs-attribute">domain</span>": <span class="hljs-value"><span class="hljs-string">"private"</span></span>,
"<span class="hljs-attribute">events</span>": <span class="hljs-value">[]</span>,
"<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{}</span>,
"<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"54919c51f8d8690000fe5f6b"</span></span>,
"<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span></span>,
"<span class="hljs-attribute">players</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"54919c510bfa2100001bd548"</span></span>,
"<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
"<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
</span>}
</span>}
]</span>,
"<span class="hljs-attribute">seed</span>": <span class="hljs-value"><span class="hljs-number">1089745184</span></span>,
"<span class="hljs-attribute">shoe</span>":<span class="hljs-value">[<span class="hljs-number">2</span>,<span class="hljs-number">3</span>,<span class="hljs-number">4</span>,<span class="hljs-number">1</span>,<span class="hljs-number">10</span>,<span class="hljs-number">9</span>,<span class="hljs-number">7</span>,<span class="hljs-number">6</span>,<span class="hljs-number">5</span>,<span class="hljs-number">8</span>]</span>,
"<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
</span>}
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources <a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--get" class="panel panel-info"><div class="panel-heading"><div style="float:left"><a href="#matches--get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/matches{?domain}{&properties}{&participating}{&finished}{&invited}</code></div></div><div class="panel-body"><p>Lists the matches available for join, using a query to filter the results.</p>
<h3>Filtering by properties</h3>
<p>Matches contain an user defined field named <code>customProperties</code>, which can be used by developers to store and fetch additional details about a game. In the example of a card-based game, one of these properties could store the minimum bet. This information could also be used to help players to join games best suited to their willing. A filter is specified as an URL-encoded JSON containing attributes and the corresponding expected value. No comparison operators are available for now, now is it possible to customize the implementation : when there are more than one attributes, all conditions specified must be met in order for the match to qualify.</p>
<p>The following will return the matches which have a property named type with value being "coop".
<code>GET /v1/gamer/matches?domain=private&properties={"type": "coop"}</code></p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>domain</dt><dd><code>string</code> <span class="required">(required)</span> <p>the domain on which to look for matches (use private by default for a domain that is scoped for your game)</p>
</dd><dt>properties</dt><dd><code>string</code> <span class="required">(required)</span> <p>a JSON string specifying the properties that need to be present in order to return a match. The JSON uses the filtering syntax as documented above.</p>
</dd><dt>participating</dt><dd><code></code> <span>(optional)</span> <p>pass this parameter to only list matches to which you are participating.</p>
</dd><dt>finished</dt><dd><code></code> <span>(optional)</span> <p>pass this to include finished matches in the result. Not recommended but can be used with the <code>participating</code> filter to gather info about your past games.</p>
</dd><dt>invited</dt><dd><code></code> <span>(optional)</span> <p>pass this to filter by matches to which you are currently invited. You are only marked as invited to a match until you join it.</p>
</dd><dt>limit</dt><dd><code>number</code> <span>(optional)</span> <p>the maximum number of matches to return. Used for pagination. Defaults to 30.</p>
</dd><dt>skip</dt><dd><code>number</code> <span>(optional)</span> <p>the index of the first item to return. Used for pagination. Zero-based, defaults to 0.</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#10a9b310e3a8551dac0933c4b23beab1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="10a9b310e3a8551dac0933c4b23beab1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#6d03de4c01eb6e777c4c1a8c0a3011e2" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6d03de4c01eb6e777c4c1a8c0a3011e2" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">count</span>": <span class="hljs-value"><span class="hljs-number">1</span></span>,
"<span class="hljs-attribute">matches</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"548721c15b06a5fec3315a97"</span></span>,
"<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
"<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"548721c15b06a5fec3315a95"</span></span>,
"<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
"<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
</span>}
</span>}</span>,
"<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
</span>}</span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
"<span class="hljs-attribute">domain</span>": <span class="hljs-value"><span class="hljs-string">"private"</span></span>,
"<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span></span>,
"<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
</span>},
]
</span>}
</code></pre></li></ul></section><h4 id="matches-working-with-a-match">Working with a match <a href="#matches-working-with-a-match"><i class="fa fa-link"></i></a></h4><section id="matches-working-with-a-match-get" class="panel panel-info"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Fetching in-depth information about a match</span></div><div style="float:left"><a href="#matches-working-with-a-match-get" class="btn btn-xs btn-info">GET</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{match_id}</code></div></div><div class="panel-body"><p>Fetches a given match. The response looks slightly different from that of a list of matches, but the data reported for the match is the same.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>match_id</dt><dd><code>string</code> <span class="required">(required)</span> <p>the ID of the match as previously returned.</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#896a57dbf56d73232a2549f27ebf466b" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="896a57dbf56d73232a2549f27ebf466b" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#6a2ca8501ca7eb3a9a32bfc096ff099c" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="6a2ca8501ca7eb3a9a32bfc096ff099c" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">match</span>": <span class="hljs-value">{
"<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"548724abfe4ce589c6f81d22"</span></span>,
"<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
"<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"548724abfe4ce589c6f81d20"</span></span>,
"<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
"<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
</span>}
</span>}</span>,
"<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>
</span>}</span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Sample match for testing"</span></span>,
"<span class="hljs-attribute">domain</span>": <span class="hljs-value"><span class="hljs-string">"private"</span></span>,
"<span class="hljs-attribute">events</span>": <span class="hljs-value">[]</span>,
"<span class="hljs-attribute">globalState</span>": <span class="hljs-value">{}</span>,
"<span class="hljs-attribute">lastEventId</span>": <span class="hljs-value"><span class="hljs-string">"548724ab612bff89c680e179"</span></span>,
"<span class="hljs-attribute">maxPlayers</span>": <span class="hljs-value"><span class="hljs-number">3</span></span>,
"<span class="hljs-attribute">players</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"548724abfe4ce589c6f81d20"</span></span>,
"<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
"<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
</span>}
</span>}
]</span>,
"<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-string">"running"</span>
</span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>404</code></strong><a data-toggle="collapse" data-target="#d954b980157ebb0564bf8214428f63d7" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="d954b980157ebb0564bf8214428f63d7" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"InvalidMatch"</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"The match does not exist"</span></span>,
"<span class="hljs-attribute">status</span>": <span class="hljs-value"><span class="hljs-number">404</span>
</span>}
</code></pre></li></ul></section><section id="matches-working-with-a-match-delete" class="panel panel-danger"><div class="panel-heading"><div style="float:right"><span style="text-transform: lowercase">Deleting a match</span></div><div style="float:left"><a href="#matches-working-with-a-match-delete" class="btn btn-xs btn-danger">DELETE</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{match_id}</code></div></div><div class="panel-body"><p>Deletes a match, erasing it along with its history. You need to be the creator of the match to perform this operation.</p>
</div><ul class="list-group"><li class="list-group-item bg-default"><strong>Parameters</strong></li><li class="list-group-item"><dl class="dl-horizontal"><dt>match_id</dt><dd><code>string</code> <span class="required">(required)</span> <p>the ID of the match to delete.</p>
</dd></dl></li></ul><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#153e5d3886c580e034403e8433369678" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="153e5d3886c580e034403e8433369678" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#cdf3d6716b538376a9cf74298f9f5557" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="cdf3d6716b538376a9cf74298f9f5557" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">done</span>": <span class="hljs-value"><span class="hljs-number">1</span>
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>431</code></strong><a data-toggle="collapse" data-target="#dff96fa0d0c3e33b237be86e54adc642" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="dff96fa0d0c3e33b237be86e54adc642" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"MatchNotFinished"</span></span>,
"<span class="hljs-attribute">message</span>": <span class="hljs-value"><span class="hljs-string">"This match needs to be finished in order to perform this operation"</span>
</span>}
</code></pre></li></ul></section><h4 id="matches-">Resources <a href="#matches-"><i class="fa fa-link"></i></a></h4><section id="matches--post" class="panel panel-success"><div class="panel-heading"><div style="float:left"><a href="#matches--post" class="btn btn-xs btn-success">POST</a></div><div style="overflow:hidden"><code>/v1/gamer/matches/{id}/join</code></div></div><div class="panel-body"><p>Join an existing match.</p>
<p>A field named <code>osn</code> can be passed as shown in the sample request to send a push notification to the users who are not active at the moment.</p>
<h3>Events related to matches</h3>
<p>Any player who has joined the match will automatically receive events indicating changes made to the match. These events happen when a player joins the match, leaves it or posts a move.</p>
<p>These events must be processed by each player prior to issuing additional commands. To do so, there is a parameter, called <code>lastEventId</code> that is required on some resources and must be set to the ID of the last event from the match. Among other things, this allows to detect race conditions and guarantee the integrity of the game.</p>
<p>This last event comes in two forms: either as a result of a match operation (in which case you can simply pick the <code>lastEventId</code> field within the server response) if you were the one initating it, or as the <code>event._id</code> field of the last received event.</p>
<p>In case a player joins the match, the following event will be received by other players:</p>
<pre><code>{
"type": "match.join",
"event": {
"_id": "548866edba0ec600005e1941",
"match_id": "548866ed74c2e0000098db95",
"playersJoined": [
{
"gamer_id": "548866ed74c2e0000098db94",
"profile": {
"displayName": "Guest",
"lang": "en"
}
}
]
},
"id": "9155987d-6322-46d4-9403-e90ab4ba5fa3"
}
</code></pre>
<p>In case a player leaves the match, similarly the following event will be received by others:</p>
<pre><code>{
"type": "match.leave",
"event": {
"_id": "548866eeba0ec600005e1948",
"match_id": "548866ed74c2e0000098db95",
"playersLeft": [
{
"gamer_id": "548866ed74c2e0000098db94",
"profile": {
"displayName": "Guest",
"lang": "en"
}
}
]
},
"id": "5007fd0a-1365-4e87-aba8-5d916731e684"
}
</code></pre>
<p>In case the match is marked as finished, the following event will be broadcasted to all players except the one who initiated it.</p>
<pre><code>{
"type": "match.finish",
"event": {
"_id": "54784d07a0fcf2000086457d",
"finished": 1,
"match_id": "54784d07f10c190000cb96e3"
},
"id": "d2f908d1-40d8-4f73-802e-fe0086bb6cd5"
}
</code></pre>
<p>In case an element was drawn from the shoe, an event like this is fired:</p>
<pre><code>{
"type": "match.shoedraw",
"event": {
"_id": "5492a7c7a6725f0000b59e4f",
"count": 2,
"match_id": "5492a7c6a6725f0000b59e46"
},
"id": "5e4e82c1-d728-4a4b-be40-e4abec320440"
}
</code></pre>
<p>Events are broadcasted in other situations, such as moves, but they are described within the related call documentation.</p>
</div><ul class="list-group"><li class="list-group-item"><strong>Request</strong><a data-toggle="collapse" data-target="#1d918285618502023bf9baea3b1c5041" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="1d918285618502023bf9baea3b1c5041" class="list-group-item panel-collapse collapse"><div class="description"><ul>
<li>Parameters
<ul>
<li>id (required, string) … the ID of the match to join.</li>
</ul></li>
</ul>
</div><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br><span class="hljs-attribute">x-apikey</span>: <span class="hljs-string">testgame-key</span><br><span class="hljs-attribute">x-apisecret</span>: <span class="hljs-string">testgame-secret</span><br><span class="hljs-attribute">Authorization</span>: <span class="hljs-string">Basic gamer_id:gamer_secret</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">osn</span>": <span class="hljs-value">{"<span class="hljs-attribute">en</span>": <span class="hljs-value"><span class="hljs-string">"I just joined!"</span></span>, "<span class="hljs-attribute">ja</span>": <span class="hljs-value"><span class="hljs-string">"tadaima!"</span></span>}
</span>}
</code></pre></li><li class="list-group-item"><strong>Response <code>200</code></strong><a data-toggle="collapse" data-target="#ba320ca5c2db4917895936bb5b979eb1" class="pull-right collapsed"><span class="closed">Show</span><span class="open">Hide</span></a></li><li id="ba320ca5c2db4917895936bb5b979eb1" class="list-group-item panel-collapse collapse"><h5>Headers</h5><pre><code><span class="hljs-attribute">Content-Type</span>: <span class="hljs-string">application/json</span><br></code></pre><h5>Body</h5><pre><code>{
"<span class="hljs-attribute">match</span>": <span class="hljs-value">{
"<span class="hljs-attribute">_id</span>": <span class="hljs-value"><span class="hljs-string">"5487260cf45e5f84c7cd7225"</span></span>,
"<span class="hljs-attribute">creator</span>": <span class="hljs-value">{
"<span class="hljs-attribute">gamer_id</span>": <span class="hljs-value"><span class="hljs-string">"5487260cf45e5f84c7cd7223"</span></span>,
"<span class="hljs-attribute">profile</span>": <span class="hljs-value">{
"<span class="hljs-attribute">displayName</span>": <span class="hljs-value"><span class="hljs-string">"Guest"</span></span>,
"<span class="hljs-attribute">lang</span>": <span class="hljs-value"><span class="hljs-string">"en"</span>
</span>}
</span>}</span>,
"<span class="hljs-attribute">customProperties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">other</span>": <span class="hljs-value"><span class="hljs-string">"property"</span></span>,
"<span class="hljs-attribute">type</span>": <span class="hljs-value"><span class="hljs-string">"coop"</span>