source: vendor/google/apiclient-services/src/Tasks/Resource/Tasklists.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload project files

  • Property mode set to 100644
File size: 4.4 KB
Line 
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
18namespace Google\Service\Tasks\Resource;
19
20use Google\Service\Tasks\TaskList;
21use Google\Service\Tasks\TaskLists as TaskListsModel;
22
23/**
24 * The "tasklists" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $tasksService = new Google\Service\Tasks(...);
28 * $tasklists = $tasksService->tasklists;
29 * </code>
30 */
31class Tasklists extends \Google\Service\Resource
32{
33 /**
34 * Deletes the authenticated user's specified task list. If the list contains
35 * assigned tasks, both the assigned tasks and the original tasks in the
36 * assignment surface (Docs, Chat Spaces) are deleted. (tasklists.delete)
37 *
38 * @param string $tasklist Task list identifier.
39 * @param array $optParams Optional parameters.
40 * @throws \Google\Service\Exception
41 */
42 public function delete($tasklist, $optParams = [])
43 {
44 $params = ['tasklist' => $tasklist];
45 $params = array_merge($params, $optParams);
46 return $this->call('delete', [$params]);
47 }
48 /**
49 * Returns the authenticated user's specified task list. (tasklists.get)
50 *
51 * @param string $tasklist Task list identifier.
52 * @param array $optParams Optional parameters.
53 * @return TaskList
54 * @throws \Google\Service\Exception
55 */
56 public function get($tasklist, $optParams = [])
57 {
58 $params = ['tasklist' => $tasklist];
59 $params = array_merge($params, $optParams);
60 return $this->call('get', [$params], TaskList::class);
61 }
62 /**
63 * Creates a new task list and adds it to the authenticated user's task lists. A
64 * user can have up to 2000 lists at a time. (tasklists.insert)
65 *
66 * @param TaskList $postBody
67 * @param array $optParams Optional parameters.
68 * @return TaskList
69 * @throws \Google\Service\Exception
70 */
71 public function insert(TaskList $postBody, $optParams = [])
72 {
73 $params = ['postBody' => $postBody];
74 $params = array_merge($params, $optParams);
75 return $this->call('insert', [$params], TaskList::class);
76 }
77 /**
78 * Returns all the authenticated user's task lists. A user can have up to 2000
79 * lists at a time. (tasklists.listTasklists)
80 *
81 * @param array $optParams Optional parameters.
82 *
83 * @opt_param int maxResults Maximum number of task lists returned on one page.
84 * Optional. The default is 20 (max allowed: 100).
85 * @opt_param string pageToken Token specifying the result page to return.
86 * Optional.
87 * @return TaskListsModel
88 * @throws \Google\Service\Exception
89 */
90 public function listTasklists($optParams = [])
91 {
92 $params = [];
93 $params = array_merge($params, $optParams);
94 return $this->call('list', [$params], TaskListsModel::class);
95 }
96 /**
97 * Updates the authenticated user's specified task list. This method supports
98 * patch semantics. (tasklists.patch)
99 *
100 * @param string $tasklist Task list identifier.
101 * @param TaskList $postBody
102 * @param array $optParams Optional parameters.
103 * @return TaskList
104 * @throws \Google\Service\Exception
105 */
106 public function patch($tasklist, TaskList $postBody, $optParams = [])
107 {
108 $params = ['tasklist' => $tasklist, 'postBody' => $postBody];
109 $params = array_merge($params, $optParams);
110 return $this->call('patch', [$params], TaskList::class);
111 }
112 /**
113 * Updates the authenticated user's specified task list. (tasklists.update)
114 *
115 * @param string $tasklist Task list identifier.
116 * @param TaskList $postBody
117 * @param array $optParams Optional parameters.
118 * @return TaskList
119 * @throws \Google\Service\Exception
120 */
121 public function update($tasklist, TaskList $postBody, $optParams = [])
122 {
123 $params = ['tasklist' => $tasklist, 'postBody' => $postBody];
124 $params = array_merge($params, $optParams);
125 return $this->call('update', [$params], TaskList::class);
126 }
127}
128
129// Adding a class alias for backwards compatibility with the previous class name.
130class_alias(Tasklists::class, 'Google_Service_Tasks_Resource_Tasklists');
Note: See TracBrowser for help on using the repository browser.