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 Tasks (v1).
20 *
21 * <p>
22 * Manages your tasks and task lists.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://developers.google.com/google-apps/tasks/firstapp" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31class Google_Service_Tasks extends Google_Service
32{
33  /** Create, edit, organize, and delete all your tasks. */
34  const TASKS =
35      "https://www.googleapis.com/auth/tasks";
36  /** View your tasks. */
37  const TASKS_READONLY =
38      "https://www.googleapis.com/auth/tasks.readonly";
39
40  public $tasklists;
41  public $tasks;
42
43  /**
44   * Constructs the internal representation of the Tasks service.
45   *
46   * @param Google_Client $client
47   */
48  public function __construct(Google_Client $client)
49  {
50    parent::__construct($client);
51    $this->rootUrl = 'https://www.googleapis.com/';
52    $this->servicePath = 'tasks/v1/';
53    $this->batchPath = 'batch/tasks/v1';
54    $this->version = 'v1';
55    $this->serviceName = 'tasks';
56
57    $this->tasklists = new Google_Service_Tasks_Resource_Tasklists(
58        $this,
59        $this->serviceName,
60        'tasklists',
61        array(
62          'methods' => array(
63            'delete' => array(
64              'path' => 'users/@me/lists/{tasklist}',
65              'httpMethod' => 'DELETE',
66              'parameters' => array(
67                'tasklist' => array(
68                  'location' => 'path',
69                  'type' => 'string',
70                  'required' => true,
71                ),
72              ),
73            ),'get' => array(
74              'path' => 'users/@me/lists/{tasklist}',
75              'httpMethod' => 'GET',
76              'parameters' => array(
77                'tasklist' => array(
78                  'location' => 'path',
79                  'type' => 'string',
80                  'required' => true,
81                ),
82              ),
83            ),'insert' => array(
84              'path' => 'users/@me/lists',
85              'httpMethod' => 'POST',
86              'parameters' => array(),
87            ),'list' => array(
88              'path' => 'users/@me/lists',
89              'httpMethod' => 'GET',
90              'parameters' => array(
91                'maxResults' => array(
92                  'location' => 'query',
93                  'type' => 'string',
94                ),
95                'pageToken' => array(
96                  'location' => 'query',
97                  'type' => 'string',
98                ),
99              ),
100            ),'patch' => array(
101              'path' => 'users/@me/lists/{tasklist}',
102              'httpMethod' => 'PATCH',
103              'parameters' => array(
104                'tasklist' => array(
105                  'location' => 'path',
106                  'type' => 'string',
107                  'required' => true,
108                ),
109              ),
110            ),'update' => array(
111              'path' => 'users/@me/lists/{tasklist}',
112              'httpMethod' => 'PUT',
113              'parameters' => array(
114                'tasklist' => array(
115                  'location' => 'path',
116                  'type' => 'string',
117                  'required' => true,
118                ),
119              ),
120            ),
121          )
122        )
123    );
124    $this->tasks = new Google_Service_Tasks_Resource_Tasks(
125        $this,
126        $this->serviceName,
127        'tasks',
128        array(
129          'methods' => array(
130            'clear' => array(
131              'path' => 'lists/{tasklist}/clear',
132              'httpMethod' => 'POST',
133              'parameters' => array(
134                'tasklist' => array(
135                  'location' => 'path',
136                  'type' => 'string',
137                  'required' => true,
138                ),
139              ),
140            ),'delete' => array(
141              'path' => 'lists/{tasklist}/tasks/{task}',
142              'httpMethod' => 'DELETE',
143              'parameters' => array(
144                'tasklist' => array(
145                  'location' => 'path',
146                  'type' => 'string',
147                  'required' => true,
148                ),
149                'task' => array(
150                  'location' => 'path',
151                  'type' => 'string',
152                  'required' => true,
153                ),
154              ),
155            ),'get' => array(
156              'path' => 'lists/{tasklist}/tasks/{task}',
157              'httpMethod' => 'GET',
158              'parameters' => array(
159                'tasklist' => array(
160                  'location' => 'path',
161                  'type' => 'string',
162                  'required' => true,
163                ),
164                'task' => array(
165                  'location' => 'path',
166                  'type' => 'string',
167                  'required' => true,
168                ),
169              ),
170            ),'insert' => array(
171              'path' => 'lists/{tasklist}/tasks',
172              'httpMethod' => 'POST',
173              'parameters' => array(
174                'tasklist' => array(
175                  'location' => 'path',
176                  'type' => 'string',
177                  'required' => true,
178                ),
179                'parent' => array(
180                  'location' => 'query',
181                  'type' => 'string',
182                ),
183                'previous' => array(
184                  'location' => 'query',
185                  'type' => 'string',
186                ),
187              ),
188            ),'list' => array(
189              'path' => 'lists/{tasklist}/tasks',
190              'httpMethod' => 'GET',
191              'parameters' => array(
192                'tasklist' => array(
193                  'location' => 'path',
194                  'type' => 'string',
195                  'required' => true,
196                ),
197                'completedMax' => array(
198                  'location' => 'query',
199                  'type' => 'string',
200                ),
201                'completedMin' => array(
202                  'location' => 'query',
203                  'type' => 'string',
204                ),
205                'dueMax' => array(
206                  'location' => 'query',
207                  'type' => 'string',
208                ),
209                'dueMin' => array(
210                  'location' => 'query',
211                  'type' => 'string',
212                ),
213                'maxResults' => array(
214                  'location' => 'query',
215                  'type' => 'string',
216                ),
217                'pageToken' => array(
218                  'location' => 'query',
219                  'type' => 'string',
220                ),
221                'showCompleted' => array(
222                  'location' => 'query',
223                  'type' => 'boolean',
224                ),
225                'showDeleted' => array(
226                  'location' => 'query',
227                  'type' => 'boolean',
228                ),
229                'showHidden' => array(
230                  'location' => 'query',
231                  'type' => 'boolean',
232                ),
233                'updatedMin' => array(
234                  'location' => 'query',
235                  'type' => 'string',
236                ),
237              ),
238            ),'move' => array(
239              'path' => 'lists/{tasklist}/tasks/{task}/move',
240              'httpMethod' => 'POST',
241              'parameters' => array(
242                'tasklist' => array(
243                  'location' => 'path',
244                  'type' => 'string',
245                  'required' => true,
246                ),
247                'task' => array(
248                  'location' => 'path',
249                  'type' => 'string',
250                  'required' => true,
251                ),
252                'parent' => array(
253                  'location' => 'query',
254                  'type' => 'string',
255                ),
256                'previous' => array(
257                  'location' => 'query',
258                  'type' => 'string',
259                ),
260              ),
261            ),'patch' => array(
262              'path' => 'lists/{tasklist}/tasks/{task}',
263              'httpMethod' => 'PATCH',
264              'parameters' => array(
265                'tasklist' => array(
266                  'location' => 'path',
267                  'type' => 'string',
268                  'required' => true,
269                ),
270                'task' => array(
271                  'location' => 'path',
272                  'type' => 'string',
273                  'required' => true,
274                ),
275              ),
276            ),'update' => array(
277              'path' => 'lists/{tasklist}/tasks/{task}',
278              'httpMethod' => 'PUT',
279              'parameters' => array(
280                'tasklist' => array(
281                  'location' => 'path',
282                  'type' => 'string',
283                  'required' => true,
284                ),
285                'task' => array(
286                  'location' => 'path',
287                  'type' => 'string',
288                  'required' => true,
289                ),
290              ),
291            ),
292          )
293        )
294    );
295  }
296}
297