[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\YouTube\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\YouTube\LiveChatModerator;
|
---|
| 21 | use Google\Service\YouTube\LiveChatModeratorListResponse;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "liveChatModerators" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $youtubeService = new Google\Service\YouTube(...);
|
---|
| 28 | * $liveChatModerators = $youtubeService->liveChatModerators;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class LiveChatModerators extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Deletes a chat moderator. (liveChatModerators.delete)
|
---|
| 35 | *
|
---|
| 36 | * @param string $id
|
---|
| 37 | * @param array $optParams Optional parameters.
|
---|
| 38 | * @throws \Google\Service\Exception
|
---|
| 39 | */
|
---|
| 40 | public function delete($id, $optParams = [])
|
---|
| 41 | {
|
---|
| 42 | $params = ['id' => $id];
|
---|
| 43 | $params = array_merge($params, $optParams);
|
---|
| 44 | return $this->call('delete', [$params]);
|
---|
| 45 | }
|
---|
| 46 | /**
|
---|
| 47 | * Inserts a new resource into this collection. (liveChatModerators.insert)
|
---|
| 48 | *
|
---|
| 49 | * @param string|array $part The *part* parameter serves two purposes in this
|
---|
| 50 | * operation. It identifies the properties that the write operation will set as
|
---|
| 51 | * well as the properties that the API response returns. Set the parameter value
|
---|
| 52 | * to snippet.
|
---|
| 53 | * @param LiveChatModerator $postBody
|
---|
| 54 | * @param array $optParams Optional parameters.
|
---|
| 55 | * @return LiveChatModerator
|
---|
| 56 | * @throws \Google\Service\Exception
|
---|
| 57 | */
|
---|
| 58 | public function insert($part, LiveChatModerator $postBody, $optParams = [])
|
---|
| 59 | {
|
---|
| 60 | $params = ['part' => $part, 'postBody' => $postBody];
|
---|
| 61 | $params = array_merge($params, $optParams);
|
---|
| 62 | return $this->call('insert', [$params], LiveChatModerator::class);
|
---|
| 63 | }
|
---|
| 64 | /**
|
---|
| 65 | * Retrieves a list of resources, possibly filtered.
|
---|
| 66 | * (liveChatModerators.listLiveChatModerators)
|
---|
| 67 | *
|
---|
| 68 | * @param string $liveChatId The id of the live chat for which moderators should
|
---|
| 69 | * be returned.
|
---|
| 70 | * @param string|array $part The *part* parameter specifies the
|
---|
| 71 | * liveChatModerator resource parts that the API response will include.
|
---|
| 72 | * Supported values are id and snippet.
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | *
|
---|
| 75 | * @opt_param string maxResults The *maxResults* parameter specifies the maximum
|
---|
| 76 | * number of items that should be returned in the result set.
|
---|
| 77 | * @opt_param string pageToken The *pageToken* parameter identifies a specific
|
---|
| 78 | * page in the result set that should be returned. In an API response, the
|
---|
| 79 | * nextPageToken and prevPageToken properties identify other pages that could be
|
---|
| 80 | * retrieved.
|
---|
| 81 | * @return LiveChatModeratorListResponse
|
---|
| 82 | * @throws \Google\Service\Exception
|
---|
| 83 | */
|
---|
| 84 | public function listLiveChatModerators($liveChatId, $part, $optParams = [])
|
---|
| 85 | {
|
---|
| 86 | $params = ['liveChatId' => $liveChatId, 'part' => $part];
|
---|
| 87 | $params = array_merge($params, $optParams);
|
---|
| 88 | return $this->call('list', [$params], LiveChatModeratorListResponse::class);
|
---|
| 89 | }
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 93 | class_alias(LiveChatModerators::class, 'Google_Service_YouTube_Resource_LiveChatModerators');
|
---|