source: vendor/google/apiclient-services/src/Gmail/Resource/Users.php

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

Upload project files

  • Property mode set to 100644
File size: 2.7 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\Gmail\Resource;
19
20use Google\Service\Gmail\Profile;
21use Google\Service\Gmail\WatchRequest;
22use Google\Service\Gmail\WatchResponse;
23
24/**
25 * The "users" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $gmailService = new Google\Service\Gmail(...);
29 * $users = $gmailService->users;
30 * </code>
31 */
32class Users extends \Google\Service\Resource
33{
34 /**
35 * Gets the current user's Gmail profile. (users.getProfile)
36 *
37 * @param string $userId The user's email address. The special value `me` can be
38 * used to indicate the authenticated user.
39 * @param array $optParams Optional parameters.
40 * @return Profile
41 * @throws \Google\Service\Exception
42 */
43 public function getProfile($userId, $optParams = [])
44 {
45 $params = ['userId' => $userId];
46 $params = array_merge($params, $optParams);
47 return $this->call('getProfile', [$params], Profile::class);
48 }
49 /**
50 * Stop receiving push notifications for the given user mailbox. (users.stop)
51 *
52 * @param string $userId The user's email address. The special value `me` can be
53 * used to indicate the authenticated user.
54 * @param array $optParams Optional parameters.
55 * @throws \Google\Service\Exception
56 */
57 public function stop($userId, $optParams = [])
58 {
59 $params = ['userId' => $userId];
60 $params = array_merge($params, $optParams);
61 return $this->call('stop', [$params]);
62 }
63 /**
64 * Set up or update a push notification watch on the given user mailbox.
65 * (users.watch)
66 *
67 * @param string $userId The user's email address. The special value `me` can be
68 * used to indicate the authenticated user.
69 * @param WatchRequest $postBody
70 * @param array $optParams Optional parameters.
71 * @return WatchResponse
72 * @throws \Google\Service\Exception
73 */
74 public function watch($userId, WatchRequest $postBody, $optParams = [])
75 {
76 $params = ['userId' => $userId, 'postBody' => $postBody];
77 $params = array_merge($params, $optParams);
78 return $this->call('watch', [$params], WatchResponse::class);
79 }
80}
81
82// Adding a class alias for backwards compatibility with the previous class name.
83class_alias(Users::class, 'Google_Service_Gmail_Resource_Users');
Note: See TracBrowser for help on using the repository browser.