[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\GamesConfiguration\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\GamesConfiguration\AchievementConfiguration;
|
---|
| 21 | use Google\Service\GamesConfiguration\AchievementConfigurationListResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "achievementConfigurations" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $gamesConfigurationService = new Google\Service\GamesConfiguration(...);
|
---|
| 28 | * $achievementConfigurations = $gamesConfigurationService->achievementConfigurations;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class AchievementConfigurations extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Delete the achievement configuration with the given ID.
|
---|
| 35 | * (achievementConfigurations.delete)
|
---|
| 36 | *
|
---|
| 37 | * @param string $achievementId The ID of the achievement used by this method.
|
---|
| 38 | * @param array $optParams Optional parameters.
|
---|
| 39 | * @throws \Google\Service\Exception
|
---|
| 40 | */
|
---|
| 41 | public function delete($achievementId, $optParams = [])
|
---|
| 42 | {
|
---|
| 43 | $params = ['achievementId' => $achievementId];
|
---|
| 44 | $params = array_merge($params, $optParams);
|
---|
| 45 | return $this->call('delete', [$params]);
|
---|
| 46 | }
|
---|
| 47 | /**
|
---|
| 48 | * Retrieves the metadata of the achievement configuration with the given ID.
|
---|
| 49 | * (achievementConfigurations.get)
|
---|
| 50 | *
|
---|
| 51 | * @param string $achievementId The ID of the achievement used by this method.
|
---|
| 52 | * @param array $optParams Optional parameters.
|
---|
| 53 | * @return AchievementConfiguration
|
---|
| 54 | * @throws \Google\Service\Exception
|
---|
| 55 | */
|
---|
| 56 | public function get($achievementId, $optParams = [])
|
---|
| 57 | {
|
---|
| 58 | $params = ['achievementId' => $achievementId];
|
---|
| 59 | $params = array_merge($params, $optParams);
|
---|
| 60 | return $this->call('get', [$params], AchievementConfiguration::class);
|
---|
| 61 | }
|
---|
| 62 | /**
|
---|
| 63 | * Insert a new achievement configuration in this application.
|
---|
| 64 | * (achievementConfigurations.insert)
|
---|
| 65 | *
|
---|
| 66 | * @param string $applicationId The application ID from the Google Play
|
---|
| 67 | * developer console.
|
---|
| 68 | * @param AchievementConfiguration $postBody
|
---|
| 69 | * @param array $optParams Optional parameters.
|
---|
| 70 | * @return AchievementConfiguration
|
---|
| 71 | * @throws \Google\Service\Exception
|
---|
| 72 | */
|
---|
| 73 | public function insert($applicationId, AchievementConfiguration $postBody, $optParams = [])
|
---|
| 74 | {
|
---|
| 75 | $params = ['applicationId' => $applicationId, 'postBody' => $postBody];
|
---|
| 76 | $params = array_merge($params, $optParams);
|
---|
| 77 | return $this->call('insert', [$params], AchievementConfiguration::class);
|
---|
| 78 | }
|
---|
| 79 | /**
|
---|
| 80 | * Returns a list of the achievement configurations in this application.
|
---|
| 81 | * (achievementConfigurations.listAchievementConfigurations)
|
---|
| 82 | *
|
---|
| 83 | * @param string $applicationId The application ID from the Google Play
|
---|
| 84 | * developer console.
|
---|
| 85 | * @param array $optParams Optional parameters.
|
---|
| 86 | *
|
---|
| 87 | * @opt_param int maxResults The maximum number of resource configurations to
|
---|
| 88 | * return in the response, used for paging. For any response, the actual number
|
---|
| 89 | * of resources returned may be less than the specified `maxResults`.
|
---|
| 90 | * @opt_param string pageToken The token returned by the previous request.
|
---|
| 91 | * @return AchievementConfigurationListResponse
|
---|
| 92 | * @throws \Google\Service\Exception
|
---|
| 93 | */
|
---|
| 94 | public function listAchievementConfigurations($applicationId, $optParams = [])
|
---|
| 95 | {
|
---|
| 96 | $params = ['applicationId' => $applicationId];
|
---|
| 97 | $params = array_merge($params, $optParams);
|
---|
| 98 | return $this->call('list', [$params], AchievementConfigurationListResponse::class);
|
---|
| 99 | }
|
---|
| 100 | /**
|
---|
| 101 | * Update the metadata of the achievement configuration with the given ID.
|
---|
| 102 | * (achievementConfigurations.update)
|
---|
| 103 | *
|
---|
| 104 | * @param string $achievementId The ID of the achievement used by this method.
|
---|
| 105 | * @param AchievementConfiguration $postBody
|
---|
| 106 | * @param array $optParams Optional parameters.
|
---|
| 107 | * @return AchievementConfiguration
|
---|
| 108 | * @throws \Google\Service\Exception
|
---|
| 109 | */
|
---|
| 110 | public function update($achievementId, AchievementConfiguration $postBody, $optParams = [])
|
---|
| 111 | {
|
---|
| 112 | $params = ['achievementId' => $achievementId, 'postBody' => $postBody];
|
---|
| 113 | $params = array_merge($params, $optParams);
|
---|
| 114 | return $this->call('update', [$params], AchievementConfiguration::class);
|
---|
| 115 | }
|
---|
| 116 | }
|
---|
| 117 |
|
---|
| 118 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 119 | class_alias(AchievementConfigurations::class, 'Google_Service_GamesConfiguration_Resource_AchievementConfigurations');
|
---|