Acl.php
7 months ago
CalendarList.php
7 months ago
Calendars.php
7 months ago
Channels.php
7 months ago
Colors.php
7 months ago
Events.php
7 months ago
Freebusy.php
7 months ago
Settings.php
7 months ago
Settings.php
105 lines
| 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 AmeliaVendor\Google\Service\Calendar\Resource; |
| 19 | |
| 20 | use AmeliaVendor\Google\Service\Calendar\Channel; |
| 21 | use AmeliaVendor\Google\Service\Calendar\Setting; |
| 22 | use AmeliaVendor\Google\Service\Calendar\Settings as SettingsModel; |
| 23 | |
| 24 | /** |
| 25 | * The "settings" collection of methods. |
| 26 | * Typical usage is: |
| 27 | * <code> |
| 28 | * $calendarService = new \AmeliaVendor\Google\Service\Calendar(...); |
| 29 | * $settings = $calendarService->settings; |
| 30 | * </code> |
| 31 | */ |
| 32 | class Settings extends \AmeliaVendor\Google\Service\Resource |
| 33 | { |
| 34 | /** |
| 35 | * Returns a single user setting. (settings.get) |
| 36 | * |
| 37 | * @param string $setting The id of the user setting. |
| 38 | * @param array $optParams Optional parameters. |
| 39 | * @return Setting |
| 40 | * @throws \AmeliaVendor\Google\Service\Exception |
| 41 | */ |
| 42 | public function get($setting, $optParams = []) |
| 43 | { |
| 44 | $params = ['setting' => $setting]; |
| 45 | $params = array_merge($params, $optParams); |
| 46 | return $this->call('get', [$params], Setting::class); |
| 47 | } |
| 48 | /** |
| 49 | * Returns all user settings for the authenticated user. (settings.listSettings) |
| 50 | * |
| 51 | * @param array $optParams Optional parameters. |
| 52 | * |
| 53 | * @opt_param int maxResults Maximum number of entries returned on one result |
| 54 | * page. By default the value is 100 entries. The page size can never be larger |
| 55 | * than 250 entries. Optional. |
| 56 | * @opt_param string pageToken Token specifying which result page to return. |
| 57 | * Optional. |
| 58 | * @opt_param string syncToken Token obtained from the nextSyncToken field |
| 59 | * returned on the last page of results from the previous list request. It makes |
| 60 | * the result of this list request contain only entries that have changed since |
| 61 | * then. If the syncToken expires, the server will respond with a 410 GONE |
| 62 | * response code and the client should clear its storage and perform a full |
| 63 | * synchronization without any syncToken. Learn more about incremental |
| 64 | * synchronization. Optional. The default is to return all entries. |
| 65 | * @return SettingsModel |
| 66 | * @throws \AmeliaVendor\Google\Service\Exception |
| 67 | */ |
| 68 | public function listSettings($optParams = []) |
| 69 | { |
| 70 | $params = []; |
| 71 | $params = array_merge($params, $optParams); |
| 72 | return $this->call('list', [$params], SettingsModel::class); |
| 73 | } |
| 74 | /** |
| 75 | * Watch for changes to Settings resources. (settings.watch) |
| 76 | * |
| 77 | * @param Channel $postBody |
| 78 | * @param array $optParams Optional parameters. |
| 79 | * |
| 80 | * @opt_param int maxResults Maximum number of entries returned on one result |
| 81 | * page. By default the value is 100 entries. The page size can never be larger |
| 82 | * than 250 entries. Optional. |
| 83 | * @opt_param string pageToken Token specifying which result page to return. |
| 84 | * Optional. |
| 85 | * @opt_param string syncToken Token obtained from the nextSyncToken field |
| 86 | * returned on the last page of results from the previous list request. It makes |
| 87 | * the result of this list request contain only entries that have changed since |
| 88 | * then. If the syncToken expires, the server will respond with a 410 GONE |
| 89 | * response code and the client should clear its storage and perform a full |
| 90 | * synchronization without any syncToken. Learn more about incremental |
| 91 | * synchronization. Optional. The default is to return all entries. |
| 92 | * @return Channel |
| 93 | * @throws \AmeliaVendor\Google\Service\Exception |
| 94 | */ |
| 95 | public function watch(Channel $postBody, $optParams = []) |
| 96 | { |
| 97 | $params = ['postBody' => $postBody]; |
| 98 | $params = array_merge($params, $optParams); |
| 99 | return $this->call('watch', [$params], Channel::class); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | // Adding a class alias for backwards compatibility with the previous class name. |
| 104 | class_alias(Settings::class, 'Google_Service_Calendar_Resource_Settings'); |
| 105 |