GamesManagement.php 8.6 KB

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