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\ChannelBannerResource; 21 22/** 23 * The "channelBanners" collection of methods. 24 * Typical usage is: 25 * <code> 26 * $youtubeService = new Google\Service\YouTube(...); 27 * $channelBanners = $youtubeService->channelBanners; 28 * </code> 29 */ 30class ChannelBanners extends \Google\Service\Resource 31{ 32 /** 33 * Inserts a new resource into this collection. (channelBanners.insert) 34 * 35 * @param ChannelBannerResource $postBody 36 * @param array $optParams Optional parameters. 37 * 38 * @opt_param string channelId Unused, channel_id is currently derived from the 39 * security context of the requestor. 40 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended 41 * exclusively for YouTube content partners. The *onBehalfOfContentOwner* 42 * parameter indicates that the request's authorization credentials identify a 43 * YouTube CMS user who is acting on behalf of the content owner specified in 44 * the parameter value. This parameter is intended for YouTube content partners 45 * that own and manage many different YouTube channels. It allows content owners 46 * to authenticate once and get access to all their video and channel data, 47 * without having to provide authentication credentials for each individual 48 * channel. The actual CMS account that the user authenticates with must be 49 * linked to the specified YouTube content owner. 50 * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be 51 * used in a properly authorized request. *Note:* This parameter is intended 52 * exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* 53 * parameter specifies the YouTube channel ID of the channel to which a video is 54 * being added. This parameter is required when a request specifies a value for 55 * the onBehalfOfContentOwner parameter, and it can only be used in conjunction 56 * with that parameter. In addition, the request must be authorized using a CMS 57 * account that is linked to the content owner that the onBehalfOfContentOwner 58 * parameter specifies. Finally, the channel that the 59 * onBehalfOfContentOwnerChannel parameter value specifies must be linked to the 60 * content owner that the onBehalfOfContentOwner parameter specifies. This 61 * parameter is intended for YouTube content partners that own and manage many 62 * different YouTube channels. It allows content owners to authenticate once and 63 * perform actions on behalf of the channel specified in the parameter value, 64 * without having to provide authentication credentials for each separate 65 * channel. 66 * @return ChannelBannerResource 67 */ 68 public function insert(ChannelBannerResource $postBody, $optParams = []) 69 { 70 $params = ['postBody' => $postBody]; 71 $params = array_merge($params, $optParams); 72 return $this->call('insert', [$params], ChannelBannerResource::class); 73 } 74} 75 76// Adding a class alias for backwards compatibility with the previous class name. 77class_alias(ChannelBanners::class, 'Google_Service_YouTube_Resource_ChannelBanners'); 78