[e3d4e0a] | 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 | namespace Google\Service\Calendar\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Calendar\Calendar;
|
---|
| 21 |
|
---|
| 22 | /**
|
---|
| 23 | * The "calendars" collection of methods.
|
---|
| 24 | * Typical usage is:
|
---|
| 25 | * <code>
|
---|
| 26 | * $calendarService = new Google\Service\Calendar(...);
|
---|
| 27 | * $calendars = $calendarService->calendars;
|
---|
| 28 | * </code>
|
---|
| 29 | */
|
---|
| 30 | class Calendars extends \Google\Service\Resource
|
---|
| 31 | {
|
---|
| 32 | /**
|
---|
| 33 | * Clears a primary calendar. This operation deletes all events associated with
|
---|
| 34 | * the primary calendar of an account. (calendars.clear)
|
---|
| 35 | *
|
---|
| 36 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
|
---|
| 37 | * the calendarList.list method. If you want to access the primary calendar of
|
---|
| 38 | * the currently logged in user, use the "primary" keyword.
|
---|
| 39 | * @param array $optParams Optional parameters.
|
---|
| 40 | * @throws \Google\Service\Exception
|
---|
| 41 | */
|
---|
| 42 | public function clear($calendarId, $optParams = [])
|
---|
| 43 | {
|
---|
| 44 | $params = ['calendarId' => $calendarId];
|
---|
| 45 | $params = array_merge($params, $optParams);
|
---|
| 46 | return $this->call('clear', [$params]);
|
---|
| 47 | }
|
---|
| 48 | /**
|
---|
| 49 | * Deletes a secondary calendar. Use calendars.clear for clearing all events on
|
---|
| 50 | * primary calendars. (calendars.delete)
|
---|
| 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 | * @throws \Google\Service\Exception
|
---|
| 57 | */
|
---|
| 58 | public function delete($calendarId, $optParams = [])
|
---|
| 59 | {
|
---|
| 60 | $params = ['calendarId' => $calendarId];
|
---|
| 61 | $params = array_merge($params, $optParams);
|
---|
| 62 | return $this->call('delete', [$params]);
|
---|
| 63 | }
|
---|
| 64 | /**
|
---|
| 65 | * Returns metadata for a calendar. (calendars.get)
|
---|
| 66 | *
|
---|
| 67 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
|
---|
| 68 | * the calendarList.list method. If you want to access the primary calendar of
|
---|
| 69 | * the currently logged in user, use the "primary" keyword.
|
---|
| 70 | * @param array $optParams Optional parameters.
|
---|
| 71 | * @return Calendar
|
---|
| 72 | * @throws \Google\Service\Exception
|
---|
| 73 | */
|
---|
| 74 | public function get($calendarId, $optParams = [])
|
---|
| 75 | {
|
---|
| 76 | $params = ['calendarId' => $calendarId];
|
---|
| 77 | $params = array_merge($params, $optParams);
|
---|
| 78 | return $this->call('get', [$params], Calendar::class);
|
---|
| 79 | }
|
---|
| 80 | /**
|
---|
| 81 | * Creates a secondary calendar. (calendars.insert)
|
---|
| 82 | *
|
---|
| 83 | * @param Calendar $postBody
|
---|
| 84 | * @param array $optParams Optional parameters.
|
---|
| 85 | * @return Calendar
|
---|
| 86 | * @throws \Google\Service\Exception
|
---|
| 87 | */
|
---|
| 88 | public function insert(Calendar $postBody, $optParams = [])
|
---|
| 89 | {
|
---|
| 90 | $params = ['postBody' => $postBody];
|
---|
| 91 | $params = array_merge($params, $optParams);
|
---|
| 92 | return $this->call('insert', [$params], Calendar::class);
|
---|
| 93 | }
|
---|
| 94 | /**
|
---|
| 95 | * Updates metadata for a calendar. This method supports patch semantics.
|
---|
| 96 | * (calendars.patch)
|
---|
| 97 | *
|
---|
| 98 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
|
---|
| 99 | * the calendarList.list method. If you want to access the primary calendar of
|
---|
| 100 | * the currently logged in user, use the "primary" keyword.
|
---|
| 101 | * @param Calendar $postBody
|
---|
| 102 | * @param array $optParams Optional parameters.
|
---|
| 103 | * @return Calendar
|
---|
| 104 | * @throws \Google\Service\Exception
|
---|
| 105 | */
|
---|
| 106 | public function patch($calendarId, Calendar $postBody, $optParams = [])
|
---|
| 107 | {
|
---|
| 108 | $params = ['calendarId' => $calendarId, 'postBody' => $postBody];
|
---|
| 109 | $params = array_merge($params, $optParams);
|
---|
| 110 | return $this->call('patch', [$params], Calendar::class);
|
---|
| 111 | }
|
---|
| 112 | /**
|
---|
| 113 | * Updates metadata for a calendar. (calendars.update)
|
---|
| 114 | *
|
---|
| 115 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
|
---|
| 116 | * the calendarList.list method. If you want to access the primary calendar of
|
---|
| 117 | * the currently logged in user, use the "primary" keyword.
|
---|
| 118 | * @param Calendar $postBody
|
---|
| 119 | * @param array $optParams Optional parameters.
|
---|
| 120 | * @return Calendar
|
---|
| 121 | * @throws \Google\Service\Exception
|
---|
| 122 | */
|
---|
| 123 | public function update($calendarId, Calendar $postBody, $optParams = [])
|
---|
| 124 | {
|
---|
| 125 | $params = ['calendarId' => $calendarId, 'postBody' => $postBody];
|
---|
| 126 | $params = array_merge($params, $optParams);
|
---|
| 127 | return $this->call('update', [$params], Calendar::class);
|
---|
| 128 | }
|
---|
| 129 | }
|
---|
| 130 |
|
---|
| 131 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 132 | class_alias(Calendars::class, 'Google_Service_Calendar_Resource_Calendars');
|
---|