source: vendor/google/apiclient-services/src/Calendar/Resource/CalendarList.php

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

Upload project files

  • Property mode set to 100644
File size: 9.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\Calendar\Resource;
19
20use Google\Service\Calendar\CalendarList as CalendarListModel;
21use Google\Service\Calendar\CalendarListEntry;
22use Google\Service\Calendar\Channel;
23
24/**
25 * The "calendarList" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $calendarService = new Google\Service\Calendar(...);
29 * $calendarList = $calendarService->calendarList;
30 * </code>
31 */
32class CalendarList extends \Google\Service\Resource
33{
34 /**
35 * Removes a calendar from the user's calendar list. (calendarList.delete)
36 *
37 * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
38 * the calendarList.list method. If you want to access the primary calendar of
39 * the currently logged in user, use the "primary" keyword.
40 * @param array $optParams Optional parameters.
41 * @throws \Google\Service\Exception
42 */
43 public function delete($calendarId, $optParams = [])
44 {
45 $params = ['calendarId' => $calendarId];
46 $params = array_merge($params, $optParams);
47 return $this->call('delete', [$params]);
48 }
49 /**
50 * Returns a calendar from the user's calendar list. (calendarList.get)
51 *
52 * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
53 * the calendarList.list method. If you want to access the primary calendar of
54 * the currently logged in user, use the "primary" keyword.
55 * @param array $optParams Optional parameters.
56 * @return CalendarListEntry
57 * @throws \Google\Service\Exception
58 */
59 public function get($calendarId, $optParams = [])
60 {
61 $params = ['calendarId' => $calendarId];
62 $params = array_merge($params, $optParams);
63 return $this->call('get', [$params], CalendarListEntry::class);
64 }
65 /**
66 * Inserts an existing calendar into the user's calendar list.
67 * (calendarList.insert)
68 *
69 * @param CalendarListEntry $postBody
70 * @param array $optParams Optional parameters.
71 *
72 * @opt_param bool colorRgbFormat Whether to use the foregroundColor and
73 * backgroundColor fields to write the calendar colors (RGB). If this feature is
74 * used, the index-based colorId field will be set to the best matching option
75 * automatically. Optional. The default is False.
76 * @return CalendarListEntry
77 * @throws \Google\Service\Exception
78 */
79 public function insert(CalendarListEntry $postBody, $optParams = [])
80 {
81 $params = ['postBody' => $postBody];
82 $params = array_merge($params, $optParams);
83 return $this->call('insert', [$params], CalendarListEntry::class);
84 }
85 /**
86 * Returns the calendars on the user's calendar list.
87 * (calendarList.listCalendarList)
88 *
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param int maxResults Maximum number of entries returned on one result
92 * page. By default the value is 100 entries. The page size can never be larger
93 * than 250 entries. Optional.
94 * @opt_param string minAccessRole The minimum access role for the user in the
95 * returned entries. Optional. The default is no restriction.
96 * @opt_param string pageToken Token specifying which result page to return.
97 * Optional.
98 * @opt_param bool showDeleted Whether to include deleted calendar list entries
99 * in the result. Optional. The default is False.
100 * @opt_param bool showHidden Whether to show hidden entries. Optional. The
101 * default is False.
102 * @opt_param string syncToken Token obtained from the nextSyncToken field
103 * returned on the last page of results from the previous list request. It makes
104 * the result of this list request contain only entries that have changed since
105 * then. If only read-only fields such as calendar properties or ACLs have
106 * changed, the entry won't be returned. All entries deleted and hidden since
107 * the previous list request will always be in the result set and it is not
108 * allowed to set showDeleted neither showHidden to False. To ensure client
109 * state consistency minAccessRole query parameter cannot be specified together
110 * with nextSyncToken. If the syncToken expires, the server will respond with a
111 * 410 GONE response code and the client should clear its storage and perform a
112 * full synchronization without any syncToken. Learn more about incremental
113 * synchronization. Optional. The default is to return all entries.
114 * @return CalendarListModel
115 * @throws \Google\Service\Exception
116 */
117 public function listCalendarList($optParams = [])
118 {
119 $params = [];
120 $params = array_merge($params, $optParams);
121 return $this->call('list', [$params], CalendarListModel::class);
122 }
123 /**
124 * Updates an existing calendar on the user's calendar list. This method
125 * supports patch semantics. (calendarList.patch)
126 *
127 * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
128 * the calendarList.list method. If you want to access the primary calendar of
129 * the currently logged in user, use the "primary" keyword.
130 * @param CalendarListEntry $postBody
131 * @param array $optParams Optional parameters.
132 *
133 * @opt_param bool colorRgbFormat Whether to use the foregroundColor and
134 * backgroundColor fields to write the calendar colors (RGB). If this feature is
135 * used, the index-based colorId field will be set to the best matching option
136 * automatically. Optional. The default is False.
137 * @return CalendarListEntry
138 * @throws \Google\Service\Exception
139 */
140 public function patch($calendarId, CalendarListEntry $postBody, $optParams = [])
141 {
142 $params = ['calendarId' => $calendarId, 'postBody' => $postBody];
143 $params = array_merge($params, $optParams);
144 return $this->call('patch', [$params], CalendarListEntry::class);
145 }
146 /**
147 * Updates an existing calendar on the user's calendar list.
148 * (calendarList.update)
149 *
150 * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
151 * the calendarList.list method. If you want to access the primary calendar of
152 * the currently logged in user, use the "primary" keyword.
153 * @param CalendarListEntry $postBody
154 * @param array $optParams Optional parameters.
155 *
156 * @opt_param bool colorRgbFormat Whether to use the foregroundColor and
157 * backgroundColor fields to write the calendar colors (RGB). If this feature is
158 * used, the index-based colorId field will be set to the best matching option
159 * automatically. Optional. The default is False.
160 * @return CalendarListEntry
161 * @throws \Google\Service\Exception
162 */
163 public function update($calendarId, CalendarListEntry $postBody, $optParams = [])
164 {
165 $params = ['calendarId' => $calendarId, 'postBody' => $postBody];
166 $params = array_merge($params, $optParams);
167 return $this->call('update', [$params], CalendarListEntry::class);
168 }
169 /**
170 * Watch for changes to CalendarList resources. (calendarList.watch)
171 *
172 * @param Channel $postBody
173 * @param array $optParams Optional parameters.
174 *
175 * @opt_param int maxResults Maximum number of entries returned on one result
176 * page. By default the value is 100 entries. The page size can never be larger
177 * than 250 entries. Optional.
178 * @opt_param string minAccessRole The minimum access role for the user in the
179 * returned entries. Optional. The default is no restriction.
180 * @opt_param string pageToken Token specifying which result page to return.
181 * Optional.
182 * @opt_param bool showDeleted Whether to include deleted calendar list entries
183 * in the result. Optional. The default is False.
184 * @opt_param bool showHidden Whether to show hidden entries. Optional. The
185 * default is False.
186 * @opt_param string syncToken Token obtained from the nextSyncToken field
187 * returned on the last page of results from the previous list request. It makes
188 * the result of this list request contain only entries that have changed since
189 * then. If only read-only fields such as calendar properties or ACLs have
190 * changed, the entry won't be returned. All entries deleted and hidden since
191 * the previous list request will always be in the result set and it is not
192 * allowed to set showDeleted neither showHidden to False. To ensure client
193 * state consistency minAccessRole query parameter cannot be specified together
194 * with nextSyncToken. If the syncToken expires, the server will respond with a
195 * 410 GONE response code and the client should clear its storage and perform a
196 * full synchronization without any syncToken. Learn more about incremental
197 * synchronization. Optional. The default is to return all entries.
198 * @return Channel
199 * @throws \Google\Service\Exception
200 */
201 public function watch(Channel $postBody, $optParams = [])
202 {
203 $params = ['postBody' => $postBody];
204 $params = array_merge($params, $optParams);
205 return $this->call('watch', [$params], Channel::class);
206 }
207}
208
209// Adding a class alias for backwards compatibility with the previous class name.
210class_alias(CalendarList::class, 'Google_Service_Calendar_Resource_CalendarList');
Note: See TracBrowser for help on using the repository browser.