[e3d4e0a] | 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\GamesManagement\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\GamesManagement\AchievementResetAllResponse;
|
---|
| 21 | use Google\Service\GamesManagement\AchievementResetMultipleForAllRequest;
|
---|
| 22 | use Google\Service\GamesManagement\AchievementResetResponse;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "achievements" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $gamesManagementService = new Google\Service\GamesManagement(...);
|
---|
| 29 | * $achievements = $gamesManagementService->achievements;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class Achievements extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Resets the achievement with the given ID for the currently authenticated
|
---|
| 36 | * player. This method is only accessible to whitelisted tester accounts for
|
---|
| 37 | * your application. (achievements.reset)
|
---|
| 38 | *
|
---|
| 39 | * @param string $achievementId The ID of the achievement used by this method.
|
---|
| 40 | * @param array $optParams Optional parameters.
|
---|
| 41 | * @return AchievementResetResponse
|
---|
| 42 | * @throws \Google\Service\Exception
|
---|
| 43 | */
|
---|
| 44 | public function reset($achievementId, $optParams = [])
|
---|
| 45 | {
|
---|
| 46 | $params = ['achievementId' => $achievementId];
|
---|
| 47 | $params = array_merge($params, $optParams);
|
---|
| 48 | return $this->call('reset', [$params], AchievementResetResponse::class);
|
---|
| 49 | }
|
---|
| 50 | /**
|
---|
| 51 | * Resets all achievements for the currently authenticated player for your
|
---|
| 52 | * application. This method is only accessible to whitelisted tester accounts
|
---|
| 53 | * for your application. (achievements.resetAll)
|
---|
| 54 | *
|
---|
| 55 | * @param array $optParams Optional parameters.
|
---|
| 56 | * @return AchievementResetAllResponse
|
---|
| 57 | * @throws \Google\Service\Exception
|
---|
| 58 | */
|
---|
| 59 | public function resetAll($optParams = [])
|
---|
| 60 | {
|
---|
| 61 | $params = [];
|
---|
| 62 | $params = array_merge($params, $optParams);
|
---|
| 63 | return $this->call('resetAll', [$params], AchievementResetAllResponse::class);
|
---|
| 64 | }
|
---|
| 65 | /**
|
---|
| 66 | * Resets all draft achievements for all players. This method is only available
|
---|
| 67 | * to user accounts for your developer console.
|
---|
| 68 | * (achievements.resetAllForAllPlayers)
|
---|
| 69 | *
|
---|
| 70 | * @param array $optParams Optional parameters.
|
---|
| 71 | * @throws \Google\Service\Exception
|
---|
| 72 | */
|
---|
| 73 | public function resetAllForAllPlayers($optParams = [])
|
---|
| 74 | {
|
---|
| 75 | $params = [];
|
---|
| 76 | $params = array_merge($params, $optParams);
|
---|
| 77 | return $this->call('resetAllForAllPlayers', [$params]);
|
---|
| 78 | }
|
---|
| 79 | /**
|
---|
| 80 | * Resets the achievement with the given ID for all players. This method is only
|
---|
| 81 | * available to user accounts for your developer console. Only draft
|
---|
| 82 | * achievements can be reset. (achievements.resetForAllPlayers)
|
---|
| 83 | *
|
---|
| 84 | * @param string $achievementId The ID of the achievement used by this method.
|
---|
| 85 | * @param array $optParams Optional parameters.
|
---|
| 86 | * @throws \Google\Service\Exception
|
---|
| 87 | */
|
---|
| 88 | public function resetForAllPlayers($achievementId, $optParams = [])
|
---|
| 89 | {
|
---|
| 90 | $params = ['achievementId' => $achievementId];
|
---|
| 91 | $params = array_merge($params, $optParams);
|
---|
| 92 | return $this->call('resetForAllPlayers', [$params]);
|
---|
| 93 | }
|
---|
| 94 | /**
|
---|
| 95 | * Resets achievements with the given IDs for all players. This method is only
|
---|
| 96 | * available to user accounts for your developer console. Only draft
|
---|
| 97 | * achievements may be reset. (achievements.resetMultipleForAllPlayers)
|
---|
| 98 | *
|
---|
| 99 | * @param AchievementResetMultipleForAllRequest $postBody
|
---|
| 100 | * @param array $optParams Optional parameters.
|
---|
| 101 | * @throws \Google\Service\Exception
|
---|
| 102 | */
|
---|
| 103 | public function resetMultipleForAllPlayers(AchievementResetMultipleForAllRequest $postBody, $optParams = [])
|
---|
| 104 | {
|
---|
| 105 | $params = ['postBody' => $postBody];
|
---|
| 106 | $params = array_merge($params, $optParams);
|
---|
| 107 | return $this->call('resetMultipleForAllPlayers', [$params]);
|
---|
| 108 | }
|
---|
| 109 | }
|
---|
| 110 |
|
---|
| 111 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 112 | class_alias(Achievements::class, 'Google_Service_GamesManagement_Resource_Achievements');
|
---|