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 |
|
---|
18 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for GamesManagement (v1management).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | * The Google Play Game Management API allows developers to manage resources
|
---|
27 | * from the Google Play Game service.</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 | */
|
---|
36 | class GamesManagement extends \Google\Service
|
---|
37 | {
|
---|
38 | /** Create, edit, and delete your Google Play Games activity. */
|
---|
39 | const GAMES =
|
---|
40 | "https://www.googleapis.com/auth/games";
|
---|
41 |
|
---|
42 | public $achievements;
|
---|
43 | public $applications;
|
---|
44 | public $events;
|
---|
45 | public $players;
|
---|
46 | public $scores;
|
---|
47 | public $rootUrlTemplate;
|
---|
48 |
|
---|
49 | /**
|
---|
50 | * Constructs the internal representation of the GamesManagement service.
|
---|
51 | *
|
---|
52 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
53 | * config array to pass to a new Client instance.
|
---|
54 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
55 | */
|
---|
56 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
57 | {
|
---|
58 | parent::__construct($clientOrConfig);
|
---|
59 | $this->rootUrl = $rootUrl ?: 'https://gamesmanagement.googleapis.com/';
|
---|
60 | $this->rootUrlTemplate = $rootUrl ?: 'https://gamesmanagement.UNIVERSE_DOMAIN/';
|
---|
61 | $this->servicePath = '';
|
---|
62 | $this->batchPath = 'batch';
|
---|
63 | $this->version = 'v1management';
|
---|
64 | $this->serviceName = 'gamesManagement';
|
---|
65 |
|
---|
66 | $this->achievements = new GamesManagement\Resource\Achievements(
|
---|
67 | $this,
|
---|
68 | $this->serviceName,
|
---|
69 | 'achievements',
|
---|
70 | [
|
---|
71 | 'methods' => [
|
---|
72 | 'reset' => [
|
---|
73 | 'path' => 'games/v1management/achievements/{achievementId}/reset',
|
---|
74 | 'httpMethod' => 'POST',
|
---|
75 | 'parameters' => [
|
---|
76 | 'achievementId' => [
|
---|
77 | 'location' => 'path',
|
---|
78 | 'type' => 'string',
|
---|
79 | 'required' => true,
|
---|
80 | ],
|
---|
81 | ],
|
---|
82 | ],'resetAll' => [
|
---|
83 | 'path' => 'games/v1management/achievements/reset',
|
---|
84 | 'httpMethod' => 'POST',
|
---|
85 | 'parameters' => [],
|
---|
86 | ],'resetAllForAllPlayers' => [
|
---|
87 | 'path' => 'games/v1management/achievements/resetAllForAllPlayers',
|
---|
88 | 'httpMethod' => 'POST',
|
---|
89 | 'parameters' => [],
|
---|
90 | ],'resetForAllPlayers' => [
|
---|
91 | 'path' => 'games/v1management/achievements/{achievementId}/resetForAllPlayers',
|
---|
92 | 'httpMethod' => 'POST',
|
---|
93 | 'parameters' => [
|
---|
94 | 'achievementId' => [
|
---|
95 | 'location' => 'path',
|
---|
96 | 'type' => 'string',
|
---|
97 | 'required' => true,
|
---|
98 | ],
|
---|
99 | ],
|
---|
100 | ],'resetMultipleForAllPlayers' => [
|
---|
101 | 'path' => 'games/v1management/achievements/resetMultipleForAllPlayers',
|
---|
102 | 'httpMethod' => 'POST',
|
---|
103 | 'parameters' => [],
|
---|
104 | ],
|
---|
105 | ]
|
---|
106 | ]
|
---|
107 | );
|
---|
108 | $this->applications = new GamesManagement\Resource\Applications(
|
---|
109 | $this,
|
---|
110 | $this->serviceName,
|
---|
111 | 'applications',
|
---|
112 | [
|
---|
113 | 'methods' => [
|
---|
114 | 'listHidden' => [
|
---|
115 | 'path' => 'games/v1management/applications/{applicationId}/players/hidden',
|
---|
116 | 'httpMethod' => 'GET',
|
---|
117 | 'parameters' => [
|
---|
118 | 'applicationId' => [
|
---|
119 | 'location' => 'path',
|
---|
120 | 'type' => 'string',
|
---|
121 | 'required' => true,
|
---|
122 | ],
|
---|
123 | 'maxResults' => [
|
---|
124 | 'location' => 'query',
|
---|
125 | 'type' => 'integer',
|
---|
126 | ],
|
---|
127 | 'pageToken' => [
|
---|
128 | 'location' => 'query',
|
---|
129 | 'type' => 'string',
|
---|
130 | ],
|
---|
131 | ],
|
---|
132 | ],
|
---|
133 | ]
|
---|
134 | ]
|
---|
135 | );
|
---|
136 | $this->events = new GamesManagement\Resource\Events(
|
---|
137 | $this,
|
---|
138 | $this->serviceName,
|
---|
139 | 'events',
|
---|
140 | [
|
---|
141 | 'methods' => [
|
---|
142 | 'reset' => [
|
---|
143 | 'path' => 'games/v1management/events/{eventId}/reset',
|
---|
144 | 'httpMethod' => 'POST',
|
---|
145 | 'parameters' => [
|
---|
146 | 'eventId' => [
|
---|
147 | 'location' => 'path',
|
---|
148 | 'type' => 'string',
|
---|
149 | 'required' => true,
|
---|
150 | ],
|
---|
151 | ],
|
---|
152 | ],'resetAll' => [
|
---|
153 | 'path' => 'games/v1management/events/reset',
|
---|
154 | 'httpMethod' => 'POST',
|
---|
155 | 'parameters' => [],
|
---|
156 | ],'resetAllForAllPlayers' => [
|
---|
157 | 'path' => 'games/v1management/events/resetAllForAllPlayers',
|
---|
158 | 'httpMethod' => 'POST',
|
---|
159 | 'parameters' => [],
|
---|
160 | ],'resetForAllPlayers' => [
|
---|
161 | 'path' => 'games/v1management/events/{eventId}/resetForAllPlayers',
|
---|
162 | 'httpMethod' => 'POST',
|
---|
163 | 'parameters' => [
|
---|
164 | 'eventId' => [
|
---|
165 | 'location' => 'path',
|
---|
166 | 'type' => 'string',
|
---|
167 | 'required' => true,
|
---|
168 | ],
|
---|
169 | ],
|
---|
170 | ],'resetMultipleForAllPlayers' => [
|
---|
171 | 'path' => 'games/v1management/events/resetMultipleForAllPlayers',
|
---|
172 | 'httpMethod' => 'POST',
|
---|
173 | 'parameters' => [],
|
---|
174 | ],
|
---|
175 | ]
|
---|
176 | ]
|
---|
177 | );
|
---|
178 | $this->players = new GamesManagement\Resource\Players(
|
---|
179 | $this,
|
---|
180 | $this->serviceName,
|
---|
181 | 'players',
|
---|
182 | [
|
---|
183 | 'methods' => [
|
---|
184 | 'hide' => [
|
---|
185 | 'path' => 'games/v1management/applications/{applicationId}/players/hidden/{playerId}',
|
---|
186 | 'httpMethod' => 'POST',
|
---|
187 | 'parameters' => [
|
---|
188 | 'applicationId' => [
|
---|
189 | 'location' => 'path',
|
---|
190 | 'type' => 'string',
|
---|
191 | 'required' => true,
|
---|
192 | ],
|
---|
193 | 'playerId' => [
|
---|
194 | 'location' => 'path',
|
---|
195 | 'type' => 'string',
|
---|
196 | 'required' => true,
|
---|
197 | ],
|
---|
198 | ],
|
---|
199 | ],'unhide' => [
|
---|
200 | 'path' => 'games/v1management/applications/{applicationId}/players/hidden/{playerId}',
|
---|
201 | 'httpMethod' => 'DELETE',
|
---|
202 | 'parameters' => [
|
---|
203 | 'applicationId' => [
|
---|
204 | 'location' => 'path',
|
---|
205 | 'type' => 'string',
|
---|
206 | 'required' => true,
|
---|
207 | ],
|
---|
208 | 'playerId' => [
|
---|
209 | 'location' => 'path',
|
---|
210 | 'type' => 'string',
|
---|
211 | 'required' => true,
|
---|
212 | ],
|
---|
213 | ],
|
---|
214 | ],
|
---|
215 | ]
|
---|
216 | ]
|
---|
217 | );
|
---|
218 | $this->scores = new GamesManagement\Resource\Scores(
|
---|
219 | $this,
|
---|
220 | $this->serviceName,
|
---|
221 | 'scores',
|
---|
222 | [
|
---|
223 | 'methods' => [
|
---|
224 | 'reset' => [
|
---|
225 | 'path' => 'games/v1management/leaderboards/{leaderboardId}/scores/reset',
|
---|
226 | 'httpMethod' => 'POST',
|
---|
227 | 'parameters' => [
|
---|
228 | 'leaderboardId' => [
|
---|
229 | 'location' => 'path',
|
---|
230 | 'type' => 'string',
|
---|
231 | 'required' => true,
|
---|
232 | ],
|
---|
233 | ],
|
---|
234 | ],'resetAll' => [
|
---|
235 | 'path' => 'games/v1management/scores/reset',
|
---|
236 | 'httpMethod' => 'POST',
|
---|
237 | 'parameters' => [],
|
---|
238 | ],'resetAllForAllPlayers' => [
|
---|
239 | 'path' => 'games/v1management/scores/resetAllForAllPlayers',
|
---|
240 | 'httpMethod' => 'POST',
|
---|
241 | 'parameters' => [],
|
---|
242 | ],'resetForAllPlayers' => [
|
---|
243 | 'path' => 'games/v1management/leaderboards/{leaderboardId}/scores/resetForAllPlayers',
|
---|
244 | 'httpMethod' => 'POST',
|
---|
245 | 'parameters' => [
|
---|
246 | 'leaderboardId' => [
|
---|
247 | 'location' => 'path',
|
---|
248 | 'type' => 'string',
|
---|
249 | 'required' => true,
|
---|
250 | ],
|
---|
251 | ],
|
---|
252 | ],'resetMultipleForAllPlayers' => [
|
---|
253 | 'path' => 'games/v1management/scores/resetMultipleForAllPlayers',
|
---|
254 | 'httpMethod' => 'POST',
|
---|
255 | 'parameters' => [],
|
---|
256 | ],
|
---|
257 | ]
|
---|
258 | ]
|
---|
259 | );
|
---|
260 | }
|
---|
261 | }
|
---|
262 |
|
---|
263 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
264 | class_alias(GamesManagement::class, 'Google_Service_GamesManagement');
|
---|