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 package games
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "games:v1"
95 const apiName = "games"
96 const apiVersion = "v1"
97 const basePath = "https://games.googleapis.com/"
98 const basePathTemplate = "https://games.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://games.mtls.googleapis.com/"
100
101
102 const (
103
104 AndroidpublisherScope = "https://www.googleapis.com/auth/androidpublisher"
105
106
107 DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata"
108
109
110 GamesScope = "https://www.googleapis.com/auth/games"
111 )
112
113
114 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
115 scopesOption := internaloption.WithDefaultScopes(
116 "https://www.googleapis.com/auth/androidpublisher",
117 "https://www.googleapis.com/auth/drive.appdata",
118 "https://www.googleapis.com/auth/games",
119 )
120
121 opts = append([]option.ClientOption{scopesOption}, opts...)
122 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
123 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
124 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
125 opts = append(opts, internaloption.EnableNewAuthLibrary())
126 client, endpoint, err := htransport.NewClient(ctx, opts...)
127 if err != nil {
128 return nil, err
129 }
130 s, err := New(client)
131 if err != nil {
132 return nil, err
133 }
134 if endpoint != "" {
135 s.BasePath = endpoint
136 }
137 return s, nil
138 }
139
140
141
142
143
144
145 func New(client *http.Client) (*Service, error) {
146 if client == nil {
147 return nil, errors.New("client is nil")
148 }
149 s := &Service{client: client, BasePath: basePath}
150 s.AchievementDefinitions = NewAchievementDefinitionsService(s)
151 s.Achievements = NewAchievementsService(s)
152 s.Applications = NewApplicationsService(s)
153 s.Events = NewEventsService(s)
154 s.Leaderboards = NewLeaderboardsService(s)
155 s.Metagame = NewMetagameService(s)
156 s.Players = NewPlayersService(s)
157 s.Recall = NewRecallService(s)
158 s.Revisions = NewRevisionsService(s)
159 s.Scores = NewScoresService(s)
160 s.Snapshots = NewSnapshotsService(s)
161 s.Stats = NewStatsService(s)
162 return s, nil
163 }
164
165 type Service struct {
166 client *http.Client
167 BasePath string
168 UserAgent string
169
170 AchievementDefinitions *AchievementDefinitionsService
171
172 Achievements *AchievementsService
173
174 Applications *ApplicationsService
175
176 Events *EventsService
177
178 Leaderboards *LeaderboardsService
179
180 Metagame *MetagameService
181
182 Players *PlayersService
183
184 Recall *RecallService
185
186 Revisions *RevisionsService
187
188 Scores *ScoresService
189
190 Snapshots *SnapshotsService
191
192 Stats *StatsService
193 }
194
195 func (s *Service) userAgent() string {
196 if s.UserAgent == "" {
197 return googleapi.UserAgent
198 }
199 return googleapi.UserAgent + " " + s.UserAgent
200 }
201
202 func NewAchievementDefinitionsService(s *Service) *AchievementDefinitionsService {
203 rs := &AchievementDefinitionsService{s: s}
204 return rs
205 }
206
207 type AchievementDefinitionsService struct {
208 s *Service
209 }
210
211 func NewAchievementsService(s *Service) *AchievementsService {
212 rs := &AchievementsService{s: s}
213 return rs
214 }
215
216 type AchievementsService struct {
217 s *Service
218 }
219
220 func NewApplicationsService(s *Service) *ApplicationsService {
221 rs := &ApplicationsService{s: s}
222 return rs
223 }
224
225 type ApplicationsService struct {
226 s *Service
227 }
228
229 func NewEventsService(s *Service) *EventsService {
230 rs := &EventsService{s: s}
231 return rs
232 }
233
234 type EventsService struct {
235 s *Service
236 }
237
238 func NewLeaderboardsService(s *Service) *LeaderboardsService {
239 rs := &LeaderboardsService{s: s}
240 return rs
241 }
242
243 type LeaderboardsService struct {
244 s *Service
245 }
246
247 func NewMetagameService(s *Service) *MetagameService {
248 rs := &MetagameService{s: s}
249 return rs
250 }
251
252 type MetagameService struct {
253 s *Service
254 }
255
256 func NewPlayersService(s *Service) *PlayersService {
257 rs := &PlayersService{s: s}
258 return rs
259 }
260
261 type PlayersService struct {
262 s *Service
263 }
264
265 func NewRecallService(s *Service) *RecallService {
266 rs := &RecallService{s: s}
267 return rs
268 }
269
270 type RecallService struct {
271 s *Service
272 }
273
274 func NewRevisionsService(s *Service) *RevisionsService {
275 rs := &RevisionsService{s: s}
276 return rs
277 }
278
279 type RevisionsService struct {
280 s *Service
281 }
282
283 func NewScoresService(s *Service) *ScoresService {
284 rs := &ScoresService{s: s}
285 return rs
286 }
287
288 type ScoresService struct {
289 s *Service
290 }
291
292 func NewSnapshotsService(s *Service) *SnapshotsService {
293 rs := &SnapshotsService{s: s}
294 return rs
295 }
296
297 type SnapshotsService struct {
298 s *Service
299 }
300
301 func NewStatsService(s *Service) *StatsService {
302 rs := &StatsService{s: s}
303 return rs
304 }
305
306 type StatsService struct {
307 s *Service
308 }
309
310
311 type AchievementDefinition struct {
312
313
314
315
316
317 AchievementType string `json:"achievementType,omitempty"`
318
319 Description string `json:"description,omitempty"`
320
321
322 ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
323
324
325 FormattedTotalSteps string `json:"formattedTotalSteps,omitempty"`
326
327 Id string `json:"id,omitempty"`
328
329
330
331
332
333
334 InitialState string `json:"initialState,omitempty"`
335
336
337 IsRevealedIconUrlDefault bool `json:"isRevealedIconUrlDefault,omitempty"`
338
339
340 IsUnlockedIconUrlDefault bool `json:"isUnlockedIconUrlDefault,omitempty"`
341
342
343 Kind string `json:"kind,omitempty"`
344
345 Name string `json:"name,omitempty"`
346
347 RevealedIconUrl string `json:"revealedIconUrl,omitempty"`
348
349 TotalSteps int64 `json:"totalSteps,omitempty"`
350
351 UnlockedIconUrl string `json:"unlockedIconUrl,omitempty"`
352
353
354
355
356
357 ForceSendFields []string `json:"-"`
358
359
360
361
362 NullFields []string `json:"-"`
363 }
364
365 func (s *AchievementDefinition) MarshalJSON() ([]byte, error) {
366 type NoMethod AchievementDefinition
367 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
368 }
369
370
371
372 type AchievementDefinitionsListResponse struct {
373
374 Items []*AchievementDefinition `json:"items,omitempty"`
375
376
377 Kind string `json:"kind,omitempty"`
378
379 NextPageToken string `json:"nextPageToken,omitempty"`
380
381
382 googleapi.ServerResponse `json:"-"`
383
384
385
386
387
388 ForceSendFields []string `json:"-"`
389
390
391
392
393 NullFields []string `json:"-"`
394 }
395
396 func (s *AchievementDefinitionsListResponse) MarshalJSON() ([]byte, error) {
397 type NoMethod AchievementDefinitionsListResponse
398 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
399 }
400
401
402 type AchievementIncrementResponse struct {
403
404 CurrentSteps int64 `json:"currentSteps,omitempty"`
405
406
407 Kind string `json:"kind,omitempty"`
408
409
410 NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
411
412
413 googleapi.ServerResponse `json:"-"`
414
415
416
417
418
419 ForceSendFields []string `json:"-"`
420
421
422
423
424 NullFields []string `json:"-"`
425 }
426
427 func (s *AchievementIncrementResponse) MarshalJSON() ([]byte, error) {
428 type NoMethod AchievementIncrementResponse
429 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
430 }
431
432
433 type AchievementRevealResponse struct {
434
435
436
437
438
439
440 CurrentState string `json:"currentState,omitempty"`
441
442
443 Kind string `json:"kind,omitempty"`
444
445
446 googleapi.ServerResponse `json:"-"`
447
448
449
450
451
452 ForceSendFields []string `json:"-"`
453
454
455
456
457 NullFields []string `json:"-"`
458 }
459
460 func (s *AchievementRevealResponse) MarshalJSON() ([]byte, error) {
461 type NoMethod AchievementRevealResponse
462 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
463 }
464
465
466
467 type AchievementSetStepsAtLeastResponse struct {
468
469 CurrentSteps int64 `json:"currentSteps,omitempty"`
470
471
472 Kind string `json:"kind,omitempty"`
473
474
475 NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
476
477
478 googleapi.ServerResponse `json:"-"`
479
480
481
482
483
484 ForceSendFields []string `json:"-"`
485
486
487
488
489 NullFields []string `json:"-"`
490 }
491
492 func (s *AchievementSetStepsAtLeastResponse) MarshalJSON() ([]byte, error) {
493 type NoMethod AchievementSetStepsAtLeastResponse
494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
495 }
496
497
498 type AchievementUnlockResponse struct {
499
500
501 Kind string `json:"kind,omitempty"`
502
503
504 NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
505
506
507 googleapi.ServerResponse `json:"-"`
508
509
510
511
512
513 ForceSendFields []string `json:"-"`
514
515
516
517
518 NullFields []string `json:"-"`
519 }
520
521 func (s *AchievementUnlockResponse) MarshalJSON() ([]byte, error) {
522 type NoMethod AchievementUnlockResponse
523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
524 }
525
526
527 type AchievementUpdateMultipleRequest struct {
528
529
530 Kind string `json:"kind,omitempty"`
531
532 Updates []*AchievementUpdateRequest `json:"updates,omitempty"`
533
534
535
536
537
538 ForceSendFields []string `json:"-"`
539
540
541
542
543 NullFields []string `json:"-"`
544 }
545
546 func (s *AchievementUpdateMultipleRequest) MarshalJSON() ([]byte, error) {
547 type NoMethod AchievementUpdateMultipleRequest
548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
549 }
550
551
552
553 type AchievementUpdateMultipleResponse struct {
554
555
556 Kind string `json:"kind,omitempty"`
557
558 UpdatedAchievements []*AchievementUpdateResponse `json:"updatedAchievements,omitempty"`
559
560
561 googleapi.ServerResponse `json:"-"`
562
563
564
565
566
567 ForceSendFields []string `json:"-"`
568
569
570
571
572 NullFields []string `json:"-"`
573 }
574
575 func (s *AchievementUpdateMultipleResponse) MarshalJSON() ([]byte, error) {
576 type NoMethod AchievementUpdateMultipleResponse
577 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
578 }
579
580
581 type AchievementUpdateRequest struct {
582
583 AchievementId string `json:"achievementId,omitempty"`
584
585
586 IncrementPayload *GamesAchievementIncrement `json:"incrementPayload,omitempty"`
587
588
589 Kind string `json:"kind,omitempty"`
590
591
592 SetStepsAtLeastPayload *GamesAchievementSetStepsAtLeast `json:"setStepsAtLeastPayload,omitempty"`
593
594
595
596
597
598
599
600
601 UpdateType string `json:"updateType,omitempty"`
602
603
604
605
606
607 ForceSendFields []string `json:"-"`
608
609
610
611
612 NullFields []string `json:"-"`
613 }
614
615 func (s *AchievementUpdateRequest) MarshalJSON() ([]byte, error) {
616 type NoMethod AchievementUpdateRequest
617 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
618 }
619
620
621 type AchievementUpdateResponse struct {
622
623 AchievementId string `json:"achievementId,omitempty"`
624
625
626
627
628
629
630 CurrentState string `json:"currentState,omitempty"`
631
632
633 CurrentSteps int64 `json:"currentSteps,omitempty"`
634
635
636 Kind string `json:"kind,omitempty"`
637
638
639 NewlyUnlocked bool `json:"newlyUnlocked,omitempty"`
640
641
642 UpdateOccurred bool `json:"updateOccurred,omitempty"`
643
644
645
646
647
648 ForceSendFields []string `json:"-"`
649
650
651
652
653 NullFields []string `json:"-"`
654 }
655
656 func (s *AchievementUpdateResponse) MarshalJSON() ([]byte, error) {
657 type NoMethod AchievementUpdateResponse
658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
659 }
660
661
662 type Application struct {
663
664
665 AchievementCount int64 `json:"achievement_count,omitempty"`
666
667 Assets []*ImageAsset `json:"assets,omitempty"`
668
669 Author string `json:"author,omitempty"`
670
671 Category *ApplicationCategory `json:"category,omitempty"`
672
673 Description string `json:"description,omitempty"`
674
675
676
677
678
679 EnabledFeatures []string `json:"enabledFeatures,omitempty"`
680
681 Id string `json:"id,omitempty"`
682
683 Instances []*Instance `json:"instances,omitempty"`
684
685
686 Kind string `json:"kind,omitempty"`
687
688 LastUpdatedTimestamp int64 `json:"lastUpdatedTimestamp,omitempty,string"`
689
690
691 LeaderboardCount int64 `json:"leaderboard_count,omitempty"`
692
693 Name string `json:"name,omitempty"`
694
695
696 ThemeColor string `json:"themeColor,omitempty"`
697
698
699 googleapi.ServerResponse `json:"-"`
700
701
702
703
704
705 ForceSendFields []string `json:"-"`
706
707
708
709
710 NullFields []string `json:"-"`
711 }
712
713 func (s *Application) MarshalJSON() ([]byte, error) {
714 type NoMethod Application
715 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
716 }
717
718
719 type ApplicationCategory struct {
720
721
722 Kind string `json:"kind,omitempty"`
723
724 Primary string `json:"primary,omitempty"`
725
726 Secondary string `json:"secondary,omitempty"`
727
728
729
730
731
732 ForceSendFields []string `json:"-"`
733
734
735
736
737 NullFields []string `json:"-"`
738 }
739
740 func (s *ApplicationCategory) MarshalJSON() ([]byte, error) {
741 type NoMethod ApplicationCategory
742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
743 }
744
745
746 type ApplicationPlayerId struct {
747
748 ApplicationId string `json:"applicationId,omitempty"`
749
750 PlayerId string `json:"playerId,omitempty"`
751
752
753
754
755
756 ForceSendFields []string `json:"-"`
757
758
759
760
761 NullFields []string `json:"-"`
762 }
763
764 func (s *ApplicationPlayerId) MarshalJSON() ([]byte, error) {
765 type NoMethod ApplicationPlayerId
766 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
767 }
768
769
770
771 type ApplicationVerifyResponse struct {
772
773
774
775 AlternatePlayerId string `json:"alternate_player_id,omitempty"`
776
777
778 Kind string `json:"kind,omitempty"`
779
780
781 PlayerId string `json:"player_id,omitempty"`
782
783
784 googleapi.ServerResponse `json:"-"`
785
786
787
788
789
790 ForceSendFields []string `json:"-"`
791
792
793
794
795 NullFields []string `json:"-"`
796 }
797
798 func (s *ApplicationVerifyResponse) MarshalJSON() ([]byte, error) {
799 type NoMethod ApplicationVerifyResponse
800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
801 }
802
803
804 type Category struct {
805
806 Category string `json:"category,omitempty"`
807
808 ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
809
810
811 Kind string `json:"kind,omitempty"`
812
813
814
815
816
817 ForceSendFields []string `json:"-"`
818
819
820
821
822 NullFields []string `json:"-"`
823 }
824
825 func (s *Category) MarshalJSON() ([]byte, error) {
826 type NoMethod Category
827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
828 }
829
830
831 type CategoryListResponse struct {
832
833 Items []*Category `json:"items,omitempty"`
834
835
836 Kind string `json:"kind,omitempty"`
837
838 NextPageToken string `json:"nextPageToken,omitempty"`
839
840
841 googleapi.ServerResponse `json:"-"`
842
843
844
845
846
847 ForceSendFields []string `json:"-"`
848
849
850
851
852 NullFields []string `json:"-"`
853 }
854
855 func (s *CategoryListResponse) MarshalJSON() ([]byte, error) {
856 type NoMethod CategoryListResponse
857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
858 }
859
860
861 type EndPoint struct {
862
863 Url string `json:"url,omitempty"`
864
865
866 googleapi.ServerResponse `json:"-"`
867
868
869
870
871
872 ForceSendFields []string `json:"-"`
873
874
875
876
877 NullFields []string `json:"-"`
878 }
879
880 func (s *EndPoint) MarshalJSON() ([]byte, error) {
881 type NoMethod EndPoint
882 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
883 }
884
885
886 type EventBatchRecordFailure struct {
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901 FailureCause string `json:"failureCause,omitempty"`
902
903
904 Kind string `json:"kind,omitempty"`
905
906 Range *EventPeriodRange `json:"range,omitempty"`
907
908
909
910
911
912 ForceSendFields []string `json:"-"`
913
914
915
916
917 NullFields []string `json:"-"`
918 }
919
920 func (s *EventBatchRecordFailure) MarshalJSON() ([]byte, error) {
921 type NoMethod EventBatchRecordFailure
922 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
923 }
924
925
926 type EventChild struct {
927
928 ChildId string `json:"childId,omitempty"`
929
930
931 Kind string `json:"kind,omitempty"`
932
933
934
935
936
937 ForceSendFields []string `json:"-"`
938
939
940
941
942 NullFields []string `json:"-"`
943 }
944
945 func (s *EventChild) MarshalJSON() ([]byte, error) {
946 type NoMethod EventChild
947 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
948 }
949
950
951 type EventDefinition struct {
952
953 ChildEvents []*EventChild `json:"childEvents,omitempty"`
954
955 Description string `json:"description,omitempty"`
956
957 DisplayName string `json:"displayName,omitempty"`
958
959 Id string `json:"id,omitempty"`
960
961 ImageUrl string `json:"imageUrl,omitempty"`
962
963
964 IsDefaultImageUrl bool `json:"isDefaultImageUrl,omitempty"`
965
966
967 Kind string `json:"kind,omitempty"`
968
969
970
971
972
973
974 Visibility string `json:"visibility,omitempty"`
975
976
977
978
979
980 ForceSendFields []string `json:"-"`
981
982
983
984
985 NullFields []string `json:"-"`
986 }
987
988 func (s *EventDefinition) MarshalJSON() ([]byte, error) {
989 type NoMethod EventDefinition
990 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
991 }
992
993
994 type EventDefinitionListResponse struct {
995
996 Items []*EventDefinition `json:"items,omitempty"`
997
998
999 Kind string `json:"kind,omitempty"`
1000
1001 NextPageToken string `json:"nextPageToken,omitempty"`
1002
1003
1004 googleapi.ServerResponse `json:"-"`
1005
1006
1007
1008
1009
1010 ForceSendFields []string `json:"-"`
1011
1012
1013
1014
1015 NullFields []string `json:"-"`
1016 }
1017
1018 func (s *EventDefinitionListResponse) MarshalJSON() ([]byte, error) {
1019 type NoMethod EventDefinitionListResponse
1020 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1021 }
1022
1023
1024 type EventPeriodRange struct {
1025
1026
1027 Kind string `json:"kind,omitempty"`
1028
1029
1030 PeriodEndMillis int64 `json:"periodEndMillis,omitempty,string"`
1031
1032
1033 PeriodStartMillis int64 `json:"periodStartMillis,omitempty,string"`
1034
1035
1036
1037
1038
1039 ForceSendFields []string `json:"-"`
1040
1041
1042
1043
1044 NullFields []string `json:"-"`
1045 }
1046
1047 func (s *EventPeriodRange) MarshalJSON() ([]byte, error) {
1048 type NoMethod EventPeriodRange
1049 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1050 }
1051
1052
1053 type EventPeriodUpdate struct {
1054
1055
1056 Kind string `json:"kind,omitempty"`
1057
1058 TimePeriod *EventPeriodRange `json:"timePeriod,omitempty"`
1059
1060 Updates []*EventUpdateRequest `json:"updates,omitempty"`
1061
1062
1063
1064
1065
1066 ForceSendFields []string `json:"-"`
1067
1068
1069
1070
1071 NullFields []string `json:"-"`
1072 }
1073
1074 func (s *EventPeriodUpdate) MarshalJSON() ([]byte, error) {
1075 type NoMethod EventPeriodUpdate
1076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1077 }
1078
1079
1080 type EventRecordFailure struct {
1081
1082 EventId string `json:"eventId,omitempty"`
1083
1084
1085
1086
1087
1088
1089 FailureCause string `json:"failureCause,omitempty"`
1090
1091
1092 Kind string `json:"kind,omitempty"`
1093
1094
1095
1096
1097
1098 ForceSendFields []string `json:"-"`
1099
1100
1101
1102
1103 NullFields []string `json:"-"`
1104 }
1105
1106 func (s *EventRecordFailure) MarshalJSON() ([]byte, error) {
1107 type NoMethod EventRecordFailure
1108 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1109 }
1110
1111
1112 type EventRecordRequest struct {
1113
1114
1115 CurrentTimeMillis int64 `json:"currentTimeMillis,omitempty,string"`
1116
1117
1118 Kind string `json:"kind,omitempty"`
1119
1120 RequestId int64 `json:"requestId,omitempty,string"`
1121
1122 TimePeriods []*EventPeriodUpdate `json:"timePeriods,omitempty"`
1123
1124
1125
1126
1127
1128 ForceSendFields []string `json:"-"`
1129
1130
1131
1132
1133 NullFields []string `json:"-"`
1134 }
1135
1136 func (s *EventRecordRequest) MarshalJSON() ([]byte, error) {
1137 type NoMethod EventRecordRequest
1138 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1139 }
1140
1141
1142 type EventUpdateRequest struct {
1143
1144 DefinitionId string `json:"definitionId,omitempty"`
1145
1146
1147 Kind string `json:"kind,omitempty"`
1148
1149 UpdateCount int64 `json:"updateCount,omitempty,string"`
1150
1151
1152
1153
1154
1155 ForceSendFields []string `json:"-"`
1156
1157
1158
1159
1160 NullFields []string `json:"-"`
1161 }
1162
1163 func (s *EventUpdateRequest) MarshalJSON() ([]byte, error) {
1164 type NoMethod EventUpdateRequest
1165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1166 }
1167
1168
1169 type EventUpdateResponse struct {
1170
1171 BatchFailures []*EventBatchRecordFailure `json:"batchFailures,omitempty"`
1172
1173 EventFailures []*EventRecordFailure `json:"eventFailures,omitempty"`
1174
1175
1176 Kind string `json:"kind,omitempty"`
1177
1178 PlayerEvents []*PlayerEvent `json:"playerEvents,omitempty"`
1179
1180
1181 googleapi.ServerResponse `json:"-"`
1182
1183
1184
1185
1186
1187 ForceSendFields []string `json:"-"`
1188
1189
1190
1191
1192 NullFields []string `json:"-"`
1193 }
1194
1195 func (s *EventUpdateResponse) MarshalJSON() ([]byte, error) {
1196 type NoMethod EventUpdateResponse
1197 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1198 }
1199
1200
1201
1202 type GamesAchievementIncrement struct {
1203
1204
1205 Kind string `json:"kind,omitempty"`
1206
1207 RequestId int64 `json:"requestId,omitempty,string"`
1208
1209 Steps int64 `json:"steps,omitempty"`
1210
1211
1212
1213
1214
1215 ForceSendFields []string `json:"-"`
1216
1217
1218
1219
1220 NullFields []string `json:"-"`
1221 }
1222
1223 func (s *GamesAchievementIncrement) MarshalJSON() ([]byte, error) {
1224 type NoMethod GamesAchievementIncrement
1225 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1226 }
1227
1228
1229
1230 type GamesAchievementSetStepsAtLeast struct {
1231
1232
1233 Kind string `json:"kind,omitempty"`
1234
1235 Steps int64 `json:"steps,omitempty"`
1236
1237
1238
1239
1240
1241 ForceSendFields []string `json:"-"`
1242
1243
1244
1245
1246 NullFields []string `json:"-"`
1247 }
1248
1249 func (s *GamesAchievementSetStepsAtLeast) MarshalJSON() ([]byte, error) {
1250 type NoMethod GamesAchievementSetStepsAtLeast
1251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1252 }
1253
1254
1255
1256 type GetMultipleApplicationPlayerIdsResponse struct {
1257
1258
1259
1260 PlayerIds []*ApplicationPlayerId `json:"playerIds,omitempty"`
1261
1262
1263 googleapi.ServerResponse `json:"-"`
1264
1265
1266
1267
1268
1269 ForceSendFields []string `json:"-"`
1270
1271
1272
1273
1274 NullFields []string `json:"-"`
1275 }
1276
1277 func (s *GetMultipleApplicationPlayerIdsResponse) MarshalJSON() ([]byte, error) {
1278 type NoMethod GetMultipleApplicationPlayerIdsResponse
1279 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1280 }
1281
1282
1283 type ImageAsset struct {
1284
1285 Height int64 `json:"height,omitempty"`
1286
1287
1288 Kind string `json:"kind,omitempty"`
1289
1290 Name string `json:"name,omitempty"`
1291
1292 Url string `json:"url,omitempty"`
1293
1294 Width int64 `json:"width,omitempty"`
1295
1296
1297
1298
1299
1300 ForceSendFields []string `json:"-"`
1301
1302
1303
1304
1305 NullFields []string `json:"-"`
1306 }
1307
1308 func (s *ImageAsset) MarshalJSON() ([]byte, error) {
1309 type NoMethod ImageAsset
1310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1311 }
1312
1313
1314 type Instance struct {
1315
1316 AcquisitionUri string `json:"acquisitionUri,omitempty"`
1317
1318 AndroidInstance *InstanceAndroidDetails `json:"androidInstance,omitempty"`
1319
1320 IosInstance *InstanceIosDetails `json:"iosInstance,omitempty"`
1321
1322
1323 Kind string `json:"kind,omitempty"`
1324
1325 Name string `json:"name,omitempty"`
1326
1327
1328
1329
1330
1331
1332 PlatformType string `json:"platformType,omitempty"`
1333
1334 RealtimePlay bool `json:"realtimePlay,omitempty"`
1335
1336 TurnBasedPlay bool `json:"turnBasedPlay,omitempty"`
1337
1338 WebInstance *InstanceWebDetails `json:"webInstance,omitempty"`
1339
1340
1341
1342
1343
1344 ForceSendFields []string `json:"-"`
1345
1346
1347
1348
1349 NullFields []string `json:"-"`
1350 }
1351
1352 func (s *Instance) MarshalJSON() ([]byte, error) {
1353 type NoMethod Instance
1354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1355 }
1356
1357
1358 type InstanceAndroidDetails struct {
1359
1360 EnablePiracyCheck bool `json:"enablePiracyCheck,omitempty"`
1361
1362
1363 Kind string `json:"kind,omitempty"`
1364
1365 PackageName string `json:"packageName,omitempty"`
1366
1367
1368 Preferred bool `json:"preferred,omitempty"`
1369
1370
1371
1372
1373
1374 ForceSendFields []string `json:"-"`
1375
1376
1377
1378
1379 NullFields []string `json:"-"`
1380 }
1381
1382 func (s *InstanceAndroidDetails) MarshalJSON() ([]byte, error) {
1383 type NoMethod InstanceAndroidDetails
1384 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1385 }
1386
1387
1388 type InstanceIosDetails struct {
1389
1390 BundleIdentifier string `json:"bundleIdentifier,omitempty"`
1391
1392 ItunesAppId string `json:"itunesAppId,omitempty"`
1393
1394
1395 Kind string `json:"kind,omitempty"`
1396
1397
1398 PreferredForIpad bool `json:"preferredForIpad,omitempty"`
1399
1400
1401 PreferredForIphone bool `json:"preferredForIphone,omitempty"`
1402
1403 SupportIpad bool `json:"supportIpad,omitempty"`
1404
1405 SupportIphone bool `json:"supportIphone,omitempty"`
1406
1407
1408
1409
1410
1411 ForceSendFields []string `json:"-"`
1412
1413
1414
1415
1416 NullFields []string `json:"-"`
1417 }
1418
1419 func (s *InstanceIosDetails) MarshalJSON() ([]byte, error) {
1420 type NoMethod InstanceIosDetails
1421 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1422 }
1423
1424
1425 type InstanceWebDetails struct {
1426
1427
1428 Kind string `json:"kind,omitempty"`
1429
1430 LaunchUrl string `json:"launchUrl,omitempty"`
1431
1432
1433 Preferred bool `json:"preferred,omitempty"`
1434
1435
1436
1437
1438
1439 ForceSendFields []string `json:"-"`
1440
1441
1442
1443
1444 NullFields []string `json:"-"`
1445 }
1446
1447 func (s *InstanceWebDetails) MarshalJSON() ([]byte, error) {
1448 type NoMethod InstanceWebDetails
1449 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1450 }
1451
1452
1453 type Leaderboard struct {
1454
1455 IconUrl string `json:"iconUrl,omitempty"`
1456
1457 Id string `json:"id,omitempty"`
1458
1459
1460 IsIconUrlDefault bool `json:"isIconUrlDefault,omitempty"`
1461
1462
1463 Kind string `json:"kind,omitempty"`
1464
1465 Name string `json:"name,omitempty"`
1466
1467
1468
1469
1470
1471
1472
1473 Order string `json:"order,omitempty"`
1474
1475
1476 googleapi.ServerResponse `json:"-"`
1477
1478
1479
1480
1481
1482 ForceSendFields []string `json:"-"`
1483
1484
1485
1486
1487 NullFields []string `json:"-"`
1488 }
1489
1490 func (s *Leaderboard) MarshalJSON() ([]byte, error) {
1491 type NoMethod Leaderboard
1492 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1493 }
1494
1495
1496 type LeaderboardEntry struct {
1497
1498 FormattedScore string `json:"formattedScore,omitempty"`
1499
1500
1501 FormattedScoreRank string `json:"formattedScoreRank,omitempty"`
1502
1503
1504 Kind string `json:"kind,omitempty"`
1505
1506 Player *Player `json:"player,omitempty"`
1507
1508 ScoreRank int64 `json:"scoreRank,omitempty,string"`
1509
1510
1511 ScoreTag string `json:"scoreTag,omitempty"`
1512
1513 ScoreValue int64 `json:"scoreValue,omitempty,string"`
1514
1515
1516
1517
1518
1519
1520 TimeSpan string `json:"timeSpan,omitempty"`
1521
1522
1523 WriteTimestampMillis int64 `json:"writeTimestampMillis,omitempty,string"`
1524
1525
1526
1527
1528
1529 ForceSendFields []string `json:"-"`
1530
1531
1532
1533
1534 NullFields []string `json:"-"`
1535 }
1536
1537 func (s *LeaderboardEntry) MarshalJSON() ([]byte, error) {
1538 type NoMethod LeaderboardEntry
1539 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1540 }
1541
1542
1543 type LeaderboardListResponse struct {
1544
1545 Items []*Leaderboard `json:"items,omitempty"`
1546
1547
1548 Kind string `json:"kind,omitempty"`
1549
1550 NextPageToken string `json:"nextPageToken,omitempty"`
1551
1552
1553 googleapi.ServerResponse `json:"-"`
1554
1555
1556
1557
1558
1559 ForceSendFields []string `json:"-"`
1560
1561
1562
1563
1564 NullFields []string `json:"-"`
1565 }
1566
1567 func (s *LeaderboardListResponse) MarshalJSON() ([]byte, error) {
1568 type NoMethod LeaderboardListResponse
1569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1570 }
1571
1572
1573 type LeaderboardScoreRank struct {
1574
1575 FormattedNumScores string `json:"formattedNumScores,omitempty"`
1576
1577 FormattedRank string `json:"formattedRank,omitempty"`
1578
1579
1580 Kind string `json:"kind,omitempty"`
1581
1582 NumScores int64 `json:"numScores,omitempty,string"`
1583
1584 Rank int64 `json:"rank,omitempty,string"`
1585
1586
1587
1588
1589
1590 ForceSendFields []string `json:"-"`
1591
1592
1593
1594
1595 NullFields []string `json:"-"`
1596 }
1597
1598 func (s *LeaderboardScoreRank) MarshalJSON() ([]byte, error) {
1599 type NoMethod LeaderboardScoreRank
1600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1601 }
1602
1603
1604 type LeaderboardScores struct {
1605
1606 Items []*LeaderboardEntry `json:"items,omitempty"`
1607
1608
1609 Kind string `json:"kind,omitempty"`
1610
1611 NextPageToken string `json:"nextPageToken,omitempty"`
1612
1613 NumScores int64 `json:"numScores,omitempty,string"`
1614
1615
1616
1617
1618
1619 PlayerScore *LeaderboardEntry `json:"playerScore,omitempty"`
1620
1621 PrevPageToken string `json:"prevPageToken,omitempty"`
1622
1623
1624 googleapi.ServerResponse `json:"-"`
1625
1626
1627
1628
1629
1630 ForceSendFields []string `json:"-"`
1631
1632
1633
1634
1635 NullFields []string `json:"-"`
1636 }
1637
1638 func (s *LeaderboardScores) MarshalJSON() ([]byte, error) {
1639 type NoMethod LeaderboardScores
1640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1641 }
1642
1643
1644
1645 type LinkPersonaRequest struct {
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662 CardinalityConstraint string `json:"cardinalityConstraint,omitempty"`
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688 ConflictingLinksResolutionPolicy string `json:"conflictingLinksResolutionPolicy,omitempty"`
1689
1690 ExpireTime string `json:"expireTime,omitempty"`
1691
1692
1693 Persona string `json:"persona,omitempty"`
1694
1695
1696
1697 SessionId string `json:"sessionId,omitempty"`
1698
1699
1700 Token string `json:"token,omitempty"`
1701
1702 Ttl string `json:"ttl,omitempty"`
1703
1704
1705
1706
1707
1708 ForceSendFields []string `json:"-"`
1709
1710
1711
1712
1713 NullFields []string `json:"-"`
1714 }
1715
1716 func (s *LinkPersonaRequest) MarshalJSON() ([]byte, error) {
1717 type NoMethod LinkPersonaRequest
1718 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1719 }
1720
1721
1722 type LinkPersonaResponse struct {
1723
1724
1725
1726
1727
1728
1729
1730 State string `json:"state,omitempty"`
1731
1732
1733 googleapi.ServerResponse `json:"-"`
1734
1735
1736
1737
1738
1739 ForceSendFields []string `json:"-"`
1740
1741
1742
1743
1744 NullFields []string `json:"-"`
1745 }
1746
1747 func (s *LinkPersonaResponse) MarshalJSON() ([]byte, error) {
1748 type NoMethod LinkPersonaResponse
1749 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1750 }
1751
1752
1753 type MetagameConfig struct {
1754
1755
1756 CurrentVersion int64 `json:"currentVersion,omitempty"`
1757
1758
1759 Kind string `json:"kind,omitempty"`
1760
1761 PlayerLevels []*PlayerLevel `json:"playerLevels,omitempty"`
1762
1763
1764 googleapi.ServerResponse `json:"-"`
1765
1766
1767
1768
1769
1770 ForceSendFields []string `json:"-"`
1771
1772
1773
1774
1775 NullFields []string `json:"-"`
1776 }
1777
1778 func (s *MetagameConfig) MarshalJSON() ([]byte, error) {
1779 type NoMethod MetagameConfig
1780 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1781 }
1782
1783
1784 type Player struct {
1785
1786 AvatarImageUrl string `json:"avatarImageUrl,omitempty"`
1787
1788 BannerUrlLandscape string `json:"bannerUrlLandscape,omitempty"`
1789
1790 BannerUrlPortrait string `json:"bannerUrlPortrait,omitempty"`
1791
1792 DisplayName string `json:"displayName,omitempty"`
1793
1794
1795 ExperienceInfo *PlayerExperienceInfo `json:"experienceInfo,omitempty"`
1796
1797
1798
1799
1800
1801
1802
1803 FriendStatus string `json:"friendStatus,omitempty"`
1804
1805 GamePlayerId string `json:"gamePlayerId,omitempty"`
1806
1807
1808 Kind string `json:"kind,omitempty"`
1809
1810 Name *PlayerName `json:"name,omitempty"`
1811
1812
1813
1814
1815 OriginalPlayerId string `json:"originalPlayerId,omitempty"`
1816
1817 PlayerId string `json:"playerId,omitempty"`
1818
1819
1820 ProfileSettings *ProfileSettings `json:"profileSettings,omitempty"`
1821
1822 Title string `json:"title,omitempty"`
1823
1824
1825 googleapi.ServerResponse `json:"-"`
1826
1827
1828
1829
1830
1831 ForceSendFields []string `json:"-"`
1832
1833
1834
1835
1836 NullFields []string `json:"-"`
1837 }
1838
1839 func (s *Player) MarshalJSON() ([]byte, error) {
1840 type NoMethod Player
1841 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1842 }
1843
1844
1845 type PlayerName struct {
1846
1847
1848 FamilyName string `json:"familyName,omitempty"`
1849
1850
1851 GivenName string `json:"givenName,omitempty"`
1852
1853
1854
1855
1856
1857 ForceSendFields []string `json:"-"`
1858
1859
1860
1861
1862 NullFields []string `json:"-"`
1863 }
1864
1865 func (s *PlayerName) MarshalJSON() ([]byte, error) {
1866 type NoMethod PlayerName
1867 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1868 }
1869
1870
1871 type PlayerAchievement struct {
1872
1873
1874
1875
1876
1877
1878 AchievementState string `json:"achievementState,omitempty"`
1879
1880 CurrentSteps int64 `json:"currentSteps,omitempty"`
1881
1882
1883
1884 ExperiencePoints int64 `json:"experiencePoints,omitempty,string"`
1885
1886
1887 FormattedCurrentStepsString string `json:"formattedCurrentStepsString,omitempty"`
1888
1889 Id string `json:"id,omitempty"`
1890
1891
1892 Kind string `json:"kind,omitempty"`
1893
1894
1895 LastUpdatedTimestamp int64 `json:"lastUpdatedTimestamp,omitempty,string"`
1896
1897
1898
1899
1900
1901 ForceSendFields []string `json:"-"`
1902
1903
1904
1905
1906 NullFields []string `json:"-"`
1907 }
1908
1909 func (s *PlayerAchievement) MarshalJSON() ([]byte, error) {
1910 type NoMethod PlayerAchievement
1911 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1912 }
1913
1914
1915 type PlayerAchievementListResponse struct {
1916
1917 Items []*PlayerAchievement `json:"items,omitempty"`
1918
1919
1920 Kind string `json:"kind,omitempty"`
1921
1922 NextPageToken string `json:"nextPageToken,omitempty"`
1923
1924
1925 googleapi.ServerResponse `json:"-"`
1926
1927
1928
1929
1930
1931 ForceSendFields []string `json:"-"`
1932
1933
1934
1935
1936 NullFields []string `json:"-"`
1937 }
1938
1939 func (s *PlayerAchievementListResponse) MarshalJSON() ([]byte, error) {
1940 type NoMethod PlayerAchievementListResponse
1941 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1942 }
1943
1944
1945 type PlayerEvent struct {
1946
1947 DefinitionId string `json:"definitionId,omitempty"`
1948
1949
1950
1951 FormattedNumEvents string `json:"formattedNumEvents,omitempty"`
1952
1953
1954 Kind string `json:"kind,omitempty"`
1955
1956 NumEvents int64 `json:"numEvents,omitempty,string"`
1957
1958 PlayerId string `json:"playerId,omitempty"`
1959
1960
1961
1962
1963
1964 ForceSendFields []string `json:"-"`
1965
1966
1967
1968
1969 NullFields []string `json:"-"`
1970 }
1971
1972 func (s *PlayerEvent) MarshalJSON() ([]byte, error) {
1973 type NoMethod PlayerEvent
1974 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1975 }
1976
1977
1978 type PlayerEventListResponse struct {
1979
1980 Items []*PlayerEvent `json:"items,omitempty"`
1981
1982
1983 Kind string `json:"kind,omitempty"`
1984
1985 NextPageToken string `json:"nextPageToken,omitempty"`
1986
1987
1988 googleapi.ServerResponse `json:"-"`
1989
1990
1991
1992
1993
1994 ForceSendFields []string `json:"-"`
1995
1996
1997
1998
1999 NullFields []string `json:"-"`
2000 }
2001
2002 func (s *PlayerEventListResponse) MarshalJSON() ([]byte, error) {
2003 type NoMethod PlayerEventListResponse
2004 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2005 }
2006
2007
2008 type PlayerExperienceInfo struct {
2009
2010
2011 CurrentExperiencePoints int64 `json:"currentExperiencePoints,omitempty,string"`
2012
2013 CurrentLevel *PlayerLevel `json:"currentLevel,omitempty"`
2014
2015
2016 Kind string `json:"kind,omitempty"`
2017
2018
2019 LastLevelUpTimestampMillis int64 `json:"lastLevelUpTimestampMillis,omitempty,string"`
2020
2021
2022 NextLevel *PlayerLevel `json:"nextLevel,omitempty"`
2023
2024
2025
2026
2027
2028 ForceSendFields []string `json:"-"`
2029
2030
2031
2032
2033 NullFields []string `json:"-"`
2034 }
2035
2036 func (s *PlayerExperienceInfo) MarshalJSON() ([]byte, error) {
2037 type NoMethod PlayerExperienceInfo
2038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2039 }
2040
2041
2042 type PlayerLeaderboardScore struct {
2043
2044
2045 FriendsRank *LeaderboardScoreRank `json:"friendsRank,omitempty"`
2046
2047
2048 Kind string `json:"kind,omitempty"`
2049
2050 LeaderboardId string `json:"leaderboard_id,omitempty"`
2051
2052
2053 PublicRank *LeaderboardScoreRank `json:"publicRank,omitempty"`
2054
2055 ScoreString string `json:"scoreString,omitempty"`
2056
2057
2058 ScoreTag string `json:"scoreTag,omitempty"`
2059
2060 ScoreValue int64 `json:"scoreValue,omitempty,string"`
2061
2062 SocialRank *LeaderboardScoreRank `json:"socialRank,omitempty"`
2063
2064
2065
2066
2067
2068
2069 TimeSpan string `json:"timeSpan,omitempty"`
2070
2071
2072 WriteTimestamp int64 `json:"writeTimestamp,omitempty,string"`
2073
2074
2075
2076
2077
2078 ForceSendFields []string `json:"-"`
2079
2080
2081
2082
2083 NullFields []string `json:"-"`
2084 }
2085
2086 func (s *PlayerLeaderboardScore) MarshalJSON() ([]byte, error) {
2087 type NoMethod PlayerLeaderboardScore
2088 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2089 }
2090
2091
2092 type PlayerLeaderboardScoreListResponse struct {
2093
2094 Items []*PlayerLeaderboardScore `json:"items,omitempty"`
2095
2096
2097 Kind string `json:"kind,omitempty"`
2098
2099 NextPageToken string `json:"nextPageToken,omitempty"`
2100
2101 Player *Player `json:"player,omitempty"`
2102
2103
2104 googleapi.ServerResponse `json:"-"`
2105
2106
2107
2108
2109
2110 ForceSendFields []string `json:"-"`
2111
2112
2113
2114
2115 NullFields []string `json:"-"`
2116 }
2117
2118 func (s *PlayerLeaderboardScoreListResponse) MarshalJSON() ([]byte, error) {
2119 type NoMethod PlayerLeaderboardScoreListResponse
2120 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2121 }
2122
2123
2124 type PlayerLevel struct {
2125
2126
2127 Kind string `json:"kind,omitempty"`
2128
2129 Level int64 `json:"level,omitempty"`
2130
2131 MaxExperiencePoints int64 `json:"maxExperiencePoints,omitempty,string"`
2132
2133 MinExperiencePoints int64 `json:"minExperiencePoints,omitempty,string"`
2134
2135
2136
2137
2138
2139 ForceSendFields []string `json:"-"`
2140
2141
2142
2143
2144 NullFields []string `json:"-"`
2145 }
2146
2147 func (s *PlayerLevel) MarshalJSON() ([]byte, error) {
2148 type NoMethod PlayerLevel
2149 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2150 }
2151
2152
2153 type PlayerListResponse struct {
2154
2155 Items []*Player `json:"items,omitempty"`
2156
2157
2158 Kind string `json:"kind,omitempty"`
2159
2160 NextPageToken string `json:"nextPageToken,omitempty"`
2161
2162
2163 googleapi.ServerResponse `json:"-"`
2164
2165
2166
2167
2168
2169 ForceSendFields []string `json:"-"`
2170
2171
2172
2173
2174 NullFields []string `json:"-"`
2175 }
2176
2177 func (s *PlayerListResponse) MarshalJSON() ([]byte, error) {
2178 type NoMethod PlayerListResponse
2179 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2180 }
2181
2182
2183 type PlayerScore struct {
2184
2185 FormattedScore string `json:"formattedScore,omitempty"`
2186
2187
2188 Kind string `json:"kind,omitempty"`
2189
2190 Score int64 `json:"score,omitempty,string"`
2191
2192
2193 ScoreTag string `json:"scoreTag,omitempty"`
2194
2195
2196
2197
2198
2199
2200 TimeSpan string `json:"timeSpan,omitempty"`
2201
2202
2203
2204
2205
2206 ForceSendFields []string `json:"-"`
2207
2208
2209
2210
2211 NullFields []string `json:"-"`
2212 }
2213
2214 func (s *PlayerScore) MarshalJSON() ([]byte, error) {
2215 type NoMethod PlayerScore
2216 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2217 }
2218
2219
2220 type PlayerScoreListResponse struct {
2221
2222
2223 Kind string `json:"kind,omitempty"`
2224
2225 SubmittedScores []*PlayerScoreResponse `json:"submittedScores,omitempty"`
2226
2227
2228 googleapi.ServerResponse `json:"-"`
2229
2230
2231
2232
2233
2234 ForceSendFields []string `json:"-"`
2235
2236
2237
2238
2239 NullFields []string `json:"-"`
2240 }
2241
2242 func (s *PlayerScoreListResponse) MarshalJSON() ([]byte, error) {
2243 type NoMethod PlayerScoreListResponse
2244 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2245 }
2246
2247
2248 type PlayerScoreResponse struct {
2249
2250
2251
2252
2253
2254
2255
2256 BeatenScoreTimeSpans []string `json:"beatenScoreTimeSpans,omitempty"`
2257
2258 FormattedScore string `json:"formattedScore,omitempty"`
2259
2260
2261 Kind string `json:"kind,omitempty"`
2262
2263 LeaderboardId string `json:"leaderboardId,omitempty"`
2264
2265
2266 ScoreTag string `json:"scoreTag,omitempty"`
2267
2268
2269
2270
2271 UnbeatenScores []*PlayerScore `json:"unbeatenScores,omitempty"`
2272
2273
2274 googleapi.ServerResponse `json:"-"`
2275
2276
2277
2278
2279
2280 ForceSendFields []string `json:"-"`
2281
2282
2283
2284
2285 NullFields []string `json:"-"`
2286 }
2287
2288 func (s *PlayerScoreResponse) MarshalJSON() ([]byte, error) {
2289 type NoMethod PlayerScoreResponse
2290 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2291 }
2292
2293
2294 type PlayerScoreSubmissionList struct {
2295
2296
2297 Kind string `json:"kind,omitempty"`
2298
2299 Scores []*ScoreSubmission `json:"scores,omitempty"`
2300
2301
2302
2303
2304
2305 ForceSendFields []string `json:"-"`
2306
2307
2308
2309
2310 NullFields []string `json:"-"`
2311 }
2312
2313 func (s *PlayerScoreSubmissionList) MarshalJSON() ([]byte, error) {
2314 type NoMethod PlayerScoreSubmissionList
2315 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2316 }
2317
2318
2319 type ProfileSettings struct {
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329 FriendsListVisibility string `json:"friendsListVisibility,omitempty"`
2330
2331
2332 Kind string `json:"kind,omitempty"`
2333
2334
2335 ProfileVisible bool `json:"profileVisible,omitempty"`
2336
2337
2338
2339
2340
2341 ForceSendFields []string `json:"-"`
2342
2343
2344
2345
2346 NullFields []string `json:"-"`
2347 }
2348
2349 func (s *ProfileSettings) MarshalJSON() ([]byte, error) {
2350 type NoMethod ProfileSettings
2351 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2352 }
2353
2354
2355 type RecallToken struct {
2356
2357 ExpireTime string `json:"expireTime,omitempty"`
2358
2359
2360 MultiPlayerPersona bool `json:"multiPlayerPersona,omitempty"`
2361
2362
2363 Token string `json:"token,omitempty"`
2364
2365
2366
2367
2368
2369 ForceSendFields []string `json:"-"`
2370
2371
2372
2373
2374 NullFields []string `json:"-"`
2375 }
2376
2377 func (s *RecallToken) MarshalJSON() ([]byte, error) {
2378 type NoMethod RecallToken
2379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2380 }
2381
2382
2383
2384 type ResetPersonaRequest struct {
2385
2386
2387 Persona string `json:"persona,omitempty"`
2388
2389
2390
2391
2392
2393 ForceSendFields []string `json:"-"`
2394
2395
2396
2397
2398 NullFields []string `json:"-"`
2399 }
2400
2401 func (s *ResetPersonaRequest) MarshalJSON() ([]byte, error) {
2402 type NoMethod ResetPersonaRequest
2403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2404 }
2405
2406
2407 type ResetPersonaResponse struct {
2408
2409
2410 Unlinked bool `json:"unlinked,omitempty"`
2411
2412
2413 googleapi.ServerResponse `json:"-"`
2414
2415
2416
2417
2418
2419 ForceSendFields []string `json:"-"`
2420
2421
2422
2423
2424 NullFields []string `json:"-"`
2425 }
2426
2427 func (s *ResetPersonaResponse) MarshalJSON() ([]byte, error) {
2428 type NoMethod ResetPersonaResponse
2429 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2430 }
2431
2432
2433
2434 type RetrieveDeveloperGamesLastPlayerTokenResponse struct {
2435
2436
2437
2438 Token *RecallToken `json:"token,omitempty"`
2439
2440
2441 googleapi.ServerResponse `json:"-"`
2442
2443
2444
2445
2446
2447 ForceSendFields []string `json:"-"`
2448
2449
2450
2451
2452 NullFields []string `json:"-"`
2453 }
2454
2455 func (s *RetrieveDeveloperGamesLastPlayerTokenResponse) MarshalJSON() ([]byte, error) {
2456 type NoMethod RetrieveDeveloperGamesLastPlayerTokenResponse
2457 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2458 }
2459
2460
2461 type RetrievePlayerTokensResponse struct {
2462
2463
2464 Tokens []*RecallToken `json:"tokens,omitempty"`
2465
2466
2467 googleapi.ServerResponse `json:"-"`
2468
2469
2470
2471
2472
2473 ForceSendFields []string `json:"-"`
2474
2475
2476
2477
2478 NullFields []string `json:"-"`
2479 }
2480
2481 func (s *RetrievePlayerTokensResponse) MarshalJSON() ([]byte, error) {
2482 type NoMethod RetrievePlayerTokensResponse
2483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2484 }
2485
2486
2487 type RevisionCheckResponse struct {
2488
2489
2490 ApiVersion string `json:"apiVersion,omitempty"`
2491
2492
2493 Kind string `json:"kind,omitempty"`
2494
2495
2496
2497
2498
2499
2500
2501
2502 RevisionStatus string `json:"revisionStatus,omitempty"`
2503
2504
2505 googleapi.ServerResponse `json:"-"`
2506
2507
2508
2509
2510
2511 ForceSendFields []string `json:"-"`
2512
2513
2514
2515
2516 NullFields []string `json:"-"`
2517 }
2518
2519 func (s *RevisionCheckResponse) MarshalJSON() ([]byte, error) {
2520 type NoMethod RevisionCheckResponse
2521 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2522 }
2523
2524
2525 type ScopedPlayerIds struct {
2526
2527
2528
2529
2530
2531 DeveloperPlayerKey string `json:"developerPlayerKey,omitempty"`
2532
2533
2534 GamePlayerId string `json:"gamePlayerId,omitempty"`
2535
2536
2537 googleapi.ServerResponse `json:"-"`
2538
2539
2540
2541
2542
2543 ForceSendFields []string `json:"-"`
2544
2545
2546
2547
2548 NullFields []string `json:"-"`
2549 }
2550
2551 func (s *ScopedPlayerIds) MarshalJSON() ([]byte, error) {
2552 type NoMethod ScopedPlayerIds
2553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2554 }
2555
2556
2557 type ScoreSubmission struct {
2558
2559
2560 Kind string `json:"kind,omitempty"`
2561
2562 LeaderboardId string `json:"leaderboardId,omitempty"`
2563
2564 Score int64 `json:"score,omitempty,string"`
2565
2566
2567 ScoreTag string `json:"scoreTag,omitempty"`
2568
2569
2570 Signature string `json:"signature,omitempty"`
2571
2572
2573
2574
2575
2576 ForceSendFields []string `json:"-"`
2577
2578
2579
2580
2581 NullFields []string `json:"-"`
2582 }
2583
2584 func (s *ScoreSubmission) MarshalJSON() ([]byte, error) {
2585 type NoMethod ScoreSubmission
2586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2587 }
2588
2589
2590 type Snapshot struct {
2591
2592
2593 CoverImage *SnapshotImage `json:"coverImage,omitempty"`
2594
2595 Description string `json:"description,omitempty"`
2596
2597
2598
2599 DriveId string `json:"driveId,omitempty"`
2600
2601 DurationMillis int64 `json:"durationMillis,omitempty,string"`
2602
2603 Id string `json:"id,omitempty"`
2604
2605
2606 Kind string `json:"kind,omitempty"`
2607
2608
2609 LastModifiedMillis int64 `json:"lastModifiedMillis,omitempty,string"`
2610
2611
2612 ProgressValue int64 `json:"progressValue,omitempty,string"`
2613
2614 Title string `json:"title,omitempty"`
2615
2616
2617
2618
2619 Type string `json:"type,omitempty"`
2620
2621 UniqueName string `json:"uniqueName,omitempty"`
2622
2623
2624 googleapi.ServerResponse `json:"-"`
2625
2626
2627
2628
2629
2630 ForceSendFields []string `json:"-"`
2631
2632
2633
2634
2635 NullFields []string `json:"-"`
2636 }
2637
2638 func (s *Snapshot) MarshalJSON() ([]byte, error) {
2639 type NoMethod Snapshot
2640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2641 }
2642
2643
2644 type SnapshotImage struct {
2645
2646 Height int64 `json:"height,omitempty"`
2647
2648
2649 Kind string `json:"kind,omitempty"`
2650
2651 MimeType string `json:"mime_type,omitempty"`
2652
2653
2654 Url string `json:"url,omitempty"`
2655
2656 Width int64 `json:"width,omitempty"`
2657
2658
2659
2660
2661
2662 ForceSendFields []string `json:"-"`
2663
2664
2665
2666
2667 NullFields []string `json:"-"`
2668 }
2669
2670 func (s *SnapshotImage) MarshalJSON() ([]byte, error) {
2671 type NoMethod SnapshotImage
2672 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2673 }
2674
2675
2676 type SnapshotListResponse struct {
2677
2678 Items []*Snapshot `json:"items,omitempty"`
2679
2680
2681 Kind string `json:"kind,omitempty"`
2682
2683
2684 NextPageToken string `json:"nextPageToken,omitempty"`
2685
2686
2687 googleapi.ServerResponse `json:"-"`
2688
2689
2690
2691
2692
2693 ForceSendFields []string `json:"-"`
2694
2695
2696
2697
2698 NullFields []string `json:"-"`
2699 }
2700
2701 func (s *SnapshotListResponse) MarshalJSON() ([]byte, error) {
2702 type NoMethod SnapshotListResponse
2703 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2704 }
2705
2706
2707 type StatsResponse struct {
2708
2709
2710 AvgSessionLengthMinutes float64 `json:"avg_session_length_minutes,omitempty"`
2711
2712
2713
2714 ChurnProbability float64 `json:"churn_probability,omitempty"`
2715
2716
2717 DaysSinceLastPlayed int64 `json:"days_since_last_played,omitempty"`
2718
2719
2720
2721 HighSpenderProbability float64 `json:"high_spender_probability,omitempty"`
2722
2723
2724 Kind string `json:"kind,omitempty"`
2725
2726
2727 NumPurchases int64 `json:"num_purchases,omitempty"`
2728
2729
2730
2731
2732 NumSessions int64 `json:"num_sessions,omitempty"`
2733
2734
2735
2736
2737 NumSessionsPercentile float64 `json:"num_sessions_percentile,omitempty"`
2738
2739
2740
2741 SpendPercentile float64 `json:"spend_percentile,omitempty"`
2742
2743
2744
2745 SpendProbability float64 `json:"spend_probability,omitempty"`
2746
2747
2748
2749 TotalSpendNext28Days float64 `json:"total_spend_next_28_days,omitempty"`
2750
2751
2752 googleapi.ServerResponse `json:"-"`
2753
2754
2755
2756
2757
2758 ForceSendFields []string `json:"-"`
2759
2760
2761
2762
2763 NullFields []string `json:"-"`
2764 }
2765
2766 func (s *StatsResponse) MarshalJSON() ([]byte, error) {
2767 type NoMethod StatsResponse
2768 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2769 }
2770
2771 func (s *StatsResponse) UnmarshalJSON(data []byte) error {
2772 type NoMethod StatsResponse
2773 var s1 struct {
2774 AvgSessionLengthMinutes gensupport.JSONFloat64 `json:"avg_session_length_minutes"`
2775 ChurnProbability gensupport.JSONFloat64 `json:"churn_probability"`
2776 HighSpenderProbability gensupport.JSONFloat64 `json:"high_spender_probability"`
2777 NumSessionsPercentile gensupport.JSONFloat64 `json:"num_sessions_percentile"`
2778 SpendPercentile gensupport.JSONFloat64 `json:"spend_percentile"`
2779 SpendProbability gensupport.JSONFloat64 `json:"spend_probability"`
2780 TotalSpendNext28Days gensupport.JSONFloat64 `json:"total_spend_next_28_days"`
2781 *NoMethod
2782 }
2783 s1.NoMethod = (*NoMethod)(s)
2784 if err := json.Unmarshal(data, &s1); err != nil {
2785 return err
2786 }
2787 s.AvgSessionLengthMinutes = float64(s1.AvgSessionLengthMinutes)
2788 s.ChurnProbability = float64(s1.ChurnProbability)
2789 s.HighSpenderProbability = float64(s1.HighSpenderProbability)
2790 s.NumSessionsPercentile = float64(s1.NumSessionsPercentile)
2791 s.SpendPercentile = float64(s1.SpendPercentile)
2792 s.SpendProbability = float64(s1.SpendProbability)
2793 s.TotalSpendNext28Days = float64(s1.TotalSpendNext28Days)
2794 return nil
2795 }
2796
2797
2798
2799 type UnlinkPersonaRequest struct {
2800
2801
2802 Persona string `json:"persona,omitempty"`
2803
2804
2805
2806 SessionId string `json:"sessionId,omitempty"`
2807
2808
2809 Token string `json:"token,omitempty"`
2810
2811
2812
2813
2814
2815 ForceSendFields []string `json:"-"`
2816
2817
2818
2819
2820 NullFields []string `json:"-"`
2821 }
2822
2823 func (s *UnlinkPersonaRequest) MarshalJSON() ([]byte, error) {
2824 type NoMethod UnlinkPersonaRequest
2825 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2826 }
2827
2828
2829 type UnlinkPersonaResponse struct {
2830
2831
2832
2833 Unlinked bool `json:"unlinked,omitempty"`
2834
2835
2836 googleapi.ServerResponse `json:"-"`
2837
2838
2839
2840
2841
2842 ForceSendFields []string `json:"-"`
2843
2844
2845
2846
2847 NullFields []string `json:"-"`
2848 }
2849
2850 func (s *UnlinkPersonaResponse) MarshalJSON() ([]byte, error) {
2851 type NoMethod UnlinkPersonaResponse
2852 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2853 }
2854
2855 type AchievementDefinitionsListCall struct {
2856 s *Service
2857 urlParams_ gensupport.URLParams
2858 ifNoneMatch_ string
2859 ctx_ context.Context
2860 header_ http.Header
2861 }
2862
2863
2864 func (r *AchievementDefinitionsService) List() *AchievementDefinitionsListCall {
2865 c := &AchievementDefinitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2866 return c
2867 }
2868
2869
2870
2871 func (c *AchievementDefinitionsListCall) Language(language string) *AchievementDefinitionsListCall {
2872 c.urlParams_.Set("language", language)
2873 return c
2874 }
2875
2876
2877
2878
2879
2880 func (c *AchievementDefinitionsListCall) MaxResults(maxResults int64) *AchievementDefinitionsListCall {
2881 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
2882 return c
2883 }
2884
2885
2886
2887 func (c *AchievementDefinitionsListCall) PageToken(pageToken string) *AchievementDefinitionsListCall {
2888 c.urlParams_.Set("pageToken", pageToken)
2889 return c
2890 }
2891
2892
2893
2894
2895 func (c *AchievementDefinitionsListCall) Fields(s ...googleapi.Field) *AchievementDefinitionsListCall {
2896 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2897 return c
2898 }
2899
2900
2901
2902
2903 func (c *AchievementDefinitionsListCall) IfNoneMatch(entityTag string) *AchievementDefinitionsListCall {
2904 c.ifNoneMatch_ = entityTag
2905 return c
2906 }
2907
2908
2909 func (c *AchievementDefinitionsListCall) Context(ctx context.Context) *AchievementDefinitionsListCall {
2910 c.ctx_ = ctx
2911 return c
2912 }
2913
2914
2915
2916 func (c *AchievementDefinitionsListCall) Header() http.Header {
2917 if c.header_ == nil {
2918 c.header_ = make(http.Header)
2919 }
2920 return c.header_
2921 }
2922
2923 func (c *AchievementDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
2924 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2925 if c.ifNoneMatch_ != "" {
2926 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2927 }
2928 var body io.Reader = nil
2929 c.urlParams_.Set("alt", alt)
2930 c.urlParams_.Set("prettyPrint", "false")
2931 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements")
2932 urls += "?" + c.urlParams_.Encode()
2933 req, err := http.NewRequest("GET", urls, body)
2934 if err != nil {
2935 return nil, err
2936 }
2937 req.Header = reqHeaders
2938 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2939 }
2940
2941
2942
2943
2944
2945
2946
2947 func (c *AchievementDefinitionsListCall) Do(opts ...googleapi.CallOption) (*AchievementDefinitionsListResponse, error) {
2948 gensupport.SetOptions(c.urlParams_, opts...)
2949 res, err := c.doRequest("json")
2950 if res != nil && res.StatusCode == http.StatusNotModified {
2951 if res.Body != nil {
2952 res.Body.Close()
2953 }
2954 return nil, gensupport.WrapError(&googleapi.Error{
2955 Code: res.StatusCode,
2956 Header: res.Header,
2957 })
2958 }
2959 if err != nil {
2960 return nil, err
2961 }
2962 defer googleapi.CloseBody(res)
2963 if err := googleapi.CheckResponse(res); err != nil {
2964 return nil, gensupport.WrapError(err)
2965 }
2966 ret := &AchievementDefinitionsListResponse{
2967 ServerResponse: googleapi.ServerResponse{
2968 Header: res.Header,
2969 HTTPStatusCode: res.StatusCode,
2970 },
2971 }
2972 target := &ret
2973 if err := gensupport.DecodeResponse(target, res); err != nil {
2974 return nil, err
2975 }
2976 return ret, nil
2977 }
2978
2979
2980
2981
2982 func (c *AchievementDefinitionsListCall) Pages(ctx context.Context, f func(*AchievementDefinitionsListResponse) error) error {
2983 c.ctx_ = ctx
2984 defer c.PageToken(c.urlParams_.Get("pageToken"))
2985 for {
2986 x, err := c.Do()
2987 if err != nil {
2988 return err
2989 }
2990 if err := f(x); err != nil {
2991 return err
2992 }
2993 if x.NextPageToken == "" {
2994 return nil
2995 }
2996 c.PageToken(x.NextPageToken)
2997 }
2998 }
2999
3000 type AchievementsIncrementCall struct {
3001 s *Service
3002 achievementId string
3003 urlParams_ gensupport.URLParams
3004 ctx_ context.Context
3005 header_ http.Header
3006 }
3007
3008
3009
3010
3011
3012
3013 func (r *AchievementsService) Increment(achievementId string, stepsToIncrement int64) *AchievementsIncrementCall {
3014 c := &AchievementsIncrementCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3015 c.achievementId = achievementId
3016 c.urlParams_.Set("stepsToIncrement", fmt.Sprint(stepsToIncrement))
3017 return c
3018 }
3019
3020
3021
3022
3023 func (c *AchievementsIncrementCall) RequestId(requestId int64) *AchievementsIncrementCall {
3024 c.urlParams_.Set("requestId", fmt.Sprint(requestId))
3025 return c
3026 }
3027
3028
3029
3030
3031 func (c *AchievementsIncrementCall) Fields(s ...googleapi.Field) *AchievementsIncrementCall {
3032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3033 return c
3034 }
3035
3036
3037 func (c *AchievementsIncrementCall) Context(ctx context.Context) *AchievementsIncrementCall {
3038 c.ctx_ = ctx
3039 return c
3040 }
3041
3042
3043
3044 func (c *AchievementsIncrementCall) Header() http.Header {
3045 if c.header_ == nil {
3046 c.header_ = make(http.Header)
3047 }
3048 return c.header_
3049 }
3050
3051 func (c *AchievementsIncrementCall) doRequest(alt string) (*http.Response, error) {
3052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3053 var body io.Reader = nil
3054 c.urlParams_.Set("alt", alt)
3055 c.urlParams_.Set("prettyPrint", "false")
3056 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/increment")
3057 urls += "?" + c.urlParams_.Encode()
3058 req, err := http.NewRequest("POST", urls, body)
3059 if err != nil {
3060 return nil, err
3061 }
3062 req.Header = reqHeaders
3063 googleapi.Expand(req.URL, map[string]string{
3064 "achievementId": c.achievementId,
3065 })
3066 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3067 }
3068
3069
3070
3071
3072
3073
3074
3075 func (c *AchievementsIncrementCall) Do(opts ...googleapi.CallOption) (*AchievementIncrementResponse, error) {
3076 gensupport.SetOptions(c.urlParams_, opts...)
3077 res, err := c.doRequest("json")
3078 if res != nil && res.StatusCode == http.StatusNotModified {
3079 if res.Body != nil {
3080 res.Body.Close()
3081 }
3082 return nil, gensupport.WrapError(&googleapi.Error{
3083 Code: res.StatusCode,
3084 Header: res.Header,
3085 })
3086 }
3087 if err != nil {
3088 return nil, err
3089 }
3090 defer googleapi.CloseBody(res)
3091 if err := googleapi.CheckResponse(res); err != nil {
3092 return nil, gensupport.WrapError(err)
3093 }
3094 ret := &AchievementIncrementResponse{
3095 ServerResponse: googleapi.ServerResponse{
3096 Header: res.Header,
3097 HTTPStatusCode: res.StatusCode,
3098 },
3099 }
3100 target := &ret
3101 if err := gensupport.DecodeResponse(target, res); err != nil {
3102 return nil, err
3103 }
3104 return ret, nil
3105 }
3106
3107 type AchievementsListCall struct {
3108 s *Service
3109 playerId string
3110 urlParams_ gensupport.URLParams
3111 ifNoneMatch_ string
3112 ctx_ context.Context
3113 header_ http.Header
3114 }
3115
3116
3117
3118
3119
3120
3121 func (r *AchievementsService) List(playerId string) *AchievementsListCall {
3122 c := &AchievementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3123 c.playerId = playerId
3124 return c
3125 }
3126
3127
3128
3129 func (c *AchievementsListCall) Language(language string) *AchievementsListCall {
3130 c.urlParams_.Set("language", language)
3131 return c
3132 }
3133
3134
3135
3136
3137
3138 func (c *AchievementsListCall) MaxResults(maxResults int64) *AchievementsListCall {
3139 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3140 return c
3141 }
3142
3143
3144
3145 func (c *AchievementsListCall) PageToken(pageToken string) *AchievementsListCall {
3146 c.urlParams_.Set("pageToken", pageToken)
3147 return c
3148 }
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160 func (c *AchievementsListCall) State(state string) *AchievementsListCall {
3161 c.urlParams_.Set("state", state)
3162 return c
3163 }
3164
3165
3166
3167
3168 func (c *AchievementsListCall) Fields(s ...googleapi.Field) *AchievementsListCall {
3169 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3170 return c
3171 }
3172
3173
3174
3175
3176 func (c *AchievementsListCall) IfNoneMatch(entityTag string) *AchievementsListCall {
3177 c.ifNoneMatch_ = entityTag
3178 return c
3179 }
3180
3181
3182 func (c *AchievementsListCall) Context(ctx context.Context) *AchievementsListCall {
3183 c.ctx_ = ctx
3184 return c
3185 }
3186
3187
3188
3189 func (c *AchievementsListCall) Header() http.Header {
3190 if c.header_ == nil {
3191 c.header_ = make(http.Header)
3192 }
3193 return c.header_
3194 }
3195
3196 func (c *AchievementsListCall) doRequest(alt string) (*http.Response, error) {
3197 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3198 if c.ifNoneMatch_ != "" {
3199 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3200 }
3201 var body io.Reader = nil
3202 c.urlParams_.Set("alt", alt)
3203 c.urlParams_.Set("prettyPrint", "false")
3204 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/achievements")
3205 urls += "?" + c.urlParams_.Encode()
3206 req, err := http.NewRequest("GET", urls, body)
3207 if err != nil {
3208 return nil, err
3209 }
3210 req.Header = reqHeaders
3211 googleapi.Expand(req.URL, map[string]string{
3212 "playerId": c.playerId,
3213 })
3214 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3215 }
3216
3217
3218
3219
3220
3221
3222
3223 func (c *AchievementsListCall) Do(opts ...googleapi.CallOption) (*PlayerAchievementListResponse, error) {
3224 gensupport.SetOptions(c.urlParams_, opts...)
3225 res, err := c.doRequest("json")
3226 if res != nil && res.StatusCode == http.StatusNotModified {
3227 if res.Body != nil {
3228 res.Body.Close()
3229 }
3230 return nil, gensupport.WrapError(&googleapi.Error{
3231 Code: res.StatusCode,
3232 Header: res.Header,
3233 })
3234 }
3235 if err != nil {
3236 return nil, err
3237 }
3238 defer googleapi.CloseBody(res)
3239 if err := googleapi.CheckResponse(res); err != nil {
3240 return nil, gensupport.WrapError(err)
3241 }
3242 ret := &PlayerAchievementListResponse{
3243 ServerResponse: googleapi.ServerResponse{
3244 Header: res.Header,
3245 HTTPStatusCode: res.StatusCode,
3246 },
3247 }
3248 target := &ret
3249 if err := gensupport.DecodeResponse(target, res); err != nil {
3250 return nil, err
3251 }
3252 return ret, nil
3253 }
3254
3255
3256
3257
3258 func (c *AchievementsListCall) Pages(ctx context.Context, f func(*PlayerAchievementListResponse) error) error {
3259 c.ctx_ = ctx
3260 defer c.PageToken(c.urlParams_.Get("pageToken"))
3261 for {
3262 x, err := c.Do()
3263 if err != nil {
3264 return err
3265 }
3266 if err := f(x); err != nil {
3267 return err
3268 }
3269 if x.NextPageToken == "" {
3270 return nil
3271 }
3272 c.PageToken(x.NextPageToken)
3273 }
3274 }
3275
3276 type AchievementsRevealCall struct {
3277 s *Service
3278 achievementId string
3279 urlParams_ gensupport.URLParams
3280 ctx_ context.Context
3281 header_ http.Header
3282 }
3283
3284
3285
3286
3287
3288 func (r *AchievementsService) Reveal(achievementId string) *AchievementsRevealCall {
3289 c := &AchievementsRevealCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3290 c.achievementId = achievementId
3291 return c
3292 }
3293
3294
3295
3296
3297 func (c *AchievementsRevealCall) Fields(s ...googleapi.Field) *AchievementsRevealCall {
3298 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3299 return c
3300 }
3301
3302
3303 func (c *AchievementsRevealCall) Context(ctx context.Context) *AchievementsRevealCall {
3304 c.ctx_ = ctx
3305 return c
3306 }
3307
3308
3309
3310 func (c *AchievementsRevealCall) Header() http.Header {
3311 if c.header_ == nil {
3312 c.header_ = make(http.Header)
3313 }
3314 return c.header_
3315 }
3316
3317 func (c *AchievementsRevealCall) doRequest(alt string) (*http.Response, error) {
3318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3319 var body io.Reader = nil
3320 c.urlParams_.Set("alt", alt)
3321 c.urlParams_.Set("prettyPrint", "false")
3322 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/reveal")
3323 urls += "?" + c.urlParams_.Encode()
3324 req, err := http.NewRequest("POST", urls, body)
3325 if err != nil {
3326 return nil, err
3327 }
3328 req.Header = reqHeaders
3329 googleapi.Expand(req.URL, map[string]string{
3330 "achievementId": c.achievementId,
3331 })
3332 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3333 }
3334
3335
3336
3337
3338
3339
3340
3341 func (c *AchievementsRevealCall) Do(opts ...googleapi.CallOption) (*AchievementRevealResponse, error) {
3342 gensupport.SetOptions(c.urlParams_, opts...)
3343 res, err := c.doRequest("json")
3344 if res != nil && res.StatusCode == http.StatusNotModified {
3345 if res.Body != nil {
3346 res.Body.Close()
3347 }
3348 return nil, gensupport.WrapError(&googleapi.Error{
3349 Code: res.StatusCode,
3350 Header: res.Header,
3351 })
3352 }
3353 if err != nil {
3354 return nil, err
3355 }
3356 defer googleapi.CloseBody(res)
3357 if err := googleapi.CheckResponse(res); err != nil {
3358 return nil, gensupport.WrapError(err)
3359 }
3360 ret := &AchievementRevealResponse{
3361 ServerResponse: googleapi.ServerResponse{
3362 Header: res.Header,
3363 HTTPStatusCode: res.StatusCode,
3364 },
3365 }
3366 target := &ret
3367 if err := gensupport.DecodeResponse(target, res); err != nil {
3368 return nil, err
3369 }
3370 return ret, nil
3371 }
3372
3373 type AchievementsSetStepsAtLeastCall struct {
3374 s *Service
3375 achievementId string
3376 urlParams_ gensupport.URLParams
3377 ctx_ context.Context
3378 header_ http.Header
3379 }
3380
3381
3382
3383
3384
3385
3386
3387
3388 func (r *AchievementsService) SetStepsAtLeast(achievementId string, steps int64) *AchievementsSetStepsAtLeastCall {
3389 c := &AchievementsSetStepsAtLeastCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3390 c.achievementId = achievementId
3391 c.urlParams_.Set("steps", fmt.Sprint(steps))
3392 return c
3393 }
3394
3395
3396
3397
3398 func (c *AchievementsSetStepsAtLeastCall) Fields(s ...googleapi.Field) *AchievementsSetStepsAtLeastCall {
3399 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3400 return c
3401 }
3402
3403
3404 func (c *AchievementsSetStepsAtLeastCall) Context(ctx context.Context) *AchievementsSetStepsAtLeastCall {
3405 c.ctx_ = ctx
3406 return c
3407 }
3408
3409
3410
3411 func (c *AchievementsSetStepsAtLeastCall) Header() http.Header {
3412 if c.header_ == nil {
3413 c.header_ = make(http.Header)
3414 }
3415 return c.header_
3416 }
3417
3418 func (c *AchievementsSetStepsAtLeastCall) doRequest(alt string) (*http.Response, error) {
3419 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3420 var body io.Reader = nil
3421 c.urlParams_.Set("alt", alt)
3422 c.urlParams_.Set("prettyPrint", "false")
3423 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/setStepsAtLeast")
3424 urls += "?" + c.urlParams_.Encode()
3425 req, err := http.NewRequest("POST", urls, body)
3426 if err != nil {
3427 return nil, err
3428 }
3429 req.Header = reqHeaders
3430 googleapi.Expand(req.URL, map[string]string{
3431 "achievementId": c.achievementId,
3432 })
3433 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3434 }
3435
3436
3437
3438
3439
3440
3441
3442 func (c *AchievementsSetStepsAtLeastCall) Do(opts ...googleapi.CallOption) (*AchievementSetStepsAtLeastResponse, error) {
3443 gensupport.SetOptions(c.urlParams_, opts...)
3444 res, err := c.doRequest("json")
3445 if res != nil && res.StatusCode == http.StatusNotModified {
3446 if res.Body != nil {
3447 res.Body.Close()
3448 }
3449 return nil, gensupport.WrapError(&googleapi.Error{
3450 Code: res.StatusCode,
3451 Header: res.Header,
3452 })
3453 }
3454 if err != nil {
3455 return nil, err
3456 }
3457 defer googleapi.CloseBody(res)
3458 if err := googleapi.CheckResponse(res); err != nil {
3459 return nil, gensupport.WrapError(err)
3460 }
3461 ret := &AchievementSetStepsAtLeastResponse{
3462 ServerResponse: googleapi.ServerResponse{
3463 Header: res.Header,
3464 HTTPStatusCode: res.StatusCode,
3465 },
3466 }
3467 target := &ret
3468 if err := gensupport.DecodeResponse(target, res); err != nil {
3469 return nil, err
3470 }
3471 return ret, nil
3472 }
3473
3474 type AchievementsUnlockCall struct {
3475 s *Service
3476 achievementId string
3477 urlParams_ gensupport.URLParams
3478 ctx_ context.Context
3479 header_ http.Header
3480 }
3481
3482
3483
3484
3485 func (r *AchievementsService) Unlock(achievementId string) *AchievementsUnlockCall {
3486 c := &AchievementsUnlockCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3487 c.achievementId = achievementId
3488 return c
3489 }
3490
3491
3492
3493
3494 func (c *AchievementsUnlockCall) Fields(s ...googleapi.Field) *AchievementsUnlockCall {
3495 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3496 return c
3497 }
3498
3499
3500 func (c *AchievementsUnlockCall) Context(ctx context.Context) *AchievementsUnlockCall {
3501 c.ctx_ = ctx
3502 return c
3503 }
3504
3505
3506
3507 func (c *AchievementsUnlockCall) Header() http.Header {
3508 if c.header_ == nil {
3509 c.header_ = make(http.Header)
3510 }
3511 return c.header_
3512 }
3513
3514 func (c *AchievementsUnlockCall) doRequest(alt string) (*http.Response, error) {
3515 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3516 var body io.Reader = nil
3517 c.urlParams_.Set("alt", alt)
3518 c.urlParams_.Set("prettyPrint", "false")
3519 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/{achievementId}/unlock")
3520 urls += "?" + c.urlParams_.Encode()
3521 req, err := http.NewRequest("POST", urls, body)
3522 if err != nil {
3523 return nil, err
3524 }
3525 req.Header = reqHeaders
3526 googleapi.Expand(req.URL, map[string]string{
3527 "achievementId": c.achievementId,
3528 })
3529 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3530 }
3531
3532
3533
3534
3535
3536
3537
3538 func (c *AchievementsUnlockCall) Do(opts ...googleapi.CallOption) (*AchievementUnlockResponse, error) {
3539 gensupport.SetOptions(c.urlParams_, opts...)
3540 res, err := c.doRequest("json")
3541 if res != nil && res.StatusCode == http.StatusNotModified {
3542 if res.Body != nil {
3543 res.Body.Close()
3544 }
3545 return nil, gensupport.WrapError(&googleapi.Error{
3546 Code: res.StatusCode,
3547 Header: res.Header,
3548 })
3549 }
3550 if err != nil {
3551 return nil, err
3552 }
3553 defer googleapi.CloseBody(res)
3554 if err := googleapi.CheckResponse(res); err != nil {
3555 return nil, gensupport.WrapError(err)
3556 }
3557 ret := &AchievementUnlockResponse{
3558 ServerResponse: googleapi.ServerResponse{
3559 Header: res.Header,
3560 HTTPStatusCode: res.StatusCode,
3561 },
3562 }
3563 target := &ret
3564 if err := gensupport.DecodeResponse(target, res); err != nil {
3565 return nil, err
3566 }
3567 return ret, nil
3568 }
3569
3570 type AchievementsUpdateMultipleCall struct {
3571 s *Service
3572 achievementupdatemultiplerequest *AchievementUpdateMultipleRequest
3573 urlParams_ gensupport.URLParams
3574 ctx_ context.Context
3575 header_ http.Header
3576 }
3577
3578
3579
3580 func (r *AchievementsService) UpdateMultiple(achievementupdatemultiplerequest *AchievementUpdateMultipleRequest) *AchievementsUpdateMultipleCall {
3581 c := &AchievementsUpdateMultipleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3582 c.achievementupdatemultiplerequest = achievementupdatemultiplerequest
3583 return c
3584 }
3585
3586
3587
3588
3589 func (c *AchievementsUpdateMultipleCall) Fields(s ...googleapi.Field) *AchievementsUpdateMultipleCall {
3590 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3591 return c
3592 }
3593
3594
3595 func (c *AchievementsUpdateMultipleCall) Context(ctx context.Context) *AchievementsUpdateMultipleCall {
3596 c.ctx_ = ctx
3597 return c
3598 }
3599
3600
3601
3602 func (c *AchievementsUpdateMultipleCall) Header() http.Header {
3603 if c.header_ == nil {
3604 c.header_ = make(http.Header)
3605 }
3606 return c.header_
3607 }
3608
3609 func (c *AchievementsUpdateMultipleCall) doRequest(alt string) (*http.Response, error) {
3610 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3611 var body io.Reader = nil
3612 body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementupdatemultiplerequest)
3613 if err != nil {
3614 return nil, err
3615 }
3616 c.urlParams_.Set("alt", alt)
3617 c.urlParams_.Set("prettyPrint", "false")
3618 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/achievements/updateMultiple")
3619 urls += "?" + c.urlParams_.Encode()
3620 req, err := http.NewRequest("POST", urls, body)
3621 if err != nil {
3622 return nil, err
3623 }
3624 req.Header = reqHeaders
3625 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3626 }
3627
3628
3629
3630
3631
3632
3633
3634 func (c *AchievementsUpdateMultipleCall) Do(opts ...googleapi.CallOption) (*AchievementUpdateMultipleResponse, error) {
3635 gensupport.SetOptions(c.urlParams_, opts...)
3636 res, err := c.doRequest("json")
3637 if res != nil && res.StatusCode == http.StatusNotModified {
3638 if res.Body != nil {
3639 res.Body.Close()
3640 }
3641 return nil, gensupport.WrapError(&googleapi.Error{
3642 Code: res.StatusCode,
3643 Header: res.Header,
3644 })
3645 }
3646 if err != nil {
3647 return nil, err
3648 }
3649 defer googleapi.CloseBody(res)
3650 if err := googleapi.CheckResponse(res); err != nil {
3651 return nil, gensupport.WrapError(err)
3652 }
3653 ret := &AchievementUpdateMultipleResponse{
3654 ServerResponse: googleapi.ServerResponse{
3655 Header: res.Header,
3656 HTTPStatusCode: res.StatusCode,
3657 },
3658 }
3659 target := &ret
3660 if err := gensupport.DecodeResponse(target, res); err != nil {
3661 return nil, err
3662 }
3663 return ret, nil
3664 }
3665
3666 type ApplicationsGetCall struct {
3667 s *Service
3668 applicationId string
3669 urlParams_ gensupport.URLParams
3670 ifNoneMatch_ string
3671 ctx_ context.Context
3672 header_ http.Header
3673 }
3674
3675
3676
3677
3678
3679
3680 func (r *ApplicationsService) Get(applicationId string) *ApplicationsGetCall {
3681 c := &ApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3682 c.applicationId = applicationId
3683 return c
3684 }
3685
3686
3687
3688 func (c *ApplicationsGetCall) Language(language string) *ApplicationsGetCall {
3689 c.urlParams_.Set("language", language)
3690 return c
3691 }
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701 func (c *ApplicationsGetCall) PlatformType(platformType string) *ApplicationsGetCall {
3702 c.urlParams_.Set("platformType", platformType)
3703 return c
3704 }
3705
3706
3707
3708
3709 func (c *ApplicationsGetCall) Fields(s ...googleapi.Field) *ApplicationsGetCall {
3710 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3711 return c
3712 }
3713
3714
3715
3716
3717 func (c *ApplicationsGetCall) IfNoneMatch(entityTag string) *ApplicationsGetCall {
3718 c.ifNoneMatch_ = entityTag
3719 return c
3720 }
3721
3722
3723 func (c *ApplicationsGetCall) Context(ctx context.Context) *ApplicationsGetCall {
3724 c.ctx_ = ctx
3725 return c
3726 }
3727
3728
3729
3730 func (c *ApplicationsGetCall) Header() http.Header {
3731 if c.header_ == nil {
3732 c.header_ = make(http.Header)
3733 }
3734 return c.header_
3735 }
3736
3737 func (c *ApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
3738 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3739 if c.ifNoneMatch_ != "" {
3740 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3741 }
3742 var body io.Reader = nil
3743 c.urlParams_.Set("alt", alt)
3744 c.urlParams_.Set("prettyPrint", "false")
3745 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/applications/{applicationId}")
3746 urls += "?" + c.urlParams_.Encode()
3747 req, err := http.NewRequest("GET", urls, body)
3748 if err != nil {
3749 return nil, err
3750 }
3751 req.Header = reqHeaders
3752 googleapi.Expand(req.URL, map[string]string{
3753 "applicationId": c.applicationId,
3754 })
3755 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3756 }
3757
3758
3759
3760
3761
3762
3763 func (c *ApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
3764 gensupport.SetOptions(c.urlParams_, opts...)
3765 res, err := c.doRequest("json")
3766 if res != nil && res.StatusCode == http.StatusNotModified {
3767 if res.Body != nil {
3768 res.Body.Close()
3769 }
3770 return nil, gensupport.WrapError(&googleapi.Error{
3771 Code: res.StatusCode,
3772 Header: res.Header,
3773 })
3774 }
3775 if err != nil {
3776 return nil, err
3777 }
3778 defer googleapi.CloseBody(res)
3779 if err := googleapi.CheckResponse(res); err != nil {
3780 return nil, gensupport.WrapError(err)
3781 }
3782 ret := &Application{
3783 ServerResponse: googleapi.ServerResponse{
3784 Header: res.Header,
3785 HTTPStatusCode: res.StatusCode,
3786 },
3787 }
3788 target := &ret
3789 if err := gensupport.DecodeResponse(target, res); err != nil {
3790 return nil, err
3791 }
3792 return ret, nil
3793 }
3794
3795 type ApplicationsGetEndPointCall struct {
3796 s *Service
3797 urlParams_ gensupport.URLParams
3798 ctx_ context.Context
3799 header_ http.Header
3800 }
3801
3802
3803 func (r *ApplicationsService) GetEndPoint() *ApplicationsGetEndPointCall {
3804 c := &ApplicationsGetEndPointCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3805 return c
3806 }
3807
3808
3809
3810 func (c *ApplicationsGetEndPointCall) ApplicationId(applicationId string) *ApplicationsGetEndPointCall {
3811 c.urlParams_.Set("applicationId", applicationId)
3812 return c
3813 }
3814
3815
3816
3817
3818
3819
3820
3821
3822 func (c *ApplicationsGetEndPointCall) EndPointType(endPointType string) *ApplicationsGetEndPointCall {
3823 c.urlParams_.Set("endPointType", endPointType)
3824 return c
3825 }
3826
3827
3828
3829
3830 func (c *ApplicationsGetEndPointCall) Fields(s ...googleapi.Field) *ApplicationsGetEndPointCall {
3831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3832 return c
3833 }
3834
3835
3836 func (c *ApplicationsGetEndPointCall) Context(ctx context.Context) *ApplicationsGetEndPointCall {
3837 c.ctx_ = ctx
3838 return c
3839 }
3840
3841
3842
3843 func (c *ApplicationsGetEndPointCall) Header() http.Header {
3844 if c.header_ == nil {
3845 c.header_ = make(http.Header)
3846 }
3847 return c.header_
3848 }
3849
3850 func (c *ApplicationsGetEndPointCall) doRequest(alt string) (*http.Response, error) {
3851 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3852 var body io.Reader = nil
3853 c.urlParams_.Set("alt", alt)
3854 c.urlParams_.Set("prettyPrint", "false")
3855 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/applications/getEndPoint")
3856 urls += "?" + c.urlParams_.Encode()
3857 req, err := http.NewRequest("POST", urls, body)
3858 if err != nil {
3859 return nil, err
3860 }
3861 req.Header = reqHeaders
3862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3863 }
3864
3865
3866
3867
3868
3869
3870 func (c *ApplicationsGetEndPointCall) Do(opts ...googleapi.CallOption) (*EndPoint, error) {
3871 gensupport.SetOptions(c.urlParams_, opts...)
3872 res, err := c.doRequest("json")
3873 if res != nil && res.StatusCode == http.StatusNotModified {
3874 if res.Body != nil {
3875 res.Body.Close()
3876 }
3877 return nil, gensupport.WrapError(&googleapi.Error{
3878 Code: res.StatusCode,
3879 Header: res.Header,
3880 })
3881 }
3882 if err != nil {
3883 return nil, err
3884 }
3885 defer googleapi.CloseBody(res)
3886 if err := googleapi.CheckResponse(res); err != nil {
3887 return nil, gensupport.WrapError(err)
3888 }
3889 ret := &EndPoint{
3890 ServerResponse: googleapi.ServerResponse{
3891 Header: res.Header,
3892 HTTPStatusCode: res.StatusCode,
3893 },
3894 }
3895 target := &ret
3896 if err := gensupport.DecodeResponse(target, res); err != nil {
3897 return nil, err
3898 }
3899 return ret, nil
3900 }
3901
3902 type ApplicationsPlayedCall struct {
3903 s *Service
3904 urlParams_ gensupport.URLParams
3905 ctx_ context.Context
3906 header_ http.Header
3907 }
3908
3909
3910
3911 func (r *ApplicationsService) Played() *ApplicationsPlayedCall {
3912 c := &ApplicationsPlayedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3913 return c
3914 }
3915
3916
3917
3918
3919 func (c *ApplicationsPlayedCall) Fields(s ...googleapi.Field) *ApplicationsPlayedCall {
3920 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3921 return c
3922 }
3923
3924
3925 func (c *ApplicationsPlayedCall) Context(ctx context.Context) *ApplicationsPlayedCall {
3926 c.ctx_ = ctx
3927 return c
3928 }
3929
3930
3931
3932 func (c *ApplicationsPlayedCall) Header() http.Header {
3933 if c.header_ == nil {
3934 c.header_ = make(http.Header)
3935 }
3936 return c.header_
3937 }
3938
3939 func (c *ApplicationsPlayedCall) doRequest(alt string) (*http.Response, error) {
3940 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3941 var body io.Reader = nil
3942 c.urlParams_.Set("alt", alt)
3943 c.urlParams_.Set("prettyPrint", "false")
3944 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/applications/played")
3945 urls += "?" + c.urlParams_.Encode()
3946 req, err := http.NewRequest("POST", urls, body)
3947 if err != nil {
3948 return nil, err
3949 }
3950 req.Header = reqHeaders
3951 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3952 }
3953
3954
3955 func (c *ApplicationsPlayedCall) Do(opts ...googleapi.CallOption) error {
3956 gensupport.SetOptions(c.urlParams_, opts...)
3957 res, err := c.doRequest("json")
3958 if err != nil {
3959 return err
3960 }
3961 defer googleapi.CloseBody(res)
3962 if err := googleapi.CheckResponse(res); err != nil {
3963 return gensupport.WrapError(err)
3964 }
3965 return nil
3966 }
3967
3968 type ApplicationsVerifyCall struct {
3969 s *Service
3970 applicationId string
3971 urlParams_ gensupport.URLParams
3972 ifNoneMatch_ string
3973 ctx_ context.Context
3974 header_ http.Header
3975 }
3976
3977
3978
3979
3980
3981
3982 func (r *ApplicationsService) Verify(applicationId string) *ApplicationsVerifyCall {
3983 c := &ApplicationsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3984 c.applicationId = applicationId
3985 return c
3986 }
3987
3988
3989
3990
3991 func (c *ApplicationsVerifyCall) Fields(s ...googleapi.Field) *ApplicationsVerifyCall {
3992 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3993 return c
3994 }
3995
3996
3997
3998
3999 func (c *ApplicationsVerifyCall) IfNoneMatch(entityTag string) *ApplicationsVerifyCall {
4000 c.ifNoneMatch_ = entityTag
4001 return c
4002 }
4003
4004
4005 func (c *ApplicationsVerifyCall) Context(ctx context.Context) *ApplicationsVerifyCall {
4006 c.ctx_ = ctx
4007 return c
4008 }
4009
4010
4011
4012 func (c *ApplicationsVerifyCall) Header() http.Header {
4013 if c.header_ == nil {
4014 c.header_ = make(http.Header)
4015 }
4016 return c.header_
4017 }
4018
4019 func (c *ApplicationsVerifyCall) doRequest(alt string) (*http.Response, error) {
4020 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4021 if c.ifNoneMatch_ != "" {
4022 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4023 }
4024 var body io.Reader = nil
4025 c.urlParams_.Set("alt", alt)
4026 c.urlParams_.Set("prettyPrint", "false")
4027 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/applications/{applicationId}/verify")
4028 urls += "?" + c.urlParams_.Encode()
4029 req, err := http.NewRequest("GET", urls, body)
4030 if err != nil {
4031 return nil, err
4032 }
4033 req.Header = reqHeaders
4034 googleapi.Expand(req.URL, map[string]string{
4035 "applicationId": c.applicationId,
4036 })
4037 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4038 }
4039
4040
4041
4042
4043
4044
4045
4046 func (c *ApplicationsVerifyCall) Do(opts ...googleapi.CallOption) (*ApplicationVerifyResponse, error) {
4047 gensupport.SetOptions(c.urlParams_, opts...)
4048 res, err := c.doRequest("json")
4049 if res != nil && res.StatusCode == http.StatusNotModified {
4050 if res.Body != nil {
4051 res.Body.Close()
4052 }
4053 return nil, gensupport.WrapError(&googleapi.Error{
4054 Code: res.StatusCode,
4055 Header: res.Header,
4056 })
4057 }
4058 if err != nil {
4059 return nil, err
4060 }
4061 defer googleapi.CloseBody(res)
4062 if err := googleapi.CheckResponse(res); err != nil {
4063 return nil, gensupport.WrapError(err)
4064 }
4065 ret := &ApplicationVerifyResponse{
4066 ServerResponse: googleapi.ServerResponse{
4067 Header: res.Header,
4068 HTTPStatusCode: res.StatusCode,
4069 },
4070 }
4071 target := &ret
4072 if err := gensupport.DecodeResponse(target, res); err != nil {
4073 return nil, err
4074 }
4075 return ret, nil
4076 }
4077
4078 type EventsListByPlayerCall struct {
4079 s *Service
4080 urlParams_ gensupport.URLParams
4081 ifNoneMatch_ string
4082 ctx_ context.Context
4083 header_ http.Header
4084 }
4085
4086
4087
4088 func (r *EventsService) ListByPlayer() *EventsListByPlayerCall {
4089 c := &EventsListByPlayerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4090 return c
4091 }
4092
4093
4094
4095 func (c *EventsListByPlayerCall) Language(language string) *EventsListByPlayerCall {
4096 c.urlParams_.Set("language", language)
4097 return c
4098 }
4099
4100
4101
4102
4103 func (c *EventsListByPlayerCall) MaxResults(maxResults int64) *EventsListByPlayerCall {
4104 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4105 return c
4106 }
4107
4108
4109
4110 func (c *EventsListByPlayerCall) PageToken(pageToken string) *EventsListByPlayerCall {
4111 c.urlParams_.Set("pageToken", pageToken)
4112 return c
4113 }
4114
4115
4116
4117
4118 func (c *EventsListByPlayerCall) Fields(s ...googleapi.Field) *EventsListByPlayerCall {
4119 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4120 return c
4121 }
4122
4123
4124
4125
4126 func (c *EventsListByPlayerCall) IfNoneMatch(entityTag string) *EventsListByPlayerCall {
4127 c.ifNoneMatch_ = entityTag
4128 return c
4129 }
4130
4131
4132 func (c *EventsListByPlayerCall) Context(ctx context.Context) *EventsListByPlayerCall {
4133 c.ctx_ = ctx
4134 return c
4135 }
4136
4137
4138
4139 func (c *EventsListByPlayerCall) Header() http.Header {
4140 if c.header_ == nil {
4141 c.header_ = make(http.Header)
4142 }
4143 return c.header_
4144 }
4145
4146 func (c *EventsListByPlayerCall) doRequest(alt string) (*http.Response, error) {
4147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4148 if c.ifNoneMatch_ != "" {
4149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4150 }
4151 var body io.Reader = nil
4152 c.urlParams_.Set("alt", alt)
4153 c.urlParams_.Set("prettyPrint", "false")
4154 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/events")
4155 urls += "?" + c.urlParams_.Encode()
4156 req, err := http.NewRequest("GET", urls, body)
4157 if err != nil {
4158 return nil, err
4159 }
4160 req.Header = reqHeaders
4161 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4162 }
4163
4164
4165
4166
4167
4168
4169
4170 func (c *EventsListByPlayerCall) Do(opts ...googleapi.CallOption) (*PlayerEventListResponse, error) {
4171 gensupport.SetOptions(c.urlParams_, opts...)
4172 res, err := c.doRequest("json")
4173 if res != nil && res.StatusCode == http.StatusNotModified {
4174 if res.Body != nil {
4175 res.Body.Close()
4176 }
4177 return nil, gensupport.WrapError(&googleapi.Error{
4178 Code: res.StatusCode,
4179 Header: res.Header,
4180 })
4181 }
4182 if err != nil {
4183 return nil, err
4184 }
4185 defer googleapi.CloseBody(res)
4186 if err := googleapi.CheckResponse(res); err != nil {
4187 return nil, gensupport.WrapError(err)
4188 }
4189 ret := &PlayerEventListResponse{
4190 ServerResponse: googleapi.ServerResponse{
4191 Header: res.Header,
4192 HTTPStatusCode: res.StatusCode,
4193 },
4194 }
4195 target := &ret
4196 if err := gensupport.DecodeResponse(target, res); err != nil {
4197 return nil, err
4198 }
4199 return ret, nil
4200 }
4201
4202
4203
4204
4205 func (c *EventsListByPlayerCall) Pages(ctx context.Context, f func(*PlayerEventListResponse) error) error {
4206 c.ctx_ = ctx
4207 defer c.PageToken(c.urlParams_.Get("pageToken"))
4208 for {
4209 x, err := c.Do()
4210 if err != nil {
4211 return err
4212 }
4213 if err := f(x); err != nil {
4214 return err
4215 }
4216 if x.NextPageToken == "" {
4217 return nil
4218 }
4219 c.PageToken(x.NextPageToken)
4220 }
4221 }
4222
4223 type EventsListDefinitionsCall struct {
4224 s *Service
4225 urlParams_ gensupport.URLParams
4226 ifNoneMatch_ string
4227 ctx_ context.Context
4228 header_ http.Header
4229 }
4230
4231
4232
4233 func (r *EventsService) ListDefinitions() *EventsListDefinitionsCall {
4234 c := &EventsListDefinitionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4235 return c
4236 }
4237
4238
4239
4240 func (c *EventsListDefinitionsCall) Language(language string) *EventsListDefinitionsCall {
4241 c.urlParams_.Set("language", language)
4242 return c
4243 }
4244
4245
4246
4247
4248
4249 func (c *EventsListDefinitionsCall) MaxResults(maxResults int64) *EventsListDefinitionsCall {
4250 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4251 return c
4252 }
4253
4254
4255
4256 func (c *EventsListDefinitionsCall) PageToken(pageToken string) *EventsListDefinitionsCall {
4257 c.urlParams_.Set("pageToken", pageToken)
4258 return c
4259 }
4260
4261
4262
4263
4264 func (c *EventsListDefinitionsCall) Fields(s ...googleapi.Field) *EventsListDefinitionsCall {
4265 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4266 return c
4267 }
4268
4269
4270
4271
4272 func (c *EventsListDefinitionsCall) IfNoneMatch(entityTag string) *EventsListDefinitionsCall {
4273 c.ifNoneMatch_ = entityTag
4274 return c
4275 }
4276
4277
4278 func (c *EventsListDefinitionsCall) Context(ctx context.Context) *EventsListDefinitionsCall {
4279 c.ctx_ = ctx
4280 return c
4281 }
4282
4283
4284
4285 func (c *EventsListDefinitionsCall) Header() http.Header {
4286 if c.header_ == nil {
4287 c.header_ = make(http.Header)
4288 }
4289 return c.header_
4290 }
4291
4292 func (c *EventsListDefinitionsCall) doRequest(alt string) (*http.Response, error) {
4293 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4294 if c.ifNoneMatch_ != "" {
4295 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4296 }
4297 var body io.Reader = nil
4298 c.urlParams_.Set("alt", alt)
4299 c.urlParams_.Set("prettyPrint", "false")
4300 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/eventDefinitions")
4301 urls += "?" + c.urlParams_.Encode()
4302 req, err := http.NewRequest("GET", urls, body)
4303 if err != nil {
4304 return nil, err
4305 }
4306 req.Header = reqHeaders
4307 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4308 }
4309
4310
4311
4312
4313
4314
4315
4316 func (c *EventsListDefinitionsCall) Do(opts ...googleapi.CallOption) (*EventDefinitionListResponse, error) {
4317 gensupport.SetOptions(c.urlParams_, opts...)
4318 res, err := c.doRequest("json")
4319 if res != nil && res.StatusCode == http.StatusNotModified {
4320 if res.Body != nil {
4321 res.Body.Close()
4322 }
4323 return nil, gensupport.WrapError(&googleapi.Error{
4324 Code: res.StatusCode,
4325 Header: res.Header,
4326 })
4327 }
4328 if err != nil {
4329 return nil, err
4330 }
4331 defer googleapi.CloseBody(res)
4332 if err := googleapi.CheckResponse(res); err != nil {
4333 return nil, gensupport.WrapError(err)
4334 }
4335 ret := &EventDefinitionListResponse{
4336 ServerResponse: googleapi.ServerResponse{
4337 Header: res.Header,
4338 HTTPStatusCode: res.StatusCode,
4339 },
4340 }
4341 target := &ret
4342 if err := gensupport.DecodeResponse(target, res); err != nil {
4343 return nil, err
4344 }
4345 return ret, nil
4346 }
4347
4348
4349
4350
4351 func (c *EventsListDefinitionsCall) Pages(ctx context.Context, f func(*EventDefinitionListResponse) error) error {
4352 c.ctx_ = ctx
4353 defer c.PageToken(c.urlParams_.Get("pageToken"))
4354 for {
4355 x, err := c.Do()
4356 if err != nil {
4357 return err
4358 }
4359 if err := f(x); err != nil {
4360 return err
4361 }
4362 if x.NextPageToken == "" {
4363 return nil
4364 }
4365 c.PageToken(x.NextPageToken)
4366 }
4367 }
4368
4369 type EventsRecordCall struct {
4370 s *Service
4371 eventrecordrequest *EventRecordRequest
4372 urlParams_ gensupport.URLParams
4373 ctx_ context.Context
4374 header_ http.Header
4375 }
4376
4377
4378
4379 func (r *EventsService) Record(eventrecordrequest *EventRecordRequest) *EventsRecordCall {
4380 c := &EventsRecordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4381 c.eventrecordrequest = eventrecordrequest
4382 return c
4383 }
4384
4385
4386
4387 func (c *EventsRecordCall) Language(language string) *EventsRecordCall {
4388 c.urlParams_.Set("language", language)
4389 return c
4390 }
4391
4392
4393
4394
4395 func (c *EventsRecordCall) Fields(s ...googleapi.Field) *EventsRecordCall {
4396 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4397 return c
4398 }
4399
4400
4401 func (c *EventsRecordCall) Context(ctx context.Context) *EventsRecordCall {
4402 c.ctx_ = ctx
4403 return c
4404 }
4405
4406
4407
4408 func (c *EventsRecordCall) Header() http.Header {
4409 if c.header_ == nil {
4410 c.header_ = make(http.Header)
4411 }
4412 return c.header_
4413 }
4414
4415 func (c *EventsRecordCall) doRequest(alt string) (*http.Response, error) {
4416 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4417 var body io.Reader = nil
4418 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventrecordrequest)
4419 if err != nil {
4420 return nil, err
4421 }
4422 c.urlParams_.Set("alt", alt)
4423 c.urlParams_.Set("prettyPrint", "false")
4424 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/events")
4425 urls += "?" + c.urlParams_.Encode()
4426 req, err := http.NewRequest("POST", urls, body)
4427 if err != nil {
4428 return nil, err
4429 }
4430 req.Header = reqHeaders
4431 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4432 }
4433
4434
4435
4436
4437
4438
4439
4440 func (c *EventsRecordCall) Do(opts ...googleapi.CallOption) (*EventUpdateResponse, error) {
4441 gensupport.SetOptions(c.urlParams_, opts...)
4442 res, err := c.doRequest("json")
4443 if res != nil && res.StatusCode == http.StatusNotModified {
4444 if res.Body != nil {
4445 res.Body.Close()
4446 }
4447 return nil, gensupport.WrapError(&googleapi.Error{
4448 Code: res.StatusCode,
4449 Header: res.Header,
4450 })
4451 }
4452 if err != nil {
4453 return nil, err
4454 }
4455 defer googleapi.CloseBody(res)
4456 if err := googleapi.CheckResponse(res); err != nil {
4457 return nil, gensupport.WrapError(err)
4458 }
4459 ret := &EventUpdateResponse{
4460 ServerResponse: googleapi.ServerResponse{
4461 Header: res.Header,
4462 HTTPStatusCode: res.StatusCode,
4463 },
4464 }
4465 target := &ret
4466 if err := gensupport.DecodeResponse(target, res); err != nil {
4467 return nil, err
4468 }
4469 return ret, nil
4470 }
4471
4472 type LeaderboardsGetCall struct {
4473 s *Service
4474 leaderboardId string
4475 urlParams_ gensupport.URLParams
4476 ifNoneMatch_ string
4477 ctx_ context.Context
4478 header_ http.Header
4479 }
4480
4481
4482
4483
4484 func (r *LeaderboardsService) Get(leaderboardId string) *LeaderboardsGetCall {
4485 c := &LeaderboardsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4486 c.leaderboardId = leaderboardId
4487 return c
4488 }
4489
4490
4491
4492 func (c *LeaderboardsGetCall) Language(language string) *LeaderboardsGetCall {
4493 c.urlParams_.Set("language", language)
4494 return c
4495 }
4496
4497
4498
4499
4500 func (c *LeaderboardsGetCall) Fields(s ...googleapi.Field) *LeaderboardsGetCall {
4501 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4502 return c
4503 }
4504
4505
4506
4507
4508 func (c *LeaderboardsGetCall) IfNoneMatch(entityTag string) *LeaderboardsGetCall {
4509 c.ifNoneMatch_ = entityTag
4510 return c
4511 }
4512
4513
4514 func (c *LeaderboardsGetCall) Context(ctx context.Context) *LeaderboardsGetCall {
4515 c.ctx_ = ctx
4516 return c
4517 }
4518
4519
4520
4521 func (c *LeaderboardsGetCall) Header() http.Header {
4522 if c.header_ == nil {
4523 c.header_ = make(http.Header)
4524 }
4525 return c.header_
4526 }
4527
4528 func (c *LeaderboardsGetCall) doRequest(alt string) (*http.Response, error) {
4529 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4530 if c.ifNoneMatch_ != "" {
4531 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4532 }
4533 var body io.Reader = nil
4534 c.urlParams_.Set("alt", alt)
4535 c.urlParams_.Set("prettyPrint", "false")
4536 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}")
4537 urls += "?" + c.urlParams_.Encode()
4538 req, err := http.NewRequest("GET", urls, body)
4539 if err != nil {
4540 return nil, err
4541 }
4542 req.Header = reqHeaders
4543 googleapi.Expand(req.URL, map[string]string{
4544 "leaderboardId": c.leaderboardId,
4545 })
4546 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4547 }
4548
4549
4550
4551
4552
4553
4554 func (c *LeaderboardsGetCall) Do(opts ...googleapi.CallOption) (*Leaderboard, error) {
4555 gensupport.SetOptions(c.urlParams_, opts...)
4556 res, err := c.doRequest("json")
4557 if res != nil && res.StatusCode == http.StatusNotModified {
4558 if res.Body != nil {
4559 res.Body.Close()
4560 }
4561 return nil, gensupport.WrapError(&googleapi.Error{
4562 Code: res.StatusCode,
4563 Header: res.Header,
4564 })
4565 }
4566 if err != nil {
4567 return nil, err
4568 }
4569 defer googleapi.CloseBody(res)
4570 if err := googleapi.CheckResponse(res); err != nil {
4571 return nil, gensupport.WrapError(err)
4572 }
4573 ret := &Leaderboard{
4574 ServerResponse: googleapi.ServerResponse{
4575 Header: res.Header,
4576 HTTPStatusCode: res.StatusCode,
4577 },
4578 }
4579 target := &ret
4580 if err := gensupport.DecodeResponse(target, res); err != nil {
4581 return nil, err
4582 }
4583 return ret, nil
4584 }
4585
4586 type LeaderboardsListCall struct {
4587 s *Service
4588 urlParams_ gensupport.URLParams
4589 ifNoneMatch_ string
4590 ctx_ context.Context
4591 header_ http.Header
4592 }
4593
4594
4595 func (r *LeaderboardsService) List() *LeaderboardsListCall {
4596 c := &LeaderboardsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4597 return c
4598 }
4599
4600
4601
4602 func (c *LeaderboardsListCall) Language(language string) *LeaderboardsListCall {
4603 c.urlParams_.Set("language", language)
4604 return c
4605 }
4606
4607
4608
4609
4610 func (c *LeaderboardsListCall) MaxResults(maxResults int64) *LeaderboardsListCall {
4611 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4612 return c
4613 }
4614
4615
4616
4617 func (c *LeaderboardsListCall) PageToken(pageToken string) *LeaderboardsListCall {
4618 c.urlParams_.Set("pageToken", pageToken)
4619 return c
4620 }
4621
4622
4623
4624
4625 func (c *LeaderboardsListCall) Fields(s ...googleapi.Field) *LeaderboardsListCall {
4626 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4627 return c
4628 }
4629
4630
4631
4632
4633 func (c *LeaderboardsListCall) IfNoneMatch(entityTag string) *LeaderboardsListCall {
4634 c.ifNoneMatch_ = entityTag
4635 return c
4636 }
4637
4638
4639 func (c *LeaderboardsListCall) Context(ctx context.Context) *LeaderboardsListCall {
4640 c.ctx_ = ctx
4641 return c
4642 }
4643
4644
4645
4646 func (c *LeaderboardsListCall) Header() http.Header {
4647 if c.header_ == nil {
4648 c.header_ = make(http.Header)
4649 }
4650 return c.header_
4651 }
4652
4653 func (c *LeaderboardsListCall) doRequest(alt string) (*http.Response, error) {
4654 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4655 if c.ifNoneMatch_ != "" {
4656 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4657 }
4658 var body io.Reader = nil
4659 c.urlParams_.Set("alt", alt)
4660 c.urlParams_.Set("prettyPrint", "false")
4661 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards")
4662 urls += "?" + c.urlParams_.Encode()
4663 req, err := http.NewRequest("GET", urls, body)
4664 if err != nil {
4665 return nil, err
4666 }
4667 req.Header = reqHeaders
4668 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4669 }
4670
4671
4672
4673
4674
4675
4676
4677 func (c *LeaderboardsListCall) Do(opts ...googleapi.CallOption) (*LeaderboardListResponse, error) {
4678 gensupport.SetOptions(c.urlParams_, opts...)
4679 res, err := c.doRequest("json")
4680 if res != nil && res.StatusCode == http.StatusNotModified {
4681 if res.Body != nil {
4682 res.Body.Close()
4683 }
4684 return nil, gensupport.WrapError(&googleapi.Error{
4685 Code: res.StatusCode,
4686 Header: res.Header,
4687 })
4688 }
4689 if err != nil {
4690 return nil, err
4691 }
4692 defer googleapi.CloseBody(res)
4693 if err := googleapi.CheckResponse(res); err != nil {
4694 return nil, gensupport.WrapError(err)
4695 }
4696 ret := &LeaderboardListResponse{
4697 ServerResponse: googleapi.ServerResponse{
4698 Header: res.Header,
4699 HTTPStatusCode: res.StatusCode,
4700 },
4701 }
4702 target := &ret
4703 if err := gensupport.DecodeResponse(target, res); err != nil {
4704 return nil, err
4705 }
4706 return ret, nil
4707 }
4708
4709
4710
4711
4712 func (c *LeaderboardsListCall) Pages(ctx context.Context, f func(*LeaderboardListResponse) error) error {
4713 c.ctx_ = ctx
4714 defer c.PageToken(c.urlParams_.Get("pageToken"))
4715 for {
4716 x, err := c.Do()
4717 if err != nil {
4718 return err
4719 }
4720 if err := f(x); err != nil {
4721 return err
4722 }
4723 if x.NextPageToken == "" {
4724 return nil
4725 }
4726 c.PageToken(x.NextPageToken)
4727 }
4728 }
4729
4730 type MetagameGetMetagameConfigCall struct {
4731 s *Service
4732 urlParams_ gensupport.URLParams
4733 ifNoneMatch_ string
4734 ctx_ context.Context
4735 header_ http.Header
4736 }
4737
4738
4739
4740 func (r *MetagameService) GetMetagameConfig() *MetagameGetMetagameConfigCall {
4741 c := &MetagameGetMetagameConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4742 return c
4743 }
4744
4745
4746
4747
4748 func (c *MetagameGetMetagameConfigCall) Fields(s ...googleapi.Field) *MetagameGetMetagameConfigCall {
4749 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4750 return c
4751 }
4752
4753
4754
4755
4756 func (c *MetagameGetMetagameConfigCall) IfNoneMatch(entityTag string) *MetagameGetMetagameConfigCall {
4757 c.ifNoneMatch_ = entityTag
4758 return c
4759 }
4760
4761
4762 func (c *MetagameGetMetagameConfigCall) Context(ctx context.Context) *MetagameGetMetagameConfigCall {
4763 c.ctx_ = ctx
4764 return c
4765 }
4766
4767
4768
4769 func (c *MetagameGetMetagameConfigCall) Header() http.Header {
4770 if c.header_ == nil {
4771 c.header_ = make(http.Header)
4772 }
4773 return c.header_
4774 }
4775
4776 func (c *MetagameGetMetagameConfigCall) doRequest(alt string) (*http.Response, error) {
4777 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4778 if c.ifNoneMatch_ != "" {
4779 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4780 }
4781 var body io.Reader = nil
4782 c.urlParams_.Set("alt", alt)
4783 c.urlParams_.Set("prettyPrint", "false")
4784 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/metagameConfig")
4785 urls += "?" + c.urlParams_.Encode()
4786 req, err := http.NewRequest("GET", urls, body)
4787 if err != nil {
4788 return nil, err
4789 }
4790 req.Header = reqHeaders
4791 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4792 }
4793
4794
4795
4796
4797
4798
4799 func (c *MetagameGetMetagameConfigCall) Do(opts ...googleapi.CallOption) (*MetagameConfig, error) {
4800 gensupport.SetOptions(c.urlParams_, opts...)
4801 res, err := c.doRequest("json")
4802 if res != nil && res.StatusCode == http.StatusNotModified {
4803 if res.Body != nil {
4804 res.Body.Close()
4805 }
4806 return nil, gensupport.WrapError(&googleapi.Error{
4807 Code: res.StatusCode,
4808 Header: res.Header,
4809 })
4810 }
4811 if err != nil {
4812 return nil, err
4813 }
4814 defer googleapi.CloseBody(res)
4815 if err := googleapi.CheckResponse(res); err != nil {
4816 return nil, gensupport.WrapError(err)
4817 }
4818 ret := &MetagameConfig{
4819 ServerResponse: googleapi.ServerResponse{
4820 Header: res.Header,
4821 HTTPStatusCode: res.StatusCode,
4822 },
4823 }
4824 target := &ret
4825 if err := gensupport.DecodeResponse(target, res); err != nil {
4826 return nil, err
4827 }
4828 return ret, nil
4829 }
4830
4831 type MetagameListCategoriesByPlayerCall struct {
4832 s *Service
4833 playerId string
4834 collection string
4835 urlParams_ gensupport.URLParams
4836 ifNoneMatch_ string
4837 ctx_ context.Context
4838 header_ http.Header
4839 }
4840
4841
4842
4843
4844
4845
4846
4847 func (r *MetagameService) ListCategoriesByPlayer(playerId string, collection string) *MetagameListCategoriesByPlayerCall {
4848 c := &MetagameListCategoriesByPlayerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4849 c.playerId = playerId
4850 c.collection = collection
4851 return c
4852 }
4853
4854
4855
4856 func (c *MetagameListCategoriesByPlayerCall) Language(language string) *MetagameListCategoriesByPlayerCall {
4857 c.urlParams_.Set("language", language)
4858 return c
4859 }
4860
4861
4862
4863
4864
4865 func (c *MetagameListCategoriesByPlayerCall) MaxResults(maxResults int64) *MetagameListCategoriesByPlayerCall {
4866 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4867 return c
4868 }
4869
4870
4871
4872 func (c *MetagameListCategoriesByPlayerCall) PageToken(pageToken string) *MetagameListCategoriesByPlayerCall {
4873 c.urlParams_.Set("pageToken", pageToken)
4874 return c
4875 }
4876
4877
4878
4879
4880 func (c *MetagameListCategoriesByPlayerCall) Fields(s ...googleapi.Field) *MetagameListCategoriesByPlayerCall {
4881 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4882 return c
4883 }
4884
4885
4886
4887
4888 func (c *MetagameListCategoriesByPlayerCall) IfNoneMatch(entityTag string) *MetagameListCategoriesByPlayerCall {
4889 c.ifNoneMatch_ = entityTag
4890 return c
4891 }
4892
4893
4894 func (c *MetagameListCategoriesByPlayerCall) Context(ctx context.Context) *MetagameListCategoriesByPlayerCall {
4895 c.ctx_ = ctx
4896 return c
4897 }
4898
4899
4900
4901 func (c *MetagameListCategoriesByPlayerCall) Header() http.Header {
4902 if c.header_ == nil {
4903 c.header_ = make(http.Header)
4904 }
4905 return c.header_
4906 }
4907
4908 func (c *MetagameListCategoriesByPlayerCall) doRequest(alt string) (*http.Response, error) {
4909 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4910 if c.ifNoneMatch_ != "" {
4911 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4912 }
4913 var body io.Reader = nil
4914 c.urlParams_.Set("alt", alt)
4915 c.urlParams_.Set("prettyPrint", "false")
4916 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/categories/{collection}")
4917 urls += "?" + c.urlParams_.Encode()
4918 req, err := http.NewRequest("GET", urls, body)
4919 if err != nil {
4920 return nil, err
4921 }
4922 req.Header = reqHeaders
4923 googleapi.Expand(req.URL, map[string]string{
4924 "playerId": c.playerId,
4925 "collection": c.collection,
4926 })
4927 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4928 }
4929
4930
4931
4932
4933
4934
4935
4936 func (c *MetagameListCategoriesByPlayerCall) Do(opts ...googleapi.CallOption) (*CategoryListResponse, error) {
4937 gensupport.SetOptions(c.urlParams_, opts...)
4938 res, err := c.doRequest("json")
4939 if res != nil && res.StatusCode == http.StatusNotModified {
4940 if res.Body != nil {
4941 res.Body.Close()
4942 }
4943 return nil, gensupport.WrapError(&googleapi.Error{
4944 Code: res.StatusCode,
4945 Header: res.Header,
4946 })
4947 }
4948 if err != nil {
4949 return nil, err
4950 }
4951 defer googleapi.CloseBody(res)
4952 if err := googleapi.CheckResponse(res); err != nil {
4953 return nil, gensupport.WrapError(err)
4954 }
4955 ret := &CategoryListResponse{
4956 ServerResponse: googleapi.ServerResponse{
4957 Header: res.Header,
4958 HTTPStatusCode: res.StatusCode,
4959 },
4960 }
4961 target := &ret
4962 if err := gensupport.DecodeResponse(target, res); err != nil {
4963 return nil, err
4964 }
4965 return ret, nil
4966 }
4967
4968
4969
4970
4971 func (c *MetagameListCategoriesByPlayerCall) Pages(ctx context.Context, f func(*CategoryListResponse) error) error {
4972 c.ctx_ = ctx
4973 defer c.PageToken(c.urlParams_.Get("pageToken"))
4974 for {
4975 x, err := c.Do()
4976 if err != nil {
4977 return err
4978 }
4979 if err := f(x); err != nil {
4980 return err
4981 }
4982 if x.NextPageToken == "" {
4983 return nil
4984 }
4985 c.PageToken(x.NextPageToken)
4986 }
4987 }
4988
4989 type PlayersGetCall struct {
4990 s *Service
4991 playerId string
4992 urlParams_ gensupport.URLParams
4993 ifNoneMatch_ string
4994 ctx_ context.Context
4995 header_ http.Header
4996 }
4997
4998
4999
5000
5001
5002
5003 func (r *PlayersService) Get(playerId string) *PlayersGetCall {
5004 c := &PlayersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5005 c.playerId = playerId
5006 return c
5007 }
5008
5009
5010
5011 func (c *PlayersGetCall) Language(language string) *PlayersGetCall {
5012 c.urlParams_.Set("language", language)
5013 return c
5014 }
5015
5016
5017
5018
5019
5020 func (c *PlayersGetCall) PlayerIdConsistencyToken(playerIdConsistencyToken string) *PlayersGetCall {
5021 c.urlParams_.Set("playerIdConsistencyToken", playerIdConsistencyToken)
5022 return c
5023 }
5024
5025
5026
5027
5028 func (c *PlayersGetCall) Fields(s ...googleapi.Field) *PlayersGetCall {
5029 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5030 return c
5031 }
5032
5033
5034
5035
5036 func (c *PlayersGetCall) IfNoneMatch(entityTag string) *PlayersGetCall {
5037 c.ifNoneMatch_ = entityTag
5038 return c
5039 }
5040
5041
5042 func (c *PlayersGetCall) Context(ctx context.Context) *PlayersGetCall {
5043 c.ctx_ = ctx
5044 return c
5045 }
5046
5047
5048
5049 func (c *PlayersGetCall) Header() http.Header {
5050 if c.header_ == nil {
5051 c.header_ = make(http.Header)
5052 }
5053 return c.header_
5054 }
5055
5056 func (c *PlayersGetCall) doRequest(alt string) (*http.Response, error) {
5057 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5058 if c.ifNoneMatch_ != "" {
5059 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5060 }
5061 var body io.Reader = nil
5062 c.urlParams_.Set("alt", alt)
5063 c.urlParams_.Set("prettyPrint", "false")
5064 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}")
5065 urls += "?" + c.urlParams_.Encode()
5066 req, err := http.NewRequest("GET", urls, body)
5067 if err != nil {
5068 return nil, err
5069 }
5070 req.Header = reqHeaders
5071 googleapi.Expand(req.URL, map[string]string{
5072 "playerId": c.playerId,
5073 })
5074 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5075 }
5076
5077
5078
5079
5080
5081
5082 func (c *PlayersGetCall) Do(opts ...googleapi.CallOption) (*Player, error) {
5083 gensupport.SetOptions(c.urlParams_, opts...)
5084 res, err := c.doRequest("json")
5085 if res != nil && res.StatusCode == http.StatusNotModified {
5086 if res.Body != nil {
5087 res.Body.Close()
5088 }
5089 return nil, gensupport.WrapError(&googleapi.Error{
5090 Code: res.StatusCode,
5091 Header: res.Header,
5092 })
5093 }
5094 if err != nil {
5095 return nil, err
5096 }
5097 defer googleapi.CloseBody(res)
5098 if err := googleapi.CheckResponse(res); err != nil {
5099 return nil, gensupport.WrapError(err)
5100 }
5101 ret := &Player{
5102 ServerResponse: googleapi.ServerResponse{
5103 Header: res.Header,
5104 HTTPStatusCode: res.StatusCode,
5105 },
5106 }
5107 target := &ret
5108 if err := gensupport.DecodeResponse(target, res); err != nil {
5109 return nil, err
5110 }
5111 return ret, nil
5112 }
5113
5114 type PlayersGetMultipleApplicationPlayerIdsCall struct {
5115 s *Service
5116 urlParams_ gensupport.URLParams
5117 ifNoneMatch_ string
5118 ctx_ context.Context
5119 header_ http.Header
5120 }
5121
5122
5123
5124
5125
5126 func (r *PlayersService) GetMultipleApplicationPlayerIds() *PlayersGetMultipleApplicationPlayerIdsCall {
5127 c := &PlayersGetMultipleApplicationPlayerIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5128 return c
5129 }
5130
5131
5132
5133
5134 func (c *PlayersGetMultipleApplicationPlayerIdsCall) ApplicationIds(applicationIds ...string) *PlayersGetMultipleApplicationPlayerIdsCall {
5135 c.urlParams_.SetMulti("applicationIds", append([]string{}, applicationIds...))
5136 return c
5137 }
5138
5139
5140
5141
5142 func (c *PlayersGetMultipleApplicationPlayerIdsCall) Fields(s ...googleapi.Field) *PlayersGetMultipleApplicationPlayerIdsCall {
5143 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5144 return c
5145 }
5146
5147
5148
5149
5150 func (c *PlayersGetMultipleApplicationPlayerIdsCall) IfNoneMatch(entityTag string) *PlayersGetMultipleApplicationPlayerIdsCall {
5151 c.ifNoneMatch_ = entityTag
5152 return c
5153 }
5154
5155
5156 func (c *PlayersGetMultipleApplicationPlayerIdsCall) Context(ctx context.Context) *PlayersGetMultipleApplicationPlayerIdsCall {
5157 c.ctx_ = ctx
5158 return c
5159 }
5160
5161
5162
5163 func (c *PlayersGetMultipleApplicationPlayerIdsCall) Header() http.Header {
5164 if c.header_ == nil {
5165 c.header_ = make(http.Header)
5166 }
5167 return c.header_
5168 }
5169
5170 func (c *PlayersGetMultipleApplicationPlayerIdsCall) doRequest(alt string) (*http.Response, error) {
5171 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5172 if c.ifNoneMatch_ != "" {
5173 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5174 }
5175 var body io.Reader = nil
5176 c.urlParams_.Set("alt", alt)
5177 c.urlParams_.Set("prettyPrint", "false")
5178 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/me/multipleApplicationPlayerIds")
5179 urls += "?" + c.urlParams_.Encode()
5180 req, err := http.NewRequest("GET", urls, body)
5181 if err != nil {
5182 return nil, err
5183 }
5184 req.Header = reqHeaders
5185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5186 }
5187
5188
5189
5190
5191
5192
5193
5194 func (c *PlayersGetMultipleApplicationPlayerIdsCall) Do(opts ...googleapi.CallOption) (*GetMultipleApplicationPlayerIdsResponse, error) {
5195 gensupport.SetOptions(c.urlParams_, opts...)
5196 res, err := c.doRequest("json")
5197 if res != nil && res.StatusCode == http.StatusNotModified {
5198 if res.Body != nil {
5199 res.Body.Close()
5200 }
5201 return nil, gensupport.WrapError(&googleapi.Error{
5202 Code: res.StatusCode,
5203 Header: res.Header,
5204 })
5205 }
5206 if err != nil {
5207 return nil, err
5208 }
5209 defer googleapi.CloseBody(res)
5210 if err := googleapi.CheckResponse(res); err != nil {
5211 return nil, gensupport.WrapError(err)
5212 }
5213 ret := &GetMultipleApplicationPlayerIdsResponse{
5214 ServerResponse: googleapi.ServerResponse{
5215 Header: res.Header,
5216 HTTPStatusCode: res.StatusCode,
5217 },
5218 }
5219 target := &ret
5220 if err := gensupport.DecodeResponse(target, res); err != nil {
5221 return nil, err
5222 }
5223 return ret, nil
5224 }
5225
5226 type PlayersGetScopedPlayerIdsCall struct {
5227 s *Service
5228 urlParams_ gensupport.URLParams
5229 ifNoneMatch_ string
5230 ctx_ context.Context
5231 header_ http.Header
5232 }
5233
5234
5235
5236 func (r *PlayersService) GetScopedPlayerIds() *PlayersGetScopedPlayerIdsCall {
5237 c := &PlayersGetScopedPlayerIdsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5238 return c
5239 }
5240
5241
5242
5243
5244 func (c *PlayersGetScopedPlayerIdsCall) Fields(s ...googleapi.Field) *PlayersGetScopedPlayerIdsCall {
5245 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5246 return c
5247 }
5248
5249
5250
5251
5252 func (c *PlayersGetScopedPlayerIdsCall) IfNoneMatch(entityTag string) *PlayersGetScopedPlayerIdsCall {
5253 c.ifNoneMatch_ = entityTag
5254 return c
5255 }
5256
5257
5258 func (c *PlayersGetScopedPlayerIdsCall) Context(ctx context.Context) *PlayersGetScopedPlayerIdsCall {
5259 c.ctx_ = ctx
5260 return c
5261 }
5262
5263
5264
5265 func (c *PlayersGetScopedPlayerIdsCall) Header() http.Header {
5266 if c.header_ == nil {
5267 c.header_ = make(http.Header)
5268 }
5269 return c.header_
5270 }
5271
5272 func (c *PlayersGetScopedPlayerIdsCall) doRequest(alt string) (*http.Response, error) {
5273 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5274 if c.ifNoneMatch_ != "" {
5275 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5276 }
5277 var body io.Reader = nil
5278 c.urlParams_.Set("alt", alt)
5279 c.urlParams_.Set("prettyPrint", "false")
5280 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/me/scopedIds")
5281 urls += "?" + c.urlParams_.Encode()
5282 req, err := http.NewRequest("GET", urls, body)
5283 if err != nil {
5284 return nil, err
5285 }
5286 req.Header = reqHeaders
5287 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5288 }
5289
5290
5291
5292
5293
5294
5295
5296 func (c *PlayersGetScopedPlayerIdsCall) Do(opts ...googleapi.CallOption) (*ScopedPlayerIds, error) {
5297 gensupport.SetOptions(c.urlParams_, opts...)
5298 res, err := c.doRequest("json")
5299 if res != nil && res.StatusCode == http.StatusNotModified {
5300 if res.Body != nil {
5301 res.Body.Close()
5302 }
5303 return nil, gensupport.WrapError(&googleapi.Error{
5304 Code: res.StatusCode,
5305 Header: res.Header,
5306 })
5307 }
5308 if err != nil {
5309 return nil, err
5310 }
5311 defer googleapi.CloseBody(res)
5312 if err := googleapi.CheckResponse(res); err != nil {
5313 return nil, gensupport.WrapError(err)
5314 }
5315 ret := &ScopedPlayerIds{
5316 ServerResponse: googleapi.ServerResponse{
5317 Header: res.Header,
5318 HTTPStatusCode: res.StatusCode,
5319 },
5320 }
5321 target := &ret
5322 if err := gensupport.DecodeResponse(target, res); err != nil {
5323 return nil, err
5324 }
5325 return ret, nil
5326 }
5327
5328 type PlayersListCall struct {
5329 s *Service
5330 collection string
5331 urlParams_ gensupport.URLParams
5332 ifNoneMatch_ string
5333 ctx_ context.Context
5334 header_ http.Header
5335 }
5336
5337
5338
5339
5340 func (r *PlayersService) List(collection string) *PlayersListCall {
5341 c := &PlayersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5342 c.collection = collection
5343 return c
5344 }
5345
5346
5347
5348 func (c *PlayersListCall) Language(language string) *PlayersListCall {
5349 c.urlParams_.Set("language", language)
5350 return c
5351 }
5352
5353
5354
5355
5356
5357 func (c *PlayersListCall) MaxResults(maxResults int64) *PlayersListCall {
5358 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5359 return c
5360 }
5361
5362
5363
5364 func (c *PlayersListCall) PageToken(pageToken string) *PlayersListCall {
5365 c.urlParams_.Set("pageToken", pageToken)
5366 return c
5367 }
5368
5369
5370
5371
5372 func (c *PlayersListCall) Fields(s ...googleapi.Field) *PlayersListCall {
5373 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5374 return c
5375 }
5376
5377
5378
5379
5380 func (c *PlayersListCall) IfNoneMatch(entityTag string) *PlayersListCall {
5381 c.ifNoneMatch_ = entityTag
5382 return c
5383 }
5384
5385
5386 func (c *PlayersListCall) Context(ctx context.Context) *PlayersListCall {
5387 c.ctx_ = ctx
5388 return c
5389 }
5390
5391
5392
5393 func (c *PlayersListCall) Header() http.Header {
5394 if c.header_ == nil {
5395 c.header_ = make(http.Header)
5396 }
5397 return c.header_
5398 }
5399
5400 func (c *PlayersListCall) doRequest(alt string) (*http.Response, error) {
5401 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5402 if c.ifNoneMatch_ != "" {
5403 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5404 }
5405 var body io.Reader = nil
5406 c.urlParams_.Set("alt", alt)
5407 c.urlParams_.Set("prettyPrint", "false")
5408 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/me/players/{collection}")
5409 urls += "?" + c.urlParams_.Encode()
5410 req, err := http.NewRequest("GET", urls, body)
5411 if err != nil {
5412 return nil, err
5413 }
5414 req.Header = reqHeaders
5415 googleapi.Expand(req.URL, map[string]string{
5416 "collection": c.collection,
5417 })
5418 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5419 }
5420
5421
5422
5423
5424
5425
5426
5427 func (c *PlayersListCall) Do(opts ...googleapi.CallOption) (*PlayerListResponse, error) {
5428 gensupport.SetOptions(c.urlParams_, opts...)
5429 res, err := c.doRequest("json")
5430 if res != nil && res.StatusCode == http.StatusNotModified {
5431 if res.Body != nil {
5432 res.Body.Close()
5433 }
5434 return nil, gensupport.WrapError(&googleapi.Error{
5435 Code: res.StatusCode,
5436 Header: res.Header,
5437 })
5438 }
5439 if err != nil {
5440 return nil, err
5441 }
5442 defer googleapi.CloseBody(res)
5443 if err := googleapi.CheckResponse(res); err != nil {
5444 return nil, gensupport.WrapError(err)
5445 }
5446 ret := &PlayerListResponse{
5447 ServerResponse: googleapi.ServerResponse{
5448 Header: res.Header,
5449 HTTPStatusCode: res.StatusCode,
5450 },
5451 }
5452 target := &ret
5453 if err := gensupport.DecodeResponse(target, res); err != nil {
5454 return nil, err
5455 }
5456 return ret, nil
5457 }
5458
5459
5460
5461
5462 func (c *PlayersListCall) Pages(ctx context.Context, f func(*PlayerListResponse) error) error {
5463 c.ctx_ = ctx
5464 defer c.PageToken(c.urlParams_.Get("pageToken"))
5465 for {
5466 x, err := c.Do()
5467 if err != nil {
5468 return err
5469 }
5470 if err := f(x); err != nil {
5471 return err
5472 }
5473 if x.NextPageToken == "" {
5474 return nil
5475 }
5476 c.PageToken(x.NextPageToken)
5477 }
5478 }
5479
5480 type RecallLastTokenFromAllDeveloperGamesCall struct {
5481 s *Service
5482 sessionId string
5483 urlParams_ gensupport.URLParams
5484 ifNoneMatch_ string
5485 ctx_ context.Context
5486 header_ http.Header
5487 }
5488
5489
5490
5491
5492
5493
5494
5495
5496 func (r *RecallService) LastTokenFromAllDeveloperGames(sessionId string) *RecallLastTokenFromAllDeveloperGamesCall {
5497 c := &RecallLastTokenFromAllDeveloperGamesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5498 c.sessionId = sessionId
5499 return c
5500 }
5501
5502
5503
5504
5505 func (c *RecallLastTokenFromAllDeveloperGamesCall) Fields(s ...googleapi.Field) *RecallLastTokenFromAllDeveloperGamesCall {
5506 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5507 return c
5508 }
5509
5510
5511
5512
5513 func (c *RecallLastTokenFromAllDeveloperGamesCall) IfNoneMatch(entityTag string) *RecallLastTokenFromAllDeveloperGamesCall {
5514 c.ifNoneMatch_ = entityTag
5515 return c
5516 }
5517
5518
5519 func (c *RecallLastTokenFromAllDeveloperGamesCall) Context(ctx context.Context) *RecallLastTokenFromAllDeveloperGamesCall {
5520 c.ctx_ = ctx
5521 return c
5522 }
5523
5524
5525
5526 func (c *RecallLastTokenFromAllDeveloperGamesCall) Header() http.Header {
5527 if c.header_ == nil {
5528 c.header_ = make(http.Header)
5529 }
5530 return c.header_
5531 }
5532
5533 func (c *RecallLastTokenFromAllDeveloperGamesCall) doRequest(alt string) (*http.Response, error) {
5534 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5535 if c.ifNoneMatch_ != "" {
5536 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5537 }
5538 var body io.Reader = nil
5539 c.urlParams_.Set("alt", alt)
5540 c.urlParams_.Set("prettyPrint", "false")
5541 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall/developerGamesLastPlayerToken/{sessionId}")
5542 urls += "?" + c.urlParams_.Encode()
5543 req, err := http.NewRequest("GET", urls, body)
5544 if err != nil {
5545 return nil, err
5546 }
5547 req.Header = reqHeaders
5548 googleapi.Expand(req.URL, map[string]string{
5549 "sessionId": c.sessionId,
5550 })
5551 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5552 }
5553
5554
5555
5556
5557
5558
5559
5560 func (c *RecallLastTokenFromAllDeveloperGamesCall) Do(opts ...googleapi.CallOption) (*RetrieveDeveloperGamesLastPlayerTokenResponse, error) {
5561 gensupport.SetOptions(c.urlParams_, opts...)
5562 res, err := c.doRequest("json")
5563 if res != nil && res.StatusCode == http.StatusNotModified {
5564 if res.Body != nil {
5565 res.Body.Close()
5566 }
5567 return nil, gensupport.WrapError(&googleapi.Error{
5568 Code: res.StatusCode,
5569 Header: res.Header,
5570 })
5571 }
5572 if err != nil {
5573 return nil, err
5574 }
5575 defer googleapi.CloseBody(res)
5576 if err := googleapi.CheckResponse(res); err != nil {
5577 return nil, gensupport.WrapError(err)
5578 }
5579 ret := &RetrieveDeveloperGamesLastPlayerTokenResponse{
5580 ServerResponse: googleapi.ServerResponse{
5581 Header: res.Header,
5582 HTTPStatusCode: res.StatusCode,
5583 },
5584 }
5585 target := &ret
5586 if err := gensupport.DecodeResponse(target, res); err != nil {
5587 return nil, err
5588 }
5589 return ret, nil
5590 }
5591
5592 type RecallLinkPersonaCall struct {
5593 s *Service
5594 linkpersonarequest *LinkPersonaRequest
5595 urlParams_ gensupport.URLParams
5596 ctx_ context.Context
5597 header_ http.Header
5598 }
5599
5600
5601
5602 func (r *RecallService) LinkPersona(linkpersonarequest *LinkPersonaRequest) *RecallLinkPersonaCall {
5603 c := &RecallLinkPersonaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5604 c.linkpersonarequest = linkpersonarequest
5605 return c
5606 }
5607
5608
5609
5610
5611 func (c *RecallLinkPersonaCall) Fields(s ...googleapi.Field) *RecallLinkPersonaCall {
5612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5613 return c
5614 }
5615
5616
5617 func (c *RecallLinkPersonaCall) Context(ctx context.Context) *RecallLinkPersonaCall {
5618 c.ctx_ = ctx
5619 return c
5620 }
5621
5622
5623
5624 func (c *RecallLinkPersonaCall) Header() http.Header {
5625 if c.header_ == nil {
5626 c.header_ = make(http.Header)
5627 }
5628 return c.header_
5629 }
5630
5631 func (c *RecallLinkPersonaCall) doRequest(alt string) (*http.Response, error) {
5632 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5633 var body io.Reader = nil
5634 body, err := googleapi.WithoutDataWrapper.JSONReader(c.linkpersonarequest)
5635 if err != nil {
5636 return nil, err
5637 }
5638 c.urlParams_.Set("alt", alt)
5639 c.urlParams_.Set("prettyPrint", "false")
5640 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall:linkPersona")
5641 urls += "?" + c.urlParams_.Encode()
5642 req, err := http.NewRequest("POST", urls, body)
5643 if err != nil {
5644 return nil, err
5645 }
5646 req.Header = reqHeaders
5647 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5648 }
5649
5650
5651
5652
5653
5654
5655
5656 func (c *RecallLinkPersonaCall) Do(opts ...googleapi.CallOption) (*LinkPersonaResponse, error) {
5657 gensupport.SetOptions(c.urlParams_, opts...)
5658 res, err := c.doRequest("json")
5659 if res != nil && res.StatusCode == http.StatusNotModified {
5660 if res.Body != nil {
5661 res.Body.Close()
5662 }
5663 return nil, gensupport.WrapError(&googleapi.Error{
5664 Code: res.StatusCode,
5665 Header: res.Header,
5666 })
5667 }
5668 if err != nil {
5669 return nil, err
5670 }
5671 defer googleapi.CloseBody(res)
5672 if err := googleapi.CheckResponse(res); err != nil {
5673 return nil, gensupport.WrapError(err)
5674 }
5675 ret := &LinkPersonaResponse{
5676 ServerResponse: googleapi.ServerResponse{
5677 Header: res.Header,
5678 HTTPStatusCode: res.StatusCode,
5679 },
5680 }
5681 target := &ret
5682 if err := gensupport.DecodeResponse(target, res); err != nil {
5683 return nil, err
5684 }
5685 return ret, nil
5686 }
5687
5688 type RecallResetPersonaCall struct {
5689 s *Service
5690 resetpersonarequest *ResetPersonaRequest
5691 urlParams_ gensupport.URLParams
5692 ctx_ context.Context
5693 header_ http.Header
5694 }
5695
5696
5697
5698 func (r *RecallService) ResetPersona(resetpersonarequest *ResetPersonaRequest) *RecallResetPersonaCall {
5699 c := &RecallResetPersonaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5700 c.resetpersonarequest = resetpersonarequest
5701 return c
5702 }
5703
5704
5705
5706
5707 func (c *RecallResetPersonaCall) Fields(s ...googleapi.Field) *RecallResetPersonaCall {
5708 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5709 return c
5710 }
5711
5712
5713 func (c *RecallResetPersonaCall) Context(ctx context.Context) *RecallResetPersonaCall {
5714 c.ctx_ = ctx
5715 return c
5716 }
5717
5718
5719
5720 func (c *RecallResetPersonaCall) Header() http.Header {
5721 if c.header_ == nil {
5722 c.header_ = make(http.Header)
5723 }
5724 return c.header_
5725 }
5726
5727 func (c *RecallResetPersonaCall) doRequest(alt string) (*http.Response, error) {
5728 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5729 var body io.Reader = nil
5730 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetpersonarequest)
5731 if err != nil {
5732 return nil, err
5733 }
5734 c.urlParams_.Set("alt", alt)
5735 c.urlParams_.Set("prettyPrint", "false")
5736 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall:resetPersona")
5737 urls += "?" + c.urlParams_.Encode()
5738 req, err := http.NewRequest("POST", urls, body)
5739 if err != nil {
5740 return nil, err
5741 }
5742 req.Header = reqHeaders
5743 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5744 }
5745
5746
5747
5748
5749
5750
5751
5752 func (c *RecallResetPersonaCall) Do(opts ...googleapi.CallOption) (*ResetPersonaResponse, error) {
5753 gensupport.SetOptions(c.urlParams_, opts...)
5754 res, err := c.doRequest("json")
5755 if res != nil && res.StatusCode == http.StatusNotModified {
5756 if res.Body != nil {
5757 res.Body.Close()
5758 }
5759 return nil, gensupport.WrapError(&googleapi.Error{
5760 Code: res.StatusCode,
5761 Header: res.Header,
5762 })
5763 }
5764 if err != nil {
5765 return nil, err
5766 }
5767 defer googleapi.CloseBody(res)
5768 if err := googleapi.CheckResponse(res); err != nil {
5769 return nil, gensupport.WrapError(err)
5770 }
5771 ret := &ResetPersonaResponse{
5772 ServerResponse: googleapi.ServerResponse{
5773 Header: res.Header,
5774 HTTPStatusCode: res.StatusCode,
5775 },
5776 }
5777 target := &ret
5778 if err := gensupport.DecodeResponse(target, res); err != nil {
5779 return nil, err
5780 }
5781 return ret, nil
5782 }
5783
5784 type RecallRetrieveTokensCall struct {
5785 s *Service
5786 sessionId string
5787 urlParams_ gensupport.URLParams
5788 ifNoneMatch_ string
5789 ctx_ context.Context
5790 header_ http.Header
5791 }
5792
5793
5794
5795
5796
5797
5798
5799 func (r *RecallService) RetrieveTokens(sessionId string) *RecallRetrieveTokensCall {
5800 c := &RecallRetrieveTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5801 c.sessionId = sessionId
5802 return c
5803 }
5804
5805
5806
5807
5808 func (c *RecallRetrieveTokensCall) Fields(s ...googleapi.Field) *RecallRetrieveTokensCall {
5809 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5810 return c
5811 }
5812
5813
5814
5815
5816 func (c *RecallRetrieveTokensCall) IfNoneMatch(entityTag string) *RecallRetrieveTokensCall {
5817 c.ifNoneMatch_ = entityTag
5818 return c
5819 }
5820
5821
5822 func (c *RecallRetrieveTokensCall) Context(ctx context.Context) *RecallRetrieveTokensCall {
5823 c.ctx_ = ctx
5824 return c
5825 }
5826
5827
5828
5829 func (c *RecallRetrieveTokensCall) Header() http.Header {
5830 if c.header_ == nil {
5831 c.header_ = make(http.Header)
5832 }
5833 return c.header_
5834 }
5835
5836 func (c *RecallRetrieveTokensCall) doRequest(alt string) (*http.Response, error) {
5837 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5838 if c.ifNoneMatch_ != "" {
5839 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5840 }
5841 var body io.Reader = nil
5842 c.urlParams_.Set("alt", alt)
5843 c.urlParams_.Set("prettyPrint", "false")
5844 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall/tokens/{sessionId}")
5845 urls += "?" + c.urlParams_.Encode()
5846 req, err := http.NewRequest("GET", urls, body)
5847 if err != nil {
5848 return nil, err
5849 }
5850 req.Header = reqHeaders
5851 googleapi.Expand(req.URL, map[string]string{
5852 "sessionId": c.sessionId,
5853 })
5854 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5855 }
5856
5857
5858
5859
5860
5861
5862
5863 func (c *RecallRetrieveTokensCall) Do(opts ...googleapi.CallOption) (*RetrievePlayerTokensResponse, error) {
5864 gensupport.SetOptions(c.urlParams_, opts...)
5865 res, err := c.doRequest("json")
5866 if res != nil && res.StatusCode == http.StatusNotModified {
5867 if res.Body != nil {
5868 res.Body.Close()
5869 }
5870 return nil, gensupport.WrapError(&googleapi.Error{
5871 Code: res.StatusCode,
5872 Header: res.Header,
5873 })
5874 }
5875 if err != nil {
5876 return nil, err
5877 }
5878 defer googleapi.CloseBody(res)
5879 if err := googleapi.CheckResponse(res); err != nil {
5880 return nil, gensupport.WrapError(err)
5881 }
5882 ret := &RetrievePlayerTokensResponse{
5883 ServerResponse: googleapi.ServerResponse{
5884 Header: res.Header,
5885 HTTPStatusCode: res.StatusCode,
5886 },
5887 }
5888 target := &ret
5889 if err := gensupport.DecodeResponse(target, res); err != nil {
5890 return nil, err
5891 }
5892 return ret, nil
5893 }
5894
5895 type RecallUnlinkPersonaCall struct {
5896 s *Service
5897 unlinkpersonarequest *UnlinkPersonaRequest
5898 urlParams_ gensupport.URLParams
5899 ctx_ context.Context
5900 header_ http.Header
5901 }
5902
5903
5904
5905
5906 func (r *RecallService) UnlinkPersona(unlinkpersonarequest *UnlinkPersonaRequest) *RecallUnlinkPersonaCall {
5907 c := &RecallUnlinkPersonaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5908 c.unlinkpersonarequest = unlinkpersonarequest
5909 return c
5910 }
5911
5912
5913
5914
5915 func (c *RecallUnlinkPersonaCall) Fields(s ...googleapi.Field) *RecallUnlinkPersonaCall {
5916 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5917 return c
5918 }
5919
5920
5921 func (c *RecallUnlinkPersonaCall) Context(ctx context.Context) *RecallUnlinkPersonaCall {
5922 c.ctx_ = ctx
5923 return c
5924 }
5925
5926
5927
5928 func (c *RecallUnlinkPersonaCall) Header() http.Header {
5929 if c.header_ == nil {
5930 c.header_ = make(http.Header)
5931 }
5932 return c.header_
5933 }
5934
5935 func (c *RecallUnlinkPersonaCall) doRequest(alt string) (*http.Response, error) {
5936 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5937 var body io.Reader = nil
5938 body, err := googleapi.WithoutDataWrapper.JSONReader(c.unlinkpersonarequest)
5939 if err != nil {
5940 return nil, err
5941 }
5942 c.urlParams_.Set("alt", alt)
5943 c.urlParams_.Set("prettyPrint", "false")
5944 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall:unlinkPersona")
5945 urls += "?" + c.urlParams_.Encode()
5946 req, err := http.NewRequest("POST", urls, body)
5947 if err != nil {
5948 return nil, err
5949 }
5950 req.Header = reqHeaders
5951 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5952 }
5953
5954
5955
5956
5957
5958
5959
5960 func (c *RecallUnlinkPersonaCall) Do(opts ...googleapi.CallOption) (*UnlinkPersonaResponse, error) {
5961 gensupport.SetOptions(c.urlParams_, opts...)
5962 res, err := c.doRequest("json")
5963 if res != nil && res.StatusCode == http.StatusNotModified {
5964 if res.Body != nil {
5965 res.Body.Close()
5966 }
5967 return nil, gensupport.WrapError(&googleapi.Error{
5968 Code: res.StatusCode,
5969 Header: res.Header,
5970 })
5971 }
5972 if err != nil {
5973 return nil, err
5974 }
5975 defer googleapi.CloseBody(res)
5976 if err := googleapi.CheckResponse(res); err != nil {
5977 return nil, gensupport.WrapError(err)
5978 }
5979 ret := &UnlinkPersonaResponse{
5980 ServerResponse: googleapi.ServerResponse{
5981 Header: res.Header,
5982 HTTPStatusCode: res.StatusCode,
5983 },
5984 }
5985 target := &ret
5986 if err := gensupport.DecodeResponse(target, res); err != nil {
5987 return nil, err
5988 }
5989 return ret, nil
5990 }
5991
5992 type RevisionsCheckCall struct {
5993 s *Service
5994 urlParams_ gensupport.URLParams
5995 ifNoneMatch_ string
5996 ctx_ context.Context
5997 header_ http.Header
5998 }
5999
6000
6001
6002
6003
6004
6005
6006
6007 func (r *RevisionsService) Check(clientRevision string) *RevisionsCheckCall {
6008 c := &RevisionsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6009 c.urlParams_.Set("clientRevision", clientRevision)
6010 return c
6011 }
6012
6013
6014
6015
6016 func (c *RevisionsCheckCall) Fields(s ...googleapi.Field) *RevisionsCheckCall {
6017 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6018 return c
6019 }
6020
6021
6022
6023
6024 func (c *RevisionsCheckCall) IfNoneMatch(entityTag string) *RevisionsCheckCall {
6025 c.ifNoneMatch_ = entityTag
6026 return c
6027 }
6028
6029
6030 func (c *RevisionsCheckCall) Context(ctx context.Context) *RevisionsCheckCall {
6031 c.ctx_ = ctx
6032 return c
6033 }
6034
6035
6036
6037 func (c *RevisionsCheckCall) Header() http.Header {
6038 if c.header_ == nil {
6039 c.header_ = make(http.Header)
6040 }
6041 return c.header_
6042 }
6043
6044 func (c *RevisionsCheckCall) doRequest(alt string) (*http.Response, error) {
6045 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6046 if c.ifNoneMatch_ != "" {
6047 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6048 }
6049 var body io.Reader = nil
6050 c.urlParams_.Set("alt", alt)
6051 c.urlParams_.Set("prettyPrint", "false")
6052 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/revisions/check")
6053 urls += "?" + c.urlParams_.Encode()
6054 req, err := http.NewRequest("GET", urls, body)
6055 if err != nil {
6056 return nil, err
6057 }
6058 req.Header = reqHeaders
6059 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6060 }
6061
6062
6063
6064
6065
6066
6067
6068 func (c *RevisionsCheckCall) Do(opts ...googleapi.CallOption) (*RevisionCheckResponse, error) {
6069 gensupport.SetOptions(c.urlParams_, opts...)
6070 res, err := c.doRequest("json")
6071 if res != nil && res.StatusCode == http.StatusNotModified {
6072 if res.Body != nil {
6073 res.Body.Close()
6074 }
6075 return nil, gensupport.WrapError(&googleapi.Error{
6076 Code: res.StatusCode,
6077 Header: res.Header,
6078 })
6079 }
6080 if err != nil {
6081 return nil, err
6082 }
6083 defer googleapi.CloseBody(res)
6084 if err := googleapi.CheckResponse(res); err != nil {
6085 return nil, gensupport.WrapError(err)
6086 }
6087 ret := &RevisionCheckResponse{
6088 ServerResponse: googleapi.ServerResponse{
6089 Header: res.Header,
6090 HTTPStatusCode: res.StatusCode,
6091 },
6092 }
6093 target := &ret
6094 if err := gensupport.DecodeResponse(target, res); err != nil {
6095 return nil, err
6096 }
6097 return ret, nil
6098 }
6099
6100 type ScoresGetCall struct {
6101 s *Service
6102 playerId string
6103 leaderboardId string
6104 timeSpan string
6105 urlParams_ gensupport.URLParams
6106 ifNoneMatch_ string
6107 ctx_ context.Context
6108 header_ http.Header
6109 }
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122 func (r *ScoresService) Get(playerId string, leaderboardId string, timeSpan string) *ScoresGetCall {
6123 c := &ScoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6124 c.playerId = playerId
6125 c.leaderboardId = leaderboardId
6126 c.timeSpan = timeSpan
6127 return c
6128 }
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145 func (c *ScoresGetCall) IncludeRankType(includeRankType string) *ScoresGetCall {
6146 c.urlParams_.Set("includeRankType", includeRankType)
6147 return c
6148 }
6149
6150
6151
6152 func (c *ScoresGetCall) Language(language string) *ScoresGetCall {
6153 c.urlParams_.Set("language", language)
6154 return c
6155 }
6156
6157
6158
6159
6160
6161 func (c *ScoresGetCall) MaxResults(maxResults int64) *ScoresGetCall {
6162 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6163 return c
6164 }
6165
6166
6167
6168 func (c *ScoresGetCall) PageToken(pageToken string) *ScoresGetCall {
6169 c.urlParams_.Set("pageToken", pageToken)
6170 return c
6171 }
6172
6173
6174
6175
6176 func (c *ScoresGetCall) Fields(s ...googleapi.Field) *ScoresGetCall {
6177 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6178 return c
6179 }
6180
6181
6182
6183
6184 func (c *ScoresGetCall) IfNoneMatch(entityTag string) *ScoresGetCall {
6185 c.ifNoneMatch_ = entityTag
6186 return c
6187 }
6188
6189
6190 func (c *ScoresGetCall) Context(ctx context.Context) *ScoresGetCall {
6191 c.ctx_ = ctx
6192 return c
6193 }
6194
6195
6196
6197 func (c *ScoresGetCall) Header() http.Header {
6198 if c.header_ == nil {
6199 c.header_ = make(http.Header)
6200 }
6201 return c.header_
6202 }
6203
6204 func (c *ScoresGetCall) doRequest(alt string) (*http.Response, error) {
6205 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6206 if c.ifNoneMatch_ != "" {
6207 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6208 }
6209 var body io.Reader = nil
6210 c.urlParams_.Set("alt", alt)
6211 c.urlParams_.Set("prettyPrint", "false")
6212 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}")
6213 urls += "?" + c.urlParams_.Encode()
6214 req, err := http.NewRequest("GET", urls, body)
6215 if err != nil {
6216 return nil, err
6217 }
6218 req.Header = reqHeaders
6219 googleapi.Expand(req.URL, map[string]string{
6220 "playerId": c.playerId,
6221 "leaderboardId": c.leaderboardId,
6222 "timeSpan": c.timeSpan,
6223 })
6224 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6225 }
6226
6227
6228
6229
6230
6231
6232
6233 func (c *ScoresGetCall) Do(opts ...googleapi.CallOption) (*PlayerLeaderboardScoreListResponse, error) {
6234 gensupport.SetOptions(c.urlParams_, opts...)
6235 res, err := c.doRequest("json")
6236 if res != nil && res.StatusCode == http.StatusNotModified {
6237 if res.Body != nil {
6238 res.Body.Close()
6239 }
6240 return nil, gensupport.WrapError(&googleapi.Error{
6241 Code: res.StatusCode,
6242 Header: res.Header,
6243 })
6244 }
6245 if err != nil {
6246 return nil, err
6247 }
6248 defer googleapi.CloseBody(res)
6249 if err := googleapi.CheckResponse(res); err != nil {
6250 return nil, gensupport.WrapError(err)
6251 }
6252 ret := &PlayerLeaderboardScoreListResponse{
6253 ServerResponse: googleapi.ServerResponse{
6254 Header: res.Header,
6255 HTTPStatusCode: res.StatusCode,
6256 },
6257 }
6258 target := &ret
6259 if err := gensupport.DecodeResponse(target, res); err != nil {
6260 return nil, err
6261 }
6262 return ret, nil
6263 }
6264
6265
6266
6267
6268 func (c *ScoresGetCall) Pages(ctx context.Context, f func(*PlayerLeaderboardScoreListResponse) error) error {
6269 c.ctx_ = ctx
6270 defer c.PageToken(c.urlParams_.Get("pageToken"))
6271 for {
6272 x, err := c.Do()
6273 if err != nil {
6274 return err
6275 }
6276 if err := f(x); err != nil {
6277 return err
6278 }
6279 if x.NextPageToken == "" {
6280 return nil
6281 }
6282 c.PageToken(x.NextPageToken)
6283 }
6284 }
6285
6286 type ScoresListCall struct {
6287 s *Service
6288 leaderboardId string
6289 collection string
6290 urlParams_ gensupport.URLParams
6291 ifNoneMatch_ string
6292 ctx_ context.Context
6293 header_ http.Header
6294 }
6295
6296
6297
6298
6299
6300
6301 func (r *ScoresService) List(leaderboardId string, collection string, timeSpan string) *ScoresListCall {
6302 c := &ScoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6303 c.leaderboardId = leaderboardId
6304 c.collection = collection
6305 c.urlParams_.Set("timeSpan", timeSpan)
6306 return c
6307 }
6308
6309
6310
6311 func (c *ScoresListCall) Language(language string) *ScoresListCall {
6312 c.urlParams_.Set("language", language)
6313 return c
6314 }
6315
6316
6317
6318
6319
6320 func (c *ScoresListCall) MaxResults(maxResults int64) *ScoresListCall {
6321 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6322 return c
6323 }
6324
6325
6326
6327 func (c *ScoresListCall) PageToken(pageToken string) *ScoresListCall {
6328 c.urlParams_.Set("pageToken", pageToken)
6329 return c
6330 }
6331
6332
6333
6334
6335 func (c *ScoresListCall) Fields(s ...googleapi.Field) *ScoresListCall {
6336 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6337 return c
6338 }
6339
6340
6341
6342
6343 func (c *ScoresListCall) IfNoneMatch(entityTag string) *ScoresListCall {
6344 c.ifNoneMatch_ = entityTag
6345 return c
6346 }
6347
6348
6349 func (c *ScoresListCall) Context(ctx context.Context) *ScoresListCall {
6350 c.ctx_ = ctx
6351 return c
6352 }
6353
6354
6355
6356 func (c *ScoresListCall) Header() http.Header {
6357 if c.header_ == nil {
6358 c.header_ = make(http.Header)
6359 }
6360 return c.header_
6361 }
6362
6363 func (c *ScoresListCall) doRequest(alt string) (*http.Response, error) {
6364 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6365 if c.ifNoneMatch_ != "" {
6366 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6367 }
6368 var body io.Reader = nil
6369 c.urlParams_.Set("alt", alt)
6370 c.urlParams_.Set("prettyPrint", "false")
6371 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}/scores/{collection}")
6372 urls += "?" + c.urlParams_.Encode()
6373 req, err := http.NewRequest("GET", urls, body)
6374 if err != nil {
6375 return nil, err
6376 }
6377 req.Header = reqHeaders
6378 googleapi.Expand(req.URL, map[string]string{
6379 "leaderboardId": c.leaderboardId,
6380 "collection": c.collection,
6381 })
6382 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6383 }
6384
6385
6386
6387
6388
6389
6390
6391 func (c *ScoresListCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, error) {
6392 gensupport.SetOptions(c.urlParams_, opts...)
6393 res, err := c.doRequest("json")
6394 if res != nil && res.StatusCode == http.StatusNotModified {
6395 if res.Body != nil {
6396 res.Body.Close()
6397 }
6398 return nil, gensupport.WrapError(&googleapi.Error{
6399 Code: res.StatusCode,
6400 Header: res.Header,
6401 })
6402 }
6403 if err != nil {
6404 return nil, err
6405 }
6406 defer googleapi.CloseBody(res)
6407 if err := googleapi.CheckResponse(res); err != nil {
6408 return nil, gensupport.WrapError(err)
6409 }
6410 ret := &LeaderboardScores{
6411 ServerResponse: googleapi.ServerResponse{
6412 Header: res.Header,
6413 HTTPStatusCode: res.StatusCode,
6414 },
6415 }
6416 target := &ret
6417 if err := gensupport.DecodeResponse(target, res); err != nil {
6418 return nil, err
6419 }
6420 return ret, nil
6421 }
6422
6423
6424
6425
6426 func (c *ScoresListCall) Pages(ctx context.Context, f func(*LeaderboardScores) error) error {
6427 c.ctx_ = ctx
6428 defer c.PageToken(c.urlParams_.Get("pageToken"))
6429 for {
6430 x, err := c.Do()
6431 if err != nil {
6432 return err
6433 }
6434 if err := f(x); err != nil {
6435 return err
6436 }
6437 if x.NextPageToken == "" {
6438 return nil
6439 }
6440 c.PageToken(x.NextPageToken)
6441 }
6442 }
6443
6444 type ScoresListWindowCall struct {
6445 s *Service
6446 leaderboardId string
6447 collection string
6448 urlParams_ gensupport.URLParams
6449 ifNoneMatch_ string
6450 ctx_ context.Context
6451 header_ http.Header
6452 }
6453
6454
6455
6456
6457
6458
6459
6460 func (r *ScoresService) ListWindow(leaderboardId string, collection string, timeSpan string) *ScoresListWindowCall {
6461 c := &ScoresListWindowCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6462 c.leaderboardId = leaderboardId
6463 c.collection = collection
6464 c.urlParams_.Set("timeSpan", timeSpan)
6465 return c
6466 }
6467
6468
6469
6470 func (c *ScoresListWindowCall) Language(language string) *ScoresListWindowCall {
6471 c.urlParams_.Set("language", language)
6472 return c
6473 }
6474
6475
6476
6477
6478
6479 func (c *ScoresListWindowCall) MaxResults(maxResults int64) *ScoresListWindowCall {
6480 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6481 return c
6482 }
6483
6484
6485
6486 func (c *ScoresListWindowCall) PageToken(pageToken string) *ScoresListWindowCall {
6487 c.urlParams_.Set("pageToken", pageToken)
6488 return c
6489 }
6490
6491
6492
6493
6494
6495
6496 func (c *ScoresListWindowCall) ResultsAbove(resultsAbove int64) *ScoresListWindowCall {
6497 c.urlParams_.Set("resultsAbove", fmt.Sprint(resultsAbove))
6498 return c
6499 }
6500
6501
6502
6503
6504 func (c *ScoresListWindowCall) ReturnTopIfAbsent(returnTopIfAbsent bool) *ScoresListWindowCall {
6505 c.urlParams_.Set("returnTopIfAbsent", fmt.Sprint(returnTopIfAbsent))
6506 return c
6507 }
6508
6509
6510
6511
6512 func (c *ScoresListWindowCall) Fields(s ...googleapi.Field) *ScoresListWindowCall {
6513 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6514 return c
6515 }
6516
6517
6518
6519
6520 func (c *ScoresListWindowCall) IfNoneMatch(entityTag string) *ScoresListWindowCall {
6521 c.ifNoneMatch_ = entityTag
6522 return c
6523 }
6524
6525
6526 func (c *ScoresListWindowCall) Context(ctx context.Context) *ScoresListWindowCall {
6527 c.ctx_ = ctx
6528 return c
6529 }
6530
6531
6532
6533 func (c *ScoresListWindowCall) Header() http.Header {
6534 if c.header_ == nil {
6535 c.header_ = make(http.Header)
6536 }
6537 return c.header_
6538 }
6539
6540 func (c *ScoresListWindowCall) doRequest(alt string) (*http.Response, error) {
6541 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6542 if c.ifNoneMatch_ != "" {
6543 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6544 }
6545 var body io.Reader = nil
6546 c.urlParams_.Set("alt", alt)
6547 c.urlParams_.Set("prettyPrint", "false")
6548 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}/window/{collection}")
6549 urls += "?" + c.urlParams_.Encode()
6550 req, err := http.NewRequest("GET", urls, body)
6551 if err != nil {
6552 return nil, err
6553 }
6554 req.Header = reqHeaders
6555 googleapi.Expand(req.URL, map[string]string{
6556 "leaderboardId": c.leaderboardId,
6557 "collection": c.collection,
6558 })
6559 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6560 }
6561
6562
6563
6564
6565
6566
6567
6568 func (c *ScoresListWindowCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, error) {
6569 gensupport.SetOptions(c.urlParams_, opts...)
6570 res, err := c.doRequest("json")
6571 if res != nil && res.StatusCode == http.StatusNotModified {
6572 if res.Body != nil {
6573 res.Body.Close()
6574 }
6575 return nil, gensupport.WrapError(&googleapi.Error{
6576 Code: res.StatusCode,
6577 Header: res.Header,
6578 })
6579 }
6580 if err != nil {
6581 return nil, err
6582 }
6583 defer googleapi.CloseBody(res)
6584 if err := googleapi.CheckResponse(res); err != nil {
6585 return nil, gensupport.WrapError(err)
6586 }
6587 ret := &LeaderboardScores{
6588 ServerResponse: googleapi.ServerResponse{
6589 Header: res.Header,
6590 HTTPStatusCode: res.StatusCode,
6591 },
6592 }
6593 target := &ret
6594 if err := gensupport.DecodeResponse(target, res); err != nil {
6595 return nil, err
6596 }
6597 return ret, nil
6598 }
6599
6600
6601
6602
6603 func (c *ScoresListWindowCall) Pages(ctx context.Context, f func(*LeaderboardScores) error) error {
6604 c.ctx_ = ctx
6605 defer c.PageToken(c.urlParams_.Get("pageToken"))
6606 for {
6607 x, err := c.Do()
6608 if err != nil {
6609 return err
6610 }
6611 if err := f(x); err != nil {
6612 return err
6613 }
6614 if x.NextPageToken == "" {
6615 return nil
6616 }
6617 c.PageToken(x.NextPageToken)
6618 }
6619 }
6620
6621 type ScoresSubmitCall struct {
6622 s *Service
6623 leaderboardId string
6624 urlParams_ gensupport.URLParams
6625 ctx_ context.Context
6626 header_ http.Header
6627 }
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638 func (r *ScoresService) Submit(leaderboardId string, score int64) *ScoresSubmitCall {
6639 c := &ScoresSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6640 c.leaderboardId = leaderboardId
6641 c.urlParams_.Set("score", fmt.Sprint(score))
6642 return c
6643 }
6644
6645
6646
6647 func (c *ScoresSubmitCall) Language(language string) *ScoresSubmitCall {
6648 c.urlParams_.Set("language", language)
6649 return c
6650 }
6651
6652
6653
6654
6655 func (c *ScoresSubmitCall) ScoreTag(scoreTag string) *ScoresSubmitCall {
6656 c.urlParams_.Set("scoreTag", scoreTag)
6657 return c
6658 }
6659
6660
6661
6662
6663 func (c *ScoresSubmitCall) Fields(s ...googleapi.Field) *ScoresSubmitCall {
6664 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6665 return c
6666 }
6667
6668
6669 func (c *ScoresSubmitCall) Context(ctx context.Context) *ScoresSubmitCall {
6670 c.ctx_ = ctx
6671 return c
6672 }
6673
6674
6675
6676 func (c *ScoresSubmitCall) Header() http.Header {
6677 if c.header_ == nil {
6678 c.header_ = make(http.Header)
6679 }
6680 return c.header_
6681 }
6682
6683 func (c *ScoresSubmitCall) doRequest(alt string) (*http.Response, error) {
6684 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6685 var body io.Reader = nil
6686 c.urlParams_.Set("alt", alt)
6687 c.urlParams_.Set("prettyPrint", "false")
6688 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/{leaderboardId}/scores")
6689 urls += "?" + c.urlParams_.Encode()
6690 req, err := http.NewRequest("POST", urls, body)
6691 if err != nil {
6692 return nil, err
6693 }
6694 req.Header = reqHeaders
6695 googleapi.Expand(req.URL, map[string]string{
6696 "leaderboardId": c.leaderboardId,
6697 })
6698 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6699 }
6700
6701
6702
6703
6704
6705
6706
6707 func (c *ScoresSubmitCall) Do(opts ...googleapi.CallOption) (*PlayerScoreResponse, error) {
6708 gensupport.SetOptions(c.urlParams_, opts...)
6709 res, err := c.doRequest("json")
6710 if res != nil && res.StatusCode == http.StatusNotModified {
6711 if res.Body != nil {
6712 res.Body.Close()
6713 }
6714 return nil, gensupport.WrapError(&googleapi.Error{
6715 Code: res.StatusCode,
6716 Header: res.Header,
6717 })
6718 }
6719 if err != nil {
6720 return nil, err
6721 }
6722 defer googleapi.CloseBody(res)
6723 if err := googleapi.CheckResponse(res); err != nil {
6724 return nil, gensupport.WrapError(err)
6725 }
6726 ret := &PlayerScoreResponse{
6727 ServerResponse: googleapi.ServerResponse{
6728 Header: res.Header,
6729 HTTPStatusCode: res.StatusCode,
6730 },
6731 }
6732 target := &ret
6733 if err := gensupport.DecodeResponse(target, res); err != nil {
6734 return nil, err
6735 }
6736 return ret, nil
6737 }
6738
6739 type ScoresSubmitMultipleCall struct {
6740 s *Service
6741 playerscoresubmissionlist *PlayerScoreSubmissionList
6742 urlParams_ gensupport.URLParams
6743 ctx_ context.Context
6744 header_ http.Header
6745 }
6746
6747
6748 func (r *ScoresService) SubmitMultiple(playerscoresubmissionlist *PlayerScoreSubmissionList) *ScoresSubmitMultipleCall {
6749 c := &ScoresSubmitMultipleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6750 c.playerscoresubmissionlist = playerscoresubmissionlist
6751 return c
6752 }
6753
6754
6755
6756 func (c *ScoresSubmitMultipleCall) Language(language string) *ScoresSubmitMultipleCall {
6757 c.urlParams_.Set("language", language)
6758 return c
6759 }
6760
6761
6762
6763
6764 func (c *ScoresSubmitMultipleCall) Fields(s ...googleapi.Field) *ScoresSubmitMultipleCall {
6765 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6766 return c
6767 }
6768
6769
6770 func (c *ScoresSubmitMultipleCall) Context(ctx context.Context) *ScoresSubmitMultipleCall {
6771 c.ctx_ = ctx
6772 return c
6773 }
6774
6775
6776
6777 func (c *ScoresSubmitMultipleCall) Header() http.Header {
6778 if c.header_ == nil {
6779 c.header_ = make(http.Header)
6780 }
6781 return c.header_
6782 }
6783
6784 func (c *ScoresSubmitMultipleCall) doRequest(alt string) (*http.Response, error) {
6785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6786 var body io.Reader = nil
6787 body, err := googleapi.WithoutDataWrapper.JSONReader(c.playerscoresubmissionlist)
6788 if err != nil {
6789 return nil, err
6790 }
6791 c.urlParams_.Set("alt", alt)
6792 c.urlParams_.Set("prettyPrint", "false")
6793 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/leaderboards/scores")
6794 urls += "?" + c.urlParams_.Encode()
6795 req, err := http.NewRequest("POST", urls, body)
6796 if err != nil {
6797 return nil, err
6798 }
6799 req.Header = reqHeaders
6800 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6801 }
6802
6803
6804
6805
6806
6807
6808
6809 func (c *ScoresSubmitMultipleCall) Do(opts ...googleapi.CallOption) (*PlayerScoreListResponse, error) {
6810 gensupport.SetOptions(c.urlParams_, opts...)
6811 res, err := c.doRequest("json")
6812 if res != nil && res.StatusCode == http.StatusNotModified {
6813 if res.Body != nil {
6814 res.Body.Close()
6815 }
6816 return nil, gensupport.WrapError(&googleapi.Error{
6817 Code: res.StatusCode,
6818 Header: res.Header,
6819 })
6820 }
6821 if err != nil {
6822 return nil, err
6823 }
6824 defer googleapi.CloseBody(res)
6825 if err := googleapi.CheckResponse(res); err != nil {
6826 return nil, gensupport.WrapError(err)
6827 }
6828 ret := &PlayerScoreListResponse{
6829 ServerResponse: googleapi.ServerResponse{
6830 Header: res.Header,
6831 HTTPStatusCode: res.StatusCode,
6832 },
6833 }
6834 target := &ret
6835 if err := gensupport.DecodeResponse(target, res); err != nil {
6836 return nil, err
6837 }
6838 return ret, nil
6839 }
6840
6841 type SnapshotsGetCall struct {
6842 s *Service
6843 snapshotId string
6844 urlParams_ gensupport.URLParams
6845 ifNoneMatch_ string
6846 ctx_ context.Context
6847 header_ http.Header
6848 }
6849
6850
6851
6852
6853 func (r *SnapshotsService) Get(snapshotId string) *SnapshotsGetCall {
6854 c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6855 c.snapshotId = snapshotId
6856 return c
6857 }
6858
6859
6860
6861 func (c *SnapshotsGetCall) Language(language string) *SnapshotsGetCall {
6862 c.urlParams_.Set("language", language)
6863 return c
6864 }
6865
6866
6867
6868
6869 func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall {
6870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6871 return c
6872 }
6873
6874
6875
6876
6877 func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall {
6878 c.ifNoneMatch_ = entityTag
6879 return c
6880 }
6881
6882
6883 func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
6884 c.ctx_ = ctx
6885 return c
6886 }
6887
6888
6889
6890 func (c *SnapshotsGetCall) Header() http.Header {
6891 if c.header_ == nil {
6892 c.header_ = make(http.Header)
6893 }
6894 return c.header_
6895 }
6896
6897 func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
6898 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6899 if c.ifNoneMatch_ != "" {
6900 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6901 }
6902 var body io.Reader = nil
6903 c.urlParams_.Set("alt", alt)
6904 c.urlParams_.Set("prettyPrint", "false")
6905 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/snapshots/{snapshotId}")
6906 urls += "?" + c.urlParams_.Encode()
6907 req, err := http.NewRequest("GET", urls, body)
6908 if err != nil {
6909 return nil, err
6910 }
6911 req.Header = reqHeaders
6912 googleapi.Expand(req.URL, map[string]string{
6913 "snapshotId": c.snapshotId,
6914 })
6915 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6916 }
6917
6918
6919
6920
6921
6922
6923 func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
6924 gensupport.SetOptions(c.urlParams_, opts...)
6925 res, err := c.doRequest("json")
6926 if res != nil && res.StatusCode == http.StatusNotModified {
6927 if res.Body != nil {
6928 res.Body.Close()
6929 }
6930 return nil, gensupport.WrapError(&googleapi.Error{
6931 Code: res.StatusCode,
6932 Header: res.Header,
6933 })
6934 }
6935 if err != nil {
6936 return nil, err
6937 }
6938 defer googleapi.CloseBody(res)
6939 if err := googleapi.CheckResponse(res); err != nil {
6940 return nil, gensupport.WrapError(err)
6941 }
6942 ret := &Snapshot{
6943 ServerResponse: googleapi.ServerResponse{
6944 Header: res.Header,
6945 HTTPStatusCode: res.StatusCode,
6946 },
6947 }
6948 target := &ret
6949 if err := gensupport.DecodeResponse(target, res); err != nil {
6950 return nil, err
6951 }
6952 return ret, nil
6953 }
6954
6955 type SnapshotsListCall struct {
6956 s *Service
6957 playerId string
6958 urlParams_ gensupport.URLParams
6959 ifNoneMatch_ string
6960 ctx_ context.Context
6961 header_ http.Header
6962 }
6963
6964
6965
6966
6967
6968
6969 func (r *SnapshotsService) List(playerId string) *SnapshotsListCall {
6970 c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6971 c.playerId = playerId
6972 return c
6973 }
6974
6975
6976
6977 func (c *SnapshotsListCall) Language(language string) *SnapshotsListCall {
6978 c.urlParams_.Set("language", language)
6979 return c
6980 }
6981
6982
6983
6984
6985
6986 func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall {
6987 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6988 return c
6989 }
6990
6991
6992
6993 func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall {
6994 c.urlParams_.Set("pageToken", pageToken)
6995 return c
6996 }
6997
6998
6999
7000
7001 func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall {
7002 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7003 return c
7004 }
7005
7006
7007
7008
7009 func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall {
7010 c.ifNoneMatch_ = entityTag
7011 return c
7012 }
7013
7014
7015 func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
7016 c.ctx_ = ctx
7017 return c
7018 }
7019
7020
7021
7022 func (c *SnapshotsListCall) Header() http.Header {
7023 if c.header_ == nil {
7024 c.header_ = make(http.Header)
7025 }
7026 return c.header_
7027 }
7028
7029 func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
7030 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7031 if c.ifNoneMatch_ != "" {
7032 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7033 }
7034 var body io.Reader = nil
7035 c.urlParams_.Set("alt", alt)
7036 c.urlParams_.Set("prettyPrint", "false")
7037 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/players/{playerId}/snapshots")
7038 urls += "?" + c.urlParams_.Encode()
7039 req, err := http.NewRequest("GET", urls, body)
7040 if err != nil {
7041 return nil, err
7042 }
7043 req.Header = reqHeaders
7044 googleapi.Expand(req.URL, map[string]string{
7045 "playerId": c.playerId,
7046 })
7047 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7048 }
7049
7050
7051
7052
7053
7054
7055
7056 func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotListResponse, error) {
7057 gensupport.SetOptions(c.urlParams_, opts...)
7058 res, err := c.doRequest("json")
7059 if res != nil && res.StatusCode == http.StatusNotModified {
7060 if res.Body != nil {
7061 res.Body.Close()
7062 }
7063 return nil, gensupport.WrapError(&googleapi.Error{
7064 Code: res.StatusCode,
7065 Header: res.Header,
7066 })
7067 }
7068 if err != nil {
7069 return nil, err
7070 }
7071 defer googleapi.CloseBody(res)
7072 if err := googleapi.CheckResponse(res); err != nil {
7073 return nil, gensupport.WrapError(err)
7074 }
7075 ret := &SnapshotListResponse{
7076 ServerResponse: googleapi.ServerResponse{
7077 Header: res.Header,
7078 HTTPStatusCode: res.StatusCode,
7079 },
7080 }
7081 target := &ret
7082 if err := gensupport.DecodeResponse(target, res); err != nil {
7083 return nil, err
7084 }
7085 return ret, nil
7086 }
7087
7088
7089
7090
7091 func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotListResponse) error) error {
7092 c.ctx_ = ctx
7093 defer c.PageToken(c.urlParams_.Get("pageToken"))
7094 for {
7095 x, err := c.Do()
7096 if err != nil {
7097 return err
7098 }
7099 if err := f(x); err != nil {
7100 return err
7101 }
7102 if x.NextPageToken == "" {
7103 return nil
7104 }
7105 c.PageToken(x.NextPageToken)
7106 }
7107 }
7108
7109 type StatsGetCall struct {
7110 s *Service
7111 urlParams_ gensupport.URLParams
7112 ifNoneMatch_ string
7113 ctx_ context.Context
7114 header_ http.Header
7115 }
7116
7117
7118
7119 func (r *StatsService) Get() *StatsGetCall {
7120 c := &StatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7121 return c
7122 }
7123
7124
7125
7126
7127 func (c *StatsGetCall) Fields(s ...googleapi.Field) *StatsGetCall {
7128 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7129 return c
7130 }
7131
7132
7133
7134
7135 func (c *StatsGetCall) IfNoneMatch(entityTag string) *StatsGetCall {
7136 c.ifNoneMatch_ = entityTag
7137 return c
7138 }
7139
7140
7141 func (c *StatsGetCall) Context(ctx context.Context) *StatsGetCall {
7142 c.ctx_ = ctx
7143 return c
7144 }
7145
7146
7147
7148 func (c *StatsGetCall) Header() http.Header {
7149 if c.header_ == nil {
7150 c.header_ = make(http.Header)
7151 }
7152 return c.header_
7153 }
7154
7155 func (c *StatsGetCall) doRequest(alt string) (*http.Response, error) {
7156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7157 if c.ifNoneMatch_ != "" {
7158 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7159 }
7160 var body io.Reader = nil
7161 c.urlParams_.Set("alt", alt)
7162 c.urlParams_.Set("prettyPrint", "false")
7163 urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/stats")
7164 urls += "?" + c.urlParams_.Encode()
7165 req, err := http.NewRequest("GET", urls, body)
7166 if err != nil {
7167 return nil, err
7168 }
7169 req.Header = reqHeaders
7170 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7171 }
7172
7173
7174
7175
7176
7177
7178 func (c *StatsGetCall) Do(opts ...googleapi.CallOption) (*StatsResponse, error) {
7179 gensupport.SetOptions(c.urlParams_, opts...)
7180 res, err := c.doRequest("json")
7181 if res != nil && res.StatusCode == http.StatusNotModified {
7182 if res.Body != nil {
7183 res.Body.Close()
7184 }
7185 return nil, gensupport.WrapError(&googleapi.Error{
7186 Code: res.StatusCode,
7187 Header: res.Header,
7188 })
7189 }
7190 if err != nil {
7191 return nil, err
7192 }
7193 defer googleapi.CloseBody(res)
7194 if err := googleapi.CheckResponse(res); err != nil {
7195 return nil, gensupport.WrapError(err)
7196 }
7197 ret := &StatsResponse{
7198 ServerResponse: googleapi.ServerResponse{
7199 Header: res.Header,
7200 HTTPStatusCode: res.StatusCode,
7201 },
7202 }
7203 target := &ret
7204 if err := gensupport.DecodeResponse(target, res); err != nil {
7205 return nil, err
7206 }
7207 return ret, nil
7208 }
7209
View as plain text