source: vendor/google/apiclient-services/src/Games.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload new project files

  • Property mode set to 100644
File size: 24.6 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for Games (v1).
24 *
25 * <p>
26 * The Google Play games service allows developers to enhance games with social
27 * leaderboards, achievements, game state, sign-in with Google, and more.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/games/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Games extends \Google\Service
37{
38 /** View and manage your Google Play Developer account. */
39 const ANDROIDPUBLISHER =
40 "https://www.googleapis.com/auth/androidpublisher";
41 /** See, create, and delete its own configuration data in your Google Drive. */
42 const DRIVE_APPDATA =
43 "https://www.googleapis.com/auth/drive.appdata";
44 /** Create, edit, and delete your Google Play Games activity. */
45 const GAMES =
46 "https://www.googleapis.com/auth/games";
47
48 public $accesstokens;
49 public $achievementDefinitions;
50 public $achievements;
51 public $applications;
52 public $events;
53 public $leaderboards;
54 public $metagame;
55 public $players;
56 public $recall;
57 public $revisions;
58 public $scores;
59 public $snapshots;
60 public $stats;
61 public $rootUrlTemplate;
62
63 /**
64 * Constructs the internal representation of the Games service.
65 *
66 * @param Client|array $clientOrConfig The client used to deliver requests, or a
67 * config array to pass to a new Client instance.
68 * @param string $rootUrl The root URL used for requests to the service.
69 */
70 public function __construct($clientOrConfig = [], $rootUrl = null)
71 {
72 parent::__construct($clientOrConfig);
73 $this->rootUrl = $rootUrl ?: 'https://games.googleapis.com/';
74 $this->rootUrlTemplate = $rootUrl ?: 'https://games.UNIVERSE_DOMAIN/';
75 $this->servicePath = '';
76 $this->batchPath = 'batch';
77 $this->version = 'v1';
78 $this->serviceName = 'games';
79
80 $this->accesstokens = new Games\Resource\Accesstokens(
81 $this,
82 $this->serviceName,
83 'accesstokens',
84 [
85 'methods' => [
86 'generatePlayGroupingApiToken' => [
87 'path' => 'games/v1/accesstokens/generatePlayGroupingApiToken',
88 'httpMethod' => 'POST',
89 'parameters' => [
90 'packageName' => [
91 'location' => 'query',
92 'type' => 'string',
93 ],
94 'persona' => [
95 'location' => 'query',
96 'type' => 'string',
97 ],
98 ],
99 ],'generateRecallPlayGroupingApiToken' => [
100 'path' => 'games/v1/accesstokens/generateRecallPlayGroupingApiToken',
101 'httpMethod' => 'POST',
102 'parameters' => [
103 'packageName' => [
104 'location' => 'query',
105 'type' => 'string',
106 ],
107 'persona' => [
108 'location' => 'query',
109 'type' => 'string',
110 ],
111 'recallSessionId' => [
112 'location' => 'query',
113 'type' => 'string',
114 ],
115 ],
116 ],
117 ]
118 ]
119 );
120 $this->achievementDefinitions = new Games\Resource\AchievementDefinitions(
121 $this,
122 $this->serviceName,
123 'achievementDefinitions',
124 [
125 'methods' => [
126 'list' => [
127 'path' => 'games/v1/achievements',
128 'httpMethod' => 'GET',
129 'parameters' => [
130 'language' => [
131 'location' => 'query',
132 'type' => 'string',
133 ],
134 'maxResults' => [
135 'location' => 'query',
136 'type' => 'integer',
137 ],
138 'pageToken' => [
139 'location' => 'query',
140 'type' => 'string',
141 ],
142 ],
143 ],
144 ]
145 ]
146 );
147 $this->achievements = new Games\Resource\Achievements(
148 $this,
149 $this->serviceName,
150 'achievements',
151 [
152 'methods' => [
153 'increment' => [
154 'path' => 'games/v1/achievements/{achievementId}/increment',
155 'httpMethod' => 'POST',
156 'parameters' => [
157 'achievementId' => [
158 'location' => 'path',
159 'type' => 'string',
160 'required' => true,
161 ],
162 'stepsToIncrement' => [
163 'location' => 'query',
164 'type' => 'integer',
165 'required' => true,
166 ],
167 'requestId' => [
168 'location' => 'query',
169 'type' => 'string',
170 ],
171 ],
172 ],'list' => [
173 'path' => 'games/v1/players/{playerId}/achievements',
174 'httpMethod' => 'GET',
175 'parameters' => [
176 'playerId' => [
177 'location' => 'path',
178 'type' => 'string',
179 'required' => true,
180 ],
181 'language' => [
182 'location' => 'query',
183 'type' => 'string',
184 ],
185 'maxResults' => [
186 'location' => 'query',
187 'type' => 'integer',
188 ],
189 'pageToken' => [
190 'location' => 'query',
191 'type' => 'string',
192 ],
193 'state' => [
194 'location' => 'query',
195 'type' => 'string',
196 ],
197 ],
198 ],'reveal' => [
199 'path' => 'games/v1/achievements/{achievementId}/reveal',
200 'httpMethod' => 'POST',
201 'parameters' => [
202 'achievementId' => [
203 'location' => 'path',
204 'type' => 'string',
205 'required' => true,
206 ],
207 ],
208 ],'setStepsAtLeast' => [
209 'path' => 'games/v1/achievements/{achievementId}/setStepsAtLeast',
210 'httpMethod' => 'POST',
211 'parameters' => [
212 'achievementId' => [
213 'location' => 'path',
214 'type' => 'string',
215 'required' => true,
216 ],
217 'steps' => [
218 'location' => 'query',
219 'type' => 'integer',
220 'required' => true,
221 ],
222 ],
223 ],'unlock' => [
224 'path' => 'games/v1/achievements/{achievementId}/unlock',
225 'httpMethod' => 'POST',
226 'parameters' => [
227 'achievementId' => [
228 'location' => 'path',
229 'type' => 'string',
230 'required' => true,
231 ],
232 ],
233 ],'updateMultiple' => [
234 'path' => 'games/v1/achievements/updateMultiple',
235 'httpMethod' => 'POST',
236 'parameters' => [],
237 ],
238 ]
239 ]
240 );
241 $this->applications = new Games\Resource\Applications(
242 $this,
243 $this->serviceName,
244 'applications',
245 [
246 'methods' => [
247 'get' => [
248 'path' => 'games/v1/applications/{applicationId}',
249 'httpMethod' => 'GET',
250 'parameters' => [
251 'applicationId' => [
252 'location' => 'path',
253 'type' => 'string',
254 'required' => true,
255 ],
256 'language' => [
257 'location' => 'query',
258 'type' => 'string',
259 ],
260 'platformType' => [
261 'location' => 'query',
262 'type' => 'string',
263 ],
264 ],
265 ],'getEndPoint' => [
266 'path' => 'games/v1/applications/getEndPoint',
267 'httpMethod' => 'POST',
268 'parameters' => [
269 'applicationId' => [
270 'location' => 'query',
271 'type' => 'string',
272 ],
273 'endPointType' => [
274 'location' => 'query',
275 'type' => 'string',
276 ],
277 ],
278 ],'played' => [
279 'path' => 'games/v1/applications/played',
280 'httpMethod' => 'POST',
281 'parameters' => [],
282 ],'verify' => [
283 'path' => 'games/v1/applications/{applicationId}/verify',
284 'httpMethod' => 'GET',
285 'parameters' => [
286 'applicationId' => [
287 'location' => 'path',
288 'type' => 'string',
289 'required' => true,
290 ],
291 ],
292 ],
293 ]
294 ]
295 );
296 $this->events = new Games\Resource\Events(
297 $this,
298 $this->serviceName,
299 'events',
300 [
301 'methods' => [
302 'listByPlayer' => [
303 'path' => 'games/v1/events',
304 'httpMethod' => 'GET',
305 'parameters' => [
306 'language' => [
307 'location' => 'query',
308 'type' => 'string',
309 ],
310 'maxResults' => [
311 'location' => 'query',
312 'type' => 'integer',
313 ],
314 'pageToken' => [
315 'location' => 'query',
316 'type' => 'string',
317 ],
318 ],
319 ],'listDefinitions' => [
320 'path' => 'games/v1/eventDefinitions',
321 'httpMethod' => 'GET',
322 'parameters' => [
323 'language' => [
324 'location' => 'query',
325 'type' => 'string',
326 ],
327 'maxResults' => [
328 'location' => 'query',
329 'type' => 'integer',
330 ],
331 'pageToken' => [
332 'location' => 'query',
333 'type' => 'string',
334 ],
335 ],
336 ],'record' => [
337 'path' => 'games/v1/events',
338 'httpMethod' => 'POST',
339 'parameters' => [
340 'language' => [
341 'location' => 'query',
342 'type' => 'string',
343 ],
344 ],
345 ],
346 ]
347 ]
348 );
349 $this->leaderboards = new Games\Resource\Leaderboards(
350 $this,
351 $this->serviceName,
352 'leaderboards',
353 [
354 'methods' => [
355 'get' => [
356 'path' => 'games/v1/leaderboards/{leaderboardId}',
357 'httpMethod' => 'GET',
358 'parameters' => [
359 'leaderboardId' => [
360 'location' => 'path',
361 'type' => 'string',
362 'required' => true,
363 ],
364 'language' => [
365 'location' => 'query',
366 'type' => 'string',
367 ],
368 ],
369 ],'list' => [
370 'path' => 'games/v1/leaderboards',
371 'httpMethod' => 'GET',
372 'parameters' => [
373 'language' => [
374 'location' => 'query',
375 'type' => 'string',
376 ],
377 'maxResults' => [
378 'location' => 'query',
379 'type' => 'integer',
380 ],
381 'pageToken' => [
382 'location' => 'query',
383 'type' => 'string',
384 ],
385 ],
386 ],
387 ]
388 ]
389 );
390 $this->metagame = new Games\Resource\Metagame(
391 $this,
392 $this->serviceName,
393 'metagame',
394 [
395 'methods' => [
396 'getMetagameConfig' => [
397 'path' => 'games/v1/metagameConfig',
398 'httpMethod' => 'GET',
399 'parameters' => [],
400 ],'listCategoriesByPlayer' => [
401 'path' => 'games/v1/players/{playerId}/categories/{collection}',
402 'httpMethod' => 'GET',
403 'parameters' => [
404 'playerId' => [
405 'location' => 'path',
406 'type' => 'string',
407 'required' => true,
408 ],
409 'collection' => [
410 'location' => 'path',
411 'type' => 'string',
412 'required' => true,
413 ],
414 'language' => [
415 'location' => 'query',
416 'type' => 'string',
417 ],
418 'maxResults' => [
419 'location' => 'query',
420 'type' => 'integer',
421 ],
422 'pageToken' => [
423 'location' => 'query',
424 'type' => 'string',
425 ],
426 ],
427 ],
428 ]
429 ]
430 );
431 $this->players = new Games\Resource\Players(
432 $this,
433 $this->serviceName,
434 'players',
435 [
436 'methods' => [
437 'get' => [
438 'path' => 'games/v1/players/{playerId}',
439 'httpMethod' => 'GET',
440 'parameters' => [
441 'playerId' => [
442 'location' => 'path',
443 'type' => 'string',
444 'required' => true,
445 ],
446 'language' => [
447 'location' => 'query',
448 'type' => 'string',
449 ],
450 'playerIdConsistencyToken' => [
451 'location' => 'query',
452 'type' => 'string',
453 ],
454 ],
455 ],'getMultipleApplicationPlayerIds' => [
456 'path' => 'games/v1/players/me/multipleApplicationPlayerIds',
457 'httpMethod' => 'GET',
458 'parameters' => [
459 'applicationIds' => [
460 'location' => 'query',
461 'type' => 'string',
462 'repeated' => true,
463 ],
464 ],
465 ],'getScopedPlayerIds' => [
466 'path' => 'games/v1/players/me/scopedIds',
467 'httpMethod' => 'GET',
468 'parameters' => [],
469 ],'list' => [
470 'path' => 'games/v1/players/me/players/{collection}',
471 'httpMethod' => 'GET',
472 'parameters' => [
473 'collection' => [
474 'location' => 'path',
475 'type' => 'string',
476 'required' => true,
477 ],
478 'language' => [
479 'location' => 'query',
480 'type' => 'string',
481 ],
482 'maxResults' => [
483 'location' => 'query',
484 'type' => 'integer',
485 ],
486 'pageToken' => [
487 'location' => 'query',
488 'type' => 'string',
489 ],
490 ],
491 ],
492 ]
493 ]
494 );
495 $this->recall = new Games\Resource\Recall(
496 $this,
497 $this->serviceName,
498 'recall',
499 [
500 'methods' => [
501 'gamesPlayerTokens' => [
502 'path' => 'games/v1/recall/gamesPlayerTokens/{sessionId}',
503 'httpMethod' => 'GET',
504 'parameters' => [
505 'sessionId' => [
506 'location' => 'path',
507 'type' => 'string',
508 'required' => true,
509 ],
510 'applicationIds' => [
511 'location' => 'query',
512 'type' => 'string',
513 'repeated' => true,
514 ],
515 ],
516 ],'lastTokenFromAllDeveloperGames' => [
517 'path' => 'games/v1/recall/developerGamesLastPlayerToken/{sessionId}',
518 'httpMethod' => 'GET',
519 'parameters' => [
520 'sessionId' => [
521 'location' => 'path',
522 'type' => 'string',
523 'required' => true,
524 ],
525 ],
526 ],'linkPersona' => [
527 'path' => 'games/v1/recall:linkPersona',
528 'httpMethod' => 'POST',
529 'parameters' => [],
530 ],'resetPersona' => [
531 'path' => 'games/v1/recall:resetPersona',
532 'httpMethod' => 'POST',
533 'parameters' => [],
534 ],'retrieveTokens' => [
535 'path' => 'games/v1/recall/tokens/{sessionId}',
536 'httpMethod' => 'GET',
537 'parameters' => [
538 'sessionId' => [
539 'location' => 'path',
540 'type' => 'string',
541 'required' => true,
542 ],
543 ],
544 ],'unlinkPersona' => [
545 'path' => 'games/v1/recall:unlinkPersona',
546 'httpMethod' => 'POST',
547 'parameters' => [],
548 ],
549 ]
550 ]
551 );
552 $this->revisions = new Games\Resource\Revisions(
553 $this,
554 $this->serviceName,
555 'revisions',
556 [
557 'methods' => [
558 'check' => [
559 'path' => 'games/v1/revisions/check',
560 'httpMethod' => 'GET',
561 'parameters' => [
562 'clientRevision' => [
563 'location' => 'query',
564 'type' => 'string',
565 'required' => true,
566 ],
567 ],
568 ],
569 ]
570 ]
571 );
572 $this->scores = new Games\Resource\Scores(
573 $this,
574 $this->serviceName,
575 'scores',
576 [
577 'methods' => [
578 'get' => [
579 'path' => 'games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}',
580 'httpMethod' => 'GET',
581 'parameters' => [
582 'playerId' => [
583 'location' => 'path',
584 'type' => 'string',
585 'required' => true,
586 ],
587 'leaderboardId' => [
588 'location' => 'path',
589 'type' => 'string',
590 'required' => true,
591 ],
592 'timeSpan' => [
593 'location' => 'path',
594 'type' => 'string',
595 'required' => true,
596 ],
597 'includeRankType' => [
598 'location' => 'query',
599 'type' => 'string',
600 ],
601 'language' => [
602 'location' => 'query',
603 'type' => 'string',
604 ],
605 'maxResults' => [
606 'location' => 'query',
607 'type' => 'integer',
608 ],
609 'pageToken' => [
610 'location' => 'query',
611 'type' => 'string',
612 ],
613 ],
614 ],'list' => [
615 'path' => 'games/v1/leaderboards/{leaderboardId}/scores/{collection}',
616 'httpMethod' => 'GET',
617 'parameters' => [
618 'leaderboardId' => [
619 'location' => 'path',
620 'type' => 'string',
621 'required' => true,
622 ],
623 'collection' => [
624 'location' => 'path',
625 'type' => 'string',
626 'required' => true,
627 ],
628 'timeSpan' => [
629 'location' => 'query',
630 'type' => 'string',
631 'required' => true,
632 ],
633 'language' => [
634 'location' => 'query',
635 'type' => 'string',
636 ],
637 'maxResults' => [
638 'location' => 'query',
639 'type' => 'integer',
640 ],
641 'pageToken' => [
642 'location' => 'query',
643 'type' => 'string',
644 ],
645 ],
646 ],'listWindow' => [
647 'path' => 'games/v1/leaderboards/{leaderboardId}/window/{collection}',
648 'httpMethod' => 'GET',
649 'parameters' => [
650 'leaderboardId' => [
651 'location' => 'path',
652 'type' => 'string',
653 'required' => true,
654 ],
655 'collection' => [
656 'location' => 'path',
657 'type' => 'string',
658 'required' => true,
659 ],
660 'timeSpan' => [
661 'location' => 'query',
662 'type' => 'string',
663 'required' => true,
664 ],
665 'language' => [
666 'location' => 'query',
667 'type' => 'string',
668 ],
669 'maxResults' => [
670 'location' => 'query',
671 'type' => 'integer',
672 ],
673 'pageToken' => [
674 'location' => 'query',
675 'type' => 'string',
676 ],
677 'resultsAbove' => [
678 'location' => 'query',
679 'type' => 'integer',
680 ],
681 'returnTopIfAbsent' => [
682 'location' => 'query',
683 'type' => 'boolean',
684 ],
685 ],
686 ],'submit' => [
687 'path' => 'games/v1/leaderboards/{leaderboardId}/scores',
688 'httpMethod' => 'POST',
689 'parameters' => [
690 'leaderboardId' => [
691 'location' => 'path',
692 'type' => 'string',
693 'required' => true,
694 ],
695 'score' => [
696 'location' => 'query',
697 'type' => 'string',
698 'required' => true,
699 ],
700 'language' => [
701 'location' => 'query',
702 'type' => 'string',
703 ],
704 'scoreTag' => [
705 'location' => 'query',
706 'type' => 'string',
707 ],
708 ],
709 ],'submitMultiple' => [
710 'path' => 'games/v1/leaderboards/scores',
711 'httpMethod' => 'POST',
712 'parameters' => [
713 'language' => [
714 'location' => 'query',
715 'type' => 'string',
716 ],
717 ],
718 ],
719 ]
720 ]
721 );
722 $this->snapshots = new Games\Resource\Snapshots(
723 $this,
724 $this->serviceName,
725 'snapshots',
726 [
727 'methods' => [
728 'get' => [
729 'path' => 'games/v1/snapshots/{snapshotId}',
730 'httpMethod' => 'GET',
731 'parameters' => [
732 'snapshotId' => [
733 'location' => 'path',
734 'type' => 'string',
735 'required' => true,
736 ],
737 'language' => [
738 'location' => 'query',
739 'type' => 'string',
740 ],
741 ],
742 ],'list' => [
743 'path' => 'games/v1/players/{playerId}/snapshots',
744 'httpMethod' => 'GET',
745 'parameters' => [
746 'playerId' => [
747 'location' => 'path',
748 'type' => 'string',
749 'required' => true,
750 ],
751 'language' => [
752 'location' => 'query',
753 'type' => 'string',
754 ],
755 'maxResults' => [
756 'location' => 'query',
757 'type' => 'integer',
758 ],
759 'pageToken' => [
760 'location' => 'query',
761 'type' => 'string',
762 ],
763 ],
764 ],
765 ]
766 ]
767 );
768 $this->stats = new Games\Resource\Stats(
769 $this,
770 $this->serviceName,
771 'stats',
772 [
773 'methods' => [
774 'get' => [
775 'path' => 'games/v1/stats',
776 'httpMethod' => 'GET',
777 'parameters' => [],
778 ],
779 ]
780 ]
781 );
782 }
783}
784
785// Adding a class alias for backwards compatibility with the previous class name.
786class_alias(Games::class, 'Google_Service_Games');
Note: See TracBrowser for help on using the repository browser.