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