Нема описа

Chromewebstore.php 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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. * Service definition for Chromewebstore (v1.1).
  19. *
  20. * <p>
  21. * Lets you access to data about apps and extensions, as well as manage them.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_Chromewebstore extends Google_Service
  31. {
  32. /** View your Chrome Web Store apps and extensions. */
  33. const CHROMEWEBSTORE_READONLY =
  34. "https://www.googleapis.com/auth/chromewebstore.readonly";
  35. public $inAppProducts;
  36. public $items;
  37. public $licenses;
  38. public $payments;
  39. /**
  40. * Constructs the internal representation of the Chromewebstore service.
  41. *
  42. * @param Google_Client $client
  43. */
  44. public function __construct(Google_Client $client)
  45. {
  46. parent::__construct($client);
  47. $this->rootUrl = 'https://www.googleapis.com/';
  48. $this->servicePath = 'chromewebstore/v1.1/';
  49. $this->version = 'v1.1';
  50. $this->serviceName = 'chromewebstore';
  51. $this->inAppProducts = new Google_Service_Chromewebstore_Resource_InAppProducts(
  52. $this,
  53. $this->serviceName,
  54. 'inAppProducts',
  55. array(
  56. 'methods' => array(
  57. 'get' => array(
  58. 'path' => 'items/{itemId}/skus/{sku}',
  59. 'httpMethod' => 'GET',
  60. 'parameters' => array(
  61. 'itemId' => array(
  62. 'location' => 'path',
  63. 'type' => 'string',
  64. 'required' => true,
  65. ),
  66. 'sku' => array(
  67. 'location' => 'path',
  68. 'type' => 'string',
  69. 'required' => true,
  70. ),
  71. 'gl' => array(
  72. 'location' => 'query',
  73. 'type' => 'string',
  74. ),
  75. 'hl' => array(
  76. 'location' => 'query',
  77. 'type' => 'string',
  78. ),
  79. 'projection' => array(
  80. 'location' => 'query',
  81. 'type' => 'string',
  82. ),
  83. ),
  84. ),'list' => array(
  85. 'path' => 'items/{itemId}/skus',
  86. 'httpMethod' => 'GET',
  87. 'parameters' => array(
  88. 'itemId' => array(
  89. 'location' => 'path',
  90. 'type' => 'string',
  91. 'required' => true,
  92. ),
  93. 'gl' => array(
  94. 'location' => 'query',
  95. 'type' => 'string',
  96. ),
  97. 'hl' => array(
  98. 'location' => 'query',
  99. 'type' => 'string',
  100. ),
  101. 'projection' => array(
  102. 'location' => 'query',
  103. 'type' => 'string',
  104. ),
  105. ),
  106. ),
  107. )
  108. )
  109. );
  110. $this->items = new Google_Service_Chromewebstore_Resource_Items(
  111. $this,
  112. $this->serviceName,
  113. 'items',
  114. array(
  115. 'methods' => array(
  116. 'get' => array(
  117. 'path' => 'items/{itemId}',
  118. 'httpMethod' => 'GET',
  119. 'parameters' => array(
  120. 'itemId' => array(
  121. 'location' => 'path',
  122. 'type' => 'string',
  123. 'required' => true,
  124. ),
  125. 'projection' => array(
  126. 'location' => 'query',
  127. 'type' => 'string',
  128. ),
  129. ),
  130. ),'insert' => array(
  131. 'path' => 'items',
  132. 'httpMethod' => 'POST',
  133. 'parameters' => array(
  134. 'publisherEmail' => array(
  135. 'location' => 'query',
  136. 'type' => 'string',
  137. ),
  138. ),
  139. ),'patch' => array(
  140. 'path' => 'items/{itemId}',
  141. 'httpMethod' => 'PATCH',
  142. 'parameters' => array(
  143. 'itemId' => array(
  144. 'location' => 'path',
  145. 'type' => 'string',
  146. 'required' => true,
  147. ),
  148. ),
  149. ),'publish' => array(
  150. 'path' => 'items/{itemId}/publish',
  151. 'httpMethod' => 'POST',
  152. 'parameters' => array(
  153. 'itemId' => array(
  154. 'location' => 'path',
  155. 'type' => 'string',
  156. 'required' => true,
  157. ),
  158. 'deployPercentage' => array(
  159. 'location' => 'query',
  160. 'type' => 'integer',
  161. ),
  162. 'publishTarget' => array(
  163. 'location' => 'query',
  164. 'type' => 'string',
  165. ),
  166. ),
  167. ),'update' => array(
  168. 'path' => 'items/{itemId}',
  169. 'httpMethod' => 'PUT',
  170. 'parameters' => array(
  171. 'itemId' => array(
  172. 'location' => 'path',
  173. 'type' => 'string',
  174. 'required' => true,
  175. ),
  176. ),
  177. ),
  178. )
  179. )
  180. );
  181. $this->licenses = new Google_Service_Chromewebstore_Resource_Licenses(
  182. $this,
  183. $this->serviceName,
  184. 'licenses',
  185. array(
  186. 'methods' => array(
  187. 'get' => array(
  188. 'path' => 'licenses/{appId}/{userId}',
  189. 'httpMethod' => 'GET',
  190. 'parameters' => array(),
  191. ),'getUserLicense' => array(
  192. 'path' => 'userlicenses/{appId}',
  193. 'httpMethod' => 'GET',
  194. 'parameters' => array(),
  195. ),
  196. )
  197. )
  198. );
  199. $this->payments = new Google_Service_Chromewebstore_Resource_Payments(
  200. $this,
  201. $this->serviceName,
  202. 'payments',
  203. array(
  204. 'methods' => array(
  205. 'buy' => array(
  206. 'path' => 'payments/buy',
  207. 'httpMethod' => 'POST',
  208. 'parameters' => array(
  209. 'projection' => array(
  210. 'location' => 'query',
  211. 'type' => 'string',
  212. ),
  213. ),
  214. ),'delete' => array(
  215. 'path' => 'items/{itemId}/skus/{sku}',
  216. 'httpMethod' => 'DELETE',
  217. 'parameters' => array(
  218. 'itemId' => array(
  219. 'location' => 'path',
  220. 'type' => 'string',
  221. 'required' => true,
  222. ),
  223. 'sku' => array(
  224. 'location' => 'path',
  225. 'type' => 'string',
  226. 'required' => true,
  227. ),
  228. ),
  229. ),'list' => array(
  230. 'path' => 'items/{itemId}/payments',
  231. 'httpMethod' => 'GET',
  232. 'parameters' => array(
  233. 'projection' => array(
  234. 'location' => 'query',
  235. 'type' => 'string',
  236. ),
  237. ),
  238. ),
  239. )
  240. )
  241. );
  242. }
  243. }