1<?php 2/* 3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 * use this file except in compliance with the License. You may obtain a copy of 5 * the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 * License for the specific language governing permissions and limitations under 13 * the License. 14 */ 15 16 17 /** 18 * The "achievements" collection of methods. 19 * Typical usage is: 20 * <code> 21 * $gamesManagementService = new Google_GamesManagementService(...); 22 * $achievements = $gamesManagementService->achievements; 23 * </code> 24 */ 25 class Google_AchievementsServiceResource extends Google_ServiceResource { 26 27 /** 28 * Resets the achievement with the given ID. This method is only accessible to whitelisted tester 29 * accounts for your application. (achievements.reset) 30 * 31 * @param string $achievementId The ID of the achievement used by this method. 32 * @param array $optParams Optional parameters. 33 * @return Google_AchievementResetResponse 34 */ 35 public function reset($achievementId, $optParams = array()) { 36 $params = array('achievementId' => $achievementId); 37 $params = array_merge($params, $optParams); 38 $data = $this->__call('reset', array($params)); 39 if ($this->useObjects()) { 40 return new Google_AchievementResetResponse($data); 41 } else { 42 return $data; 43 } 44 } 45 /** 46 * Resets all achievements for the currently authenticated player for your application. This method 47 * is only accessible to whitelisted tester accounts for your application. (achievements.resetAll) 48 * 49 * @param array $optParams Optional parameters. 50 * @return Google_AchievementResetAllResponse 51 */ 52 public function resetAll($optParams = array()) { 53 $params = array(); 54 $params = array_merge($params, $optParams); 55 $data = $this->__call('resetAll', array($params)); 56 if ($this->useObjects()) { 57 return new Google_AchievementResetAllResponse($data); 58 } else { 59 return $data; 60 } 61 } 62 } 63 64 /** 65 * The "applications" collection of methods. 66 * Typical usage is: 67 * <code> 68 * $gamesManagementService = new Google_GamesManagementService(...); 69 * $applications = $gamesManagementService->applications; 70 * </code> 71 */ 72 class Google_ApplicationsServiceResource extends Google_ServiceResource { 73 74 /** 75 * Get the list of players hidden from the given application. This method is only available to user 76 * accounts for your developer console. (applications.listHidden) 77 * 78 * @param string $applicationId The application being requested. 79 * @param array $optParams Optional parameters. 80 * 81 * @opt_param int maxResults The maximum number of player resources to return in the response, used for paging. For any response, the actual number of player resources returned may be less than the specified maxResults. 82 * @opt_param string pageToken The token returned by the previous request. 83 * @return Google_HiddenPlayerList 84 */ 85 public function listHidden($applicationId, $optParams = array()) { 86 $params = array('applicationId' => $applicationId); 87 $params = array_merge($params, $optParams); 88 $data = $this->__call('listHidden', array($params)); 89 if ($this->useObjects()) { 90 return new Google_HiddenPlayerList($data); 91 } else { 92 return $data; 93 } 94 } 95 } 96 97 /** 98 * The "players" collection of methods. 99 * Typical usage is: 100 * <code> 101 * $gamesManagementService = new Google_GamesManagementService(...); 102 * $players = $gamesManagementService->players; 103 * </code> 104 */ 105 class Google_PlayersServiceResource extends Google_ServiceResource { 106 107 /** 108 * Hide the given player's leaderboard scores from the given application. This method is only 109 * available to user accounts for your developer console. (players.hide) 110 * 111 * @param string $applicationId The application being requested. 112 * @param string $playerId A player ID. A value of me may be used in place of the authenticated player's ID. 113 * @param array $optParams Optional parameters. 114 */ 115 public function hide($applicationId, $playerId, $optParams = array()) { 116 $params = array('applicationId' => $applicationId, 'playerId' => $playerId); 117 $params = array_merge($params, $optParams); 118 $data = $this->__call('hide', array($params)); 119 return $data; 120 } 121 /** 122 * Unhide the given player's leaderboard scores from the given application. This method is only 123 * available to user accounts for your developer console. (players.unhide) 124 * 125 * @param string $applicationId The application being requested. 126 * @param string $playerId A player ID. A value of me may be used in place of the authenticated player's ID. 127 * @param array $optParams Optional parameters. 128 */ 129 public function unhide($applicationId, $playerId, $optParams = array()) { 130 $params = array('applicationId' => $applicationId, 'playerId' => $playerId); 131 $params = array_merge($params, $optParams); 132 $data = $this->__call('unhide', array($params)); 133 return $data; 134 } 135 } 136 137 /** 138 * The "rooms" collection of methods. 139 * Typical usage is: 140 * <code> 141 * $gamesManagementService = new Google_GamesManagementService(...); 142 * $rooms = $gamesManagementService->rooms; 143 * </code> 144 */ 145 class Google_RoomsServiceResource extends Google_ServiceResource { 146 147 /** 148 * Reset all rooms for the currently authenticated player for your application. This method is only 149 * accessible to whitelisted tester accounts for your application. (rooms.reset) 150 * 151 * @param array $optParams Optional parameters. 152 */ 153 public function reset($optParams = array()) { 154 $params = array(); 155 $params = array_merge($params, $optParams); 156 $data = $this->__call('reset', array($params)); 157 return $data; 158 } 159 } 160 161 /** 162 * The "scores" collection of methods. 163 * Typical usage is: 164 * <code> 165 * $gamesManagementService = new Google_GamesManagementService(...); 166 * $scores = $gamesManagementService->scores; 167 * </code> 168 */ 169 class Google_ScoresServiceResource extends Google_ServiceResource { 170 171 /** 172 * Reset scores for the specified leaderboard, resetting the leaderboard to empty. This method is 173 * only accessible to whitelisted tester accounts for your application. (scores.reset) 174 * 175 * @param string $leaderboardId The ID of the leaderboard. 176 * @param array $optParams Optional parameters. 177 * @return Google_PlayerScoreResetResponse 178 */ 179 public function reset($leaderboardId, $optParams = array()) { 180 $params = array('leaderboardId' => $leaderboardId); 181 $params = array_merge($params, $optParams); 182 $data = $this->__call('reset', array($params)); 183 if ($this->useObjects()) { 184 return new Google_PlayerScoreResetResponse($data); 185 } else { 186 return $data; 187 } 188 } 189 } 190 191/** 192 * Service definition for Google_GamesManagement (v1management). 193 * 194 * <p> 195 * The Management API for Google Play Game Services. 196 * </p> 197 * 198 * <p> 199 * For more information about this service, see the 200 * <a href="https://developers.google.com/games/services" target="_blank">API Documentation</a> 201 * </p> 202 * 203 * @author Google, Inc. 204 */ 205class Google_GamesManagementService extends Google_Service { 206 public $achievements; 207 public $applications; 208 public $players; 209 public $rooms; 210 public $scores; 211 /** 212 * Constructs the internal representation of the GamesManagement service. 213 * 214 * @param Google_Client $client 215 */ 216 public function __construct(Google_Client $client) { 217 $this->servicePath = 'games/v1management/'; 218 $this->version = 'v1management'; 219 $this->serviceName = 'gamesManagement'; 220 221 $client->addService($this->serviceName, $this->version); 222 $this->achievements = new Google_AchievementsServiceResource($this, $this->serviceName, 'achievements', json_decode('{"methods": {"reset": {"id": "gamesManagement.achievements.reset", "path": "achievements/{achievementId}/reset", "httpMethod": "POST", "parameters": {"achievementId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "AchievementResetResponse"}, "scopes": ["https://www.googleapis.com/auth/plus.login"]}, "resetAll": {"id": "gamesManagement.achievements.resetAll", "path": "achievements/reset", "httpMethod": "POST", "response": {"$ref": "AchievementResetAllResponse"}, "scopes": ["https://www.googleapis.com/auth/plus.login"]}}}', true)); 223 $this->applications = new Google_ApplicationsServiceResource($this, $this->serviceName, 'applications', json_decode('{"methods": {"listHidden": {"id": "gamesManagement.applications.listHidden", "path": "applications/{applicationId}/players/hidden", "httpMethod": "GET", "parameters": {"applicationId": {"type": "string", "required": true, "location": "path"}, "maxResults": {"type": "integer", "format": "int32", "minimum": "1", "maximum": "15", "location": "query"}, "pageToken": {"type": "string", "location": "query"}}, "response": {"$ref": "HiddenPlayerList"}, "scopes": ["https://www.googleapis.com/auth/plus.login"]}}}', true)); 224 $this->players = new Google_PlayersServiceResource($this, $this->serviceName, 'players', json_decode('{"methods": {"hide": {"id": "gamesManagement.players.hide", "path": "applications/{applicationId}/players/hidden/{playerId}", "httpMethod": "POST", "parameters": {"applicationId": {"type": "string", "required": true, "location": "path"}, "playerId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/plus.login"]}, "unhide": {"id": "gamesManagement.players.unhide", "path": "applications/{applicationId}/players/hidden/{playerId}", "httpMethod": "DELETE", "parameters": {"applicationId": {"type": "string", "required": true, "location": "path"}, "playerId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/plus.login"]}}}', true)); 225 $this->rooms = new Google_RoomsServiceResource($this, $this->serviceName, 'rooms', json_decode('{"methods": {"reset": {"id": "gamesManagement.rooms.reset", "path": "rooms/reset", "httpMethod": "POST", "scopes": ["https://www.googleapis.com/auth/plus.login"]}}}', true)); 226 $this->scores = new Google_ScoresServiceResource($this, $this->serviceName, 'scores', json_decode('{"methods": {"reset": {"id": "gamesManagement.scores.reset", "path": "leaderboards/{leaderboardId}/scores/reset", "httpMethod": "POST", "parameters": {"leaderboardId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "PlayerScoreResetResponse"}, "scopes": ["https://www.googleapis.com/auth/plus.login"]}}}', true)); 227 228 } 229} 230 231 232 233class Google_AchievementResetAllResponse extends Google_Model { 234 public $kind; 235 protected $__resultsType = 'Google_AchievementResetResponse'; 236 protected $__resultsDataType = 'array'; 237 public $results; 238 public function setKind( $kind) { 239 $this->kind = $kind; 240 } 241 public function getKind() { 242 return $this->kind; 243 } 244 public function setResults(/* array(Google_AchievementResetResponse) */ $results) { 245 $this->assertIsArray($results, 'Google_AchievementResetResponse', __METHOD__); 246 $this->results = $results; 247 } 248 public function getResults() { 249 return $this->results; 250 } 251} 252 253class Google_AchievementResetResponse extends Google_Model { 254 public $currentState; 255 public $definitionId; 256 public $kind; 257 public $updateOccurred; 258 public function setCurrentState( $currentState) { 259 $this->currentState = $currentState; 260 } 261 public function getCurrentState() { 262 return $this->currentState; 263 } 264 public function setDefinitionId( $definitionId) { 265 $this->definitionId = $definitionId; 266 } 267 public function getDefinitionId() { 268 return $this->definitionId; 269 } 270 public function setKind( $kind) { 271 $this->kind = $kind; 272 } 273 public function getKind() { 274 return $this->kind; 275 } 276 public function setUpdateOccurred( $updateOccurred) { 277 $this->updateOccurred = $updateOccurred; 278 } 279 public function getUpdateOccurred() { 280 return $this->updateOccurred; 281 } 282} 283 284class Google_HiddenPlayer extends Google_Model { 285 public $hiddenTimeMillis; 286 public $kind; 287 protected $__playerType = 'Google_Player'; 288 protected $__playerDataType = ''; 289 public $player; 290 public function setHiddenTimeMillis( $hiddenTimeMillis) { 291 $this->hiddenTimeMillis = $hiddenTimeMillis; 292 } 293 public function getHiddenTimeMillis() { 294 return $this->hiddenTimeMillis; 295 } 296 public function setKind( $kind) { 297 $this->kind = $kind; 298 } 299 public function getKind() { 300 return $this->kind; 301 } 302 public function setPlayer(Google_Player $player) { 303 $this->player = $player; 304 } 305 public function getPlayer() { 306 return $this->player; 307 } 308} 309 310class Google_HiddenPlayerList extends Google_Model { 311 protected $__itemsType = 'Google_HiddenPlayer'; 312 protected $__itemsDataType = 'array'; 313 public $items; 314 public $kind; 315 public $nextPageToken; 316 public function setItems(/* array(Google_HiddenPlayer) */ $items) { 317 $this->assertIsArray($items, 'Google_HiddenPlayer', __METHOD__); 318 $this->items = $items; 319 } 320 public function getItems() { 321 return $this->items; 322 } 323 public function setKind( $kind) { 324 $this->kind = $kind; 325 } 326 public function getKind() { 327 return $this->kind; 328 } 329 public function setNextPageToken( $nextPageToken) { 330 $this->nextPageToken = $nextPageToken; 331 } 332 public function getNextPageToken() { 333 return $this->nextPageToken; 334 } 335} 336 337class Google_Player extends Google_Model { 338 public $avatarImageUrl; 339 public $displayName; 340 public $kind; 341 public $playerId; 342 public function setAvatarImageUrl( $avatarImageUrl) { 343 $this->avatarImageUrl = $avatarImageUrl; 344 } 345 public function getAvatarImageUrl() { 346 return $this->avatarImageUrl; 347 } 348 public function setDisplayName( $displayName) { 349 $this->displayName = $displayName; 350 } 351 public function getDisplayName() { 352 return $this->displayName; 353 } 354 public function setKind( $kind) { 355 $this->kind = $kind; 356 } 357 public function getKind() { 358 return $this->kind; 359 } 360 public function setPlayerId( $playerId) { 361 $this->playerId = $playerId; 362 } 363 public function getPlayerId() { 364 return $this->playerId; 365 } 366} 367 368class Google_PlayerScoreResetResponse extends Google_Model { 369 public $kind; 370 public $resetScoreTimeSpans; 371 public function setKind( $kind) { 372 $this->kind = $kind; 373 } 374 public function getKind() { 375 return $this->kind; 376 } 377 public function setResetScoreTimeSpans(/* array(Google_string) */ $resetScoreTimeSpans) { 378 $this->assertIsArray($resetScoreTimeSpans, 'Google_string', __METHOD__); 379 $this->resetScoreTimeSpans = $resetScoreTimeSpans; 380 } 381 public function getResetScoreTimeSpans() { 382 return $this->resetScoreTimeSpans; 383 } 384} 385