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\YouTubeAnalytics\Resource; 19 20use Google\Service\YouTubeAnalytics\EmptyResponse; 21use Google\Service\YouTubeAnalytics\GroupItem; 22use Google\Service\YouTubeAnalytics\ListGroupItemsResponse; 23 24/** 25 * The "groupItems" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $youtubeAnalyticsService = new Google\Service\YouTubeAnalytics(...); 29 * $groupItems = $youtubeAnalyticsService->groupItems; 30 * </code> 31 */ 32class GroupItems extends \Google\Service\Resource 33{ 34 /** 35 * Removes an item from a group. (groupItems.delete) 36 * 37 * @param array $optParams Optional parameters. 38 * 39 * @opt_param string id The `id` parameter specifies the YouTube group item ID 40 * of the group item that is being deleted. 41 * @opt_param string onBehalfOfContentOwner This parameter can only be used in a 42 * properly authorized request. **Note:** This parameter is intended exclusively 43 * for YouTube content partners that own and manage many different YouTube 44 * channels. The `onBehalfOfContentOwner` parameter indicates that the request's 45 * authorization credentials identify a YouTube user who is acting on behalf of 46 * the content owner specified in the parameter value. It allows content owners 47 * to authenticate once and get access to all their video and channel data, 48 * without having to provide authentication credentials for each individual 49 * channel. The account that the user authenticates with must be linked to the 50 * specified YouTube content owner. 51 * @return EmptyResponse 52 */ 53 public function delete($optParams = []) 54 { 55 $params = []; 56 $params = array_merge($params, $optParams); 57 return $this->call('delete', [$params], EmptyResponse::class); 58 } 59 /** 60 * Creates a group item. (groupItems.insert) 61 * 62 * @param GroupItem $postBody 63 * @param array $optParams Optional parameters. 64 * 65 * @opt_param string onBehalfOfContentOwner This parameter can only be used in a 66 * properly authorized request. **Note:** This parameter is intended exclusively 67 * for YouTube content partners that own and manage many different YouTube 68 * channels. The `onBehalfOfContentOwner` parameter indicates that the request's 69 * authorization credentials identify a YouTube user who is acting on behalf of 70 * the content owner specified in the parameter value. It allows content owners 71 * to authenticate once and get access to all their video and channel data, 72 * without having to provide authentication credentials for each individual 73 * channel. The account that the user authenticates with must be linked to the 74 * specified YouTube content owner. 75 * @return GroupItem 76 */ 77 public function insert(GroupItem $postBody, $optParams = []) 78 { 79 $params = ['postBody' => $postBody]; 80 $params = array_merge($params, $optParams); 81 return $this->call('insert', [$params], GroupItem::class); 82 } 83 /** 84 * Returns a collection of group items that match the API request parameters. 85 * (groupItems.listGroupItems) 86 * 87 * @param array $optParams Optional parameters. 88 * 89 * @opt_param string groupId The `groupId` parameter specifies the unique ID of 90 * the group for which you want to retrieve group items. 91 * @opt_param string onBehalfOfContentOwner This parameter can only be used in a 92 * properly authorized request. **Note:** This parameter is intended exclusively 93 * for YouTube content partners that own and manage many different YouTube 94 * channels. The `onBehalfOfContentOwner` parameter indicates that the request's 95 * authorization credentials identify a YouTube user who is acting on behalf of 96 * the content owner specified in the parameter value. It allows content owners 97 * to authenticate once and get access to all their video and channel data, 98 * without having to provide authentication credentials for each individual 99 * channel. The account that the user authenticates with must be linked to the 100 * specified YouTube content owner. 101 * @return ListGroupItemsResponse 102 */ 103 public function listGroupItems($optParams = []) 104 { 105 $params = []; 106 $params = array_merge($params, $optParams); 107 return $this->call('list', [$params], ListGroupItemsResponse::class); 108 } 109} 110 111// Adding a class alias for backwards compatibility with the previous class name. 112class_alias(GroupItems::class, 'Google_Service_YouTubeAnalytics_Resource_GroupItems'); 113