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\YouTube\Resource;
19
20use Google\Service\YouTube\MemberListResponse;
21
22/**
23 * The "members" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $youtubeService = new Google\Service\YouTube(...);
27 *   $members = $youtubeService->members;
28 *  </code>
29 */
30class Members extends \Google\Service\Resource
31{
32  /**
33   * Retrieves a list of members that match the request criteria for a channel.
34   * (members.listMembers)
35   *
36   * @param string|array $part The *part* parameter specifies the member resource
37   * parts that the API response will include. Set the parameter value to snippet.
38   * @param array $optParams Optional parameters.
39   *
40   * @opt_param string filterByMemberChannelId Comma separated list of channel
41   * IDs. Only data about members that are part of this list will be included in
42   * the response.
43   * @opt_param string hasAccessToLevel Filter members in the results set to the
44   * ones that have access to a level.
45   * @opt_param string maxResults The *maxResults* parameter specifies the maximum
46   * number of items that should be returned in the result set.
47   * @opt_param string mode Parameter that specifies which channel members to
48   * return.
49   * @opt_param string pageToken The *pageToken* parameter identifies a specific
50   * page in the result set that should be returned. In an API response, the
51   * nextPageToken and prevPageToken properties identify other pages that could be
52   * retrieved.
53   * @return MemberListResponse
54   */
55  public function listMembers($part, $optParams = [])
56  {
57    $params = ['part' => $part];
58    $params = array_merge($params, $optParams);
59    return $this->call('list', [$params], MemberListResponse::class);
60  }
61}
62
63// Adding a class alias for backwards compatibility with the previous class name.
64class_alias(Members::class, 'Google_Service_YouTube_Resource_Members');
65