VersionHistory.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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 VersionHistory (v1).
  21. *
  22. * <p>
  23. * Version History API - Prod</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://developer.chrome.com/docs/web-platform/versionhistory/guide" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class VersionHistory extends \Google\Service
  33. {
  34. public $platforms;
  35. public $platforms_channels;
  36. public $platforms_channels_versions;
  37. public $platforms_channels_versions_releases;
  38. public $rootUrlTemplate;
  39. /**
  40. * Constructs the internal representation of the VersionHistory service.
  41. *
  42. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  43. * config array to pass to a new Client instance.
  44. * @param string $rootUrl The root URL used for requests to the service.
  45. */
  46. public function __construct($clientOrConfig = [], $rootUrl = null)
  47. {
  48. parent::__construct($clientOrConfig);
  49. $this->rootUrl = $rootUrl ?: 'https://versionhistory.googleapis.com/';
  50. $this->rootUrlTemplate = $rootUrl ?: 'https://versionhistory.UNIVERSE_DOMAIN/';
  51. $this->servicePath = '';
  52. $this->batchPath = 'batch';
  53. $this->version = 'v1';
  54. $this->serviceName = 'versionhistory';
  55. $this->platforms = new VersionHistory\Resource\Platforms(
  56. $this,
  57. $this->serviceName,
  58. 'platforms',
  59. [
  60. 'methods' => [
  61. 'list' => [
  62. 'path' => 'v1/{+parent}/platforms',
  63. 'httpMethod' => 'GET',
  64. 'parameters' => [
  65. 'parent' => [
  66. 'location' => 'path',
  67. 'type' => 'string',
  68. 'required' => true,
  69. ],
  70. 'pageSize' => [
  71. 'location' => 'query',
  72. 'type' => 'integer',
  73. ],
  74. 'pageToken' => [
  75. 'location' => 'query',
  76. 'type' => 'string',
  77. ],
  78. ],
  79. ],
  80. ]
  81. ]
  82. );
  83. $this->platforms_channels = new VersionHistory\Resource\PlatformsChannels(
  84. $this,
  85. $this->serviceName,
  86. 'channels',
  87. [
  88. 'methods' => [
  89. 'list' => [
  90. 'path' => 'v1/{+parent}/channels',
  91. 'httpMethod' => 'GET',
  92. 'parameters' => [
  93. 'parent' => [
  94. 'location' => 'path',
  95. 'type' => 'string',
  96. 'required' => true,
  97. ],
  98. 'pageSize' => [
  99. 'location' => 'query',
  100. 'type' => 'integer',
  101. ],
  102. 'pageToken' => [
  103. 'location' => 'query',
  104. 'type' => 'string',
  105. ],
  106. ],
  107. ],
  108. ]
  109. ]
  110. );
  111. $this->platforms_channels_versions = new VersionHistory\Resource\PlatformsChannelsVersions(
  112. $this,
  113. $this->serviceName,
  114. 'versions',
  115. [
  116. 'methods' => [
  117. 'list' => [
  118. 'path' => 'v1/{+parent}/versions',
  119. 'httpMethod' => 'GET',
  120. 'parameters' => [
  121. 'parent' => [
  122. 'location' => 'path',
  123. 'type' => 'string',
  124. 'required' => true,
  125. ],
  126. 'filter' => [
  127. 'location' => 'query',
  128. 'type' => 'string',
  129. ],
  130. 'orderBy' => [
  131. 'location' => 'query',
  132. 'type' => 'string',
  133. ],
  134. 'pageSize' => [
  135. 'location' => 'query',
  136. 'type' => 'integer',
  137. ],
  138. 'pageToken' => [
  139. 'location' => 'query',
  140. 'type' => 'string',
  141. ],
  142. ],
  143. ],
  144. ]
  145. ]
  146. );
  147. $this->platforms_channels_versions_releases = new VersionHistory\Resource\PlatformsChannelsVersionsReleases(
  148. $this,
  149. $this->serviceName,
  150. 'releases',
  151. [
  152. 'methods' => [
  153. 'list' => [
  154. 'path' => 'v1/{+parent}/releases',
  155. 'httpMethod' => 'GET',
  156. 'parameters' => [
  157. 'parent' => [
  158. 'location' => 'path',
  159. 'type' => 'string',
  160. 'required' => true,
  161. ],
  162. 'filter' => [
  163. 'location' => 'query',
  164. 'type' => 'string',
  165. ],
  166. 'orderBy' => [
  167. 'location' => 'query',
  168. 'type' => 'string',
  169. ],
  170. 'pageSize' => [
  171. 'location' => 'query',
  172. 'type' => 'integer',
  173. ],
  174. 'pageToken' => [
  175. 'location' => 'query',
  176. 'type' => 'string',
  177. ],
  178. ],
  179. ],
  180. ]
  181. ]
  182. );
  183. }
  184. }
  185. // Adding a class alias for backwards compatibility with the previous class name.
  186. class_alias(VersionHistory::class, 'Google_Service_VersionHistory');