GamesConfiguration.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for GamesConfiguration (v1configuration).
  21. *
  22. * <p>
  23. * The Google Play Game Services Publishing API allows developers to configure
  24. * their games in Game Services.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/games/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class GamesConfiguration extends \Google\Service
  34. {
  35. /** View and manage your Google Play Developer account. */
  36. const ANDROIDPUBLISHER =
  37. "https://www.googleapis.com/auth/androidpublisher";
  38. public $achievementConfigurations;
  39. public $leaderboardConfigurations;
  40. public $rootUrlTemplate;
  41. /**
  42. * Constructs the internal representation of the GamesConfiguration service.
  43. *
  44. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  45. * config array to pass to a new Client instance.
  46. * @param string $rootUrl The root URL used for requests to the service.
  47. */
  48. public function __construct($clientOrConfig = [], $rootUrl = null)
  49. {
  50. parent::__construct($clientOrConfig);
  51. $this->rootUrl = $rootUrl ?: 'https://gamesconfiguration.googleapis.com/';
  52. $this->rootUrlTemplate = $rootUrl ?: 'https://gamesconfiguration.UNIVERSE_DOMAIN/';
  53. $this->servicePath = '';
  54. $this->batchPath = 'batch';
  55. $this->version = 'v1configuration';
  56. $this->serviceName = 'gamesConfiguration';
  57. $this->achievementConfigurations = new GamesConfiguration\Resource\AchievementConfigurations(
  58. $this,
  59. $this->serviceName,
  60. 'achievementConfigurations',
  61. [
  62. 'methods' => [
  63. 'delete' => [
  64. 'path' => 'games/v1configuration/achievements/{achievementId}',
  65. 'httpMethod' => 'DELETE',
  66. 'parameters' => [
  67. 'achievementId' => [
  68. 'location' => 'path',
  69. 'type' => 'string',
  70. 'required' => true,
  71. ],
  72. ],
  73. ],'get' => [
  74. 'path' => 'games/v1configuration/achievements/{achievementId}',
  75. 'httpMethod' => 'GET',
  76. 'parameters' => [
  77. 'achievementId' => [
  78. 'location' => 'path',
  79. 'type' => 'string',
  80. 'required' => true,
  81. ],
  82. ],
  83. ],'insert' => [
  84. 'path' => 'games/v1configuration/applications/{applicationId}/achievements',
  85. 'httpMethod' => 'POST',
  86. 'parameters' => [
  87. 'applicationId' => [
  88. 'location' => 'path',
  89. 'type' => 'string',
  90. 'required' => true,
  91. ],
  92. ],
  93. ],'list' => [
  94. 'path' => 'games/v1configuration/applications/{applicationId}/achievements',
  95. 'httpMethod' => 'GET',
  96. 'parameters' => [
  97. 'applicationId' => [
  98. 'location' => 'path',
  99. 'type' => 'string',
  100. 'required' => true,
  101. ],
  102. 'maxResults' => [
  103. 'location' => 'query',
  104. 'type' => 'integer',
  105. ],
  106. 'pageToken' => [
  107. 'location' => 'query',
  108. 'type' => 'string',
  109. ],
  110. ],
  111. ],'update' => [
  112. 'path' => 'games/v1configuration/achievements/{achievementId}',
  113. 'httpMethod' => 'PUT',
  114. 'parameters' => [
  115. 'achievementId' => [
  116. 'location' => 'path',
  117. 'type' => 'string',
  118. 'required' => true,
  119. ],
  120. ],
  121. ],
  122. ]
  123. ]
  124. );
  125. $this->leaderboardConfigurations = new GamesConfiguration\Resource\LeaderboardConfigurations(
  126. $this,
  127. $this->serviceName,
  128. 'leaderboardConfigurations',
  129. [
  130. 'methods' => [
  131. 'delete' => [
  132. 'path' => 'games/v1configuration/leaderboards/{leaderboardId}',
  133. 'httpMethod' => 'DELETE',
  134. 'parameters' => [
  135. 'leaderboardId' => [
  136. 'location' => 'path',
  137. 'type' => 'string',
  138. 'required' => true,
  139. ],
  140. ],
  141. ],'get' => [
  142. 'path' => 'games/v1configuration/leaderboards/{leaderboardId}',
  143. 'httpMethod' => 'GET',
  144. 'parameters' => [
  145. 'leaderboardId' => [
  146. 'location' => 'path',
  147. 'type' => 'string',
  148. 'required' => true,
  149. ],
  150. ],
  151. ],'insert' => [
  152. 'path' => 'games/v1configuration/applications/{applicationId}/leaderboards',
  153. 'httpMethod' => 'POST',
  154. 'parameters' => [
  155. 'applicationId' => [
  156. 'location' => 'path',
  157. 'type' => 'string',
  158. 'required' => true,
  159. ],
  160. ],
  161. ],'list' => [
  162. 'path' => 'games/v1configuration/applications/{applicationId}/leaderboards',
  163. 'httpMethod' => 'GET',
  164. 'parameters' => [
  165. 'applicationId' => [
  166. 'location' => 'path',
  167. 'type' => 'string',
  168. 'required' => true,
  169. ],
  170. 'maxResults' => [
  171. 'location' => 'query',
  172. 'type' => 'integer',
  173. ],
  174. 'pageToken' => [
  175. 'location' => 'query',
  176. 'type' => 'string',
  177. ],
  178. ],
  179. ],'update' => [
  180. 'path' => 'games/v1configuration/leaderboards/{leaderboardId}',
  181. 'httpMethod' => 'PUT',
  182. 'parameters' => [
  183. 'leaderboardId' => [
  184. 'location' => 'path',
  185. 'type' => 'string',
  186. 'required' => true,
  187. ],
  188. ],
  189. ],
  190. ]
  191. ]
  192. );
  193. }
  194. }
  195. // Adding a class alias for backwards compatibility with the previous class name.
  196. class_alias(GamesConfiguration::class, 'Google_Service_GamesConfiguration');