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/** 19 * The "channelSections" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $youtubeService = new Google_Service_YouTube(...); 23 * $channelSections = $youtubeService->channelSections; 24 * </code> 25 */ 26class Google_Service_YouTube_Resource_ChannelSections extends Google_Service_Resource 27{ 28 /** 29 * Deletes a resource. (channelSections.delete) 30 * 31 * @param string $id 32 * @param array $optParams Optional parameters. 33 * 34 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended 35 * exclusively for YouTube content partners. The *onBehalfOfContentOwner* 36 * parameter indicates that the request's authorization credentials identify a 37 * YouTube CMS user who is acting on behalf of the content owner specified in 38 * the parameter value. This parameter is intended for YouTube content partners 39 * that own and manage many different YouTube channels. It allows content owners 40 * to authenticate once and get access to all their video and channel data, 41 * without having to provide authentication credentials for each individual 42 * channel. The CMS account that the user authenticates with must be linked to 43 * the specified YouTube content owner. 44 */ 45 public function delete($id, $optParams = array()) 46 { 47 $params = array('id' => $id); 48 $params = array_merge($params, $optParams); 49 return $this->call('delete', array($params)); 50 } 51 /** 52 * Inserts a new resource into this collection. (channelSections.insert) 53 * 54 * @param string|array $part The *part* parameter serves two purposes in this 55 * operation. It identifies the properties that the write operation will set as 56 * well as the properties that the API response will include. The part names 57 * that you can include in the parameter value are snippet and contentDetails. 58 * @param Google_Service_YouTube_ChannelSection $postBody 59 * @param array $optParams Optional parameters. 60 * 61 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended 62 * exclusively for YouTube content partners. The *onBehalfOfContentOwner* 63 * parameter indicates that the request's authorization credentials identify a 64 * YouTube CMS user who is acting on behalf of the content owner specified in 65 * the parameter value. This parameter is intended for YouTube content partners 66 * that own and manage many different YouTube channels. It allows content owners 67 * to authenticate once and get access to all their video and channel data, 68 * without having to provide authentication credentials for each individual 69 * channel. The CMS account that the user authenticates with must be linked to 70 * the specified YouTube content owner. 71 * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be 72 * used in a properly authorized request. *Note:* This parameter is intended 73 * exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* 74 * parameter specifies the YouTube channel ID of the channel to which a video is 75 * being added. This parameter is required when a request specifies a value for 76 * the onBehalfOfContentOwner parameter, and it can only be used in conjunction 77 * with that parameter. In addition, the request must be authorized using a CMS 78 * account that is linked to the content owner that the onBehalfOfContentOwner 79 * parameter specifies. Finally, the channel that the 80 * onBehalfOfContentOwnerChannel parameter value specifies must be linked to the 81 * content owner that the onBehalfOfContentOwner parameter specifies. This 82 * parameter is intended for YouTube content partners that own and manage many 83 * different YouTube channels. It allows content owners to authenticate once and 84 * perform actions on behalf of the channel specified in the parameter value, 85 * without having to provide authentication credentials for each separate 86 * channel. 87 * @return Google_Service_YouTube_ChannelSection 88 */ 89 public function insert($part, Google_Service_YouTube_ChannelSection $postBody, $optParams = array()) 90 { 91 $params = array('part' => $part, 'postBody' => $postBody); 92 $params = array_merge($params, $optParams); 93 return $this->call('insert', array($params), "Google_Service_YouTube_ChannelSection"); 94 } 95 /** 96 * Retrieves a list of resources, possibly filtered. 97 * (channelSections.listChannelSections) 98 * 99 * @param string|array $part The *part* parameter specifies a comma-separated 100 * list of one or more channelSection resource properties that the API response 101 * will include. The part names that you can include in the parameter value are 102 * id, snippet, and contentDetails. If the parameter identifies a property that 103 * contains child properties, the child properties will be included in the 104 * response. For example, in a channelSection resource, the snippet property 105 * contains other properties, such as a display title for the channelSection. If 106 * you set *part=snippet*, the API response will also contain all of those 107 * nested properties. 108 * @param array $optParams Optional parameters. 109 * 110 * @opt_param string channelId Return the ChannelSections owned by the specified 111 * channel ID. 112 * @opt_param string hl Return content in specified language 113 * @opt_param string id Return the ChannelSections with the given IDs for Stubby 114 * or Apiary. 115 * @opt_param bool mine Return the ChannelSections owned by the authenticated 116 * user. 117 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended 118 * exclusively for YouTube content partners. The *onBehalfOfContentOwner* 119 * parameter indicates that the request's authorization credentials identify a 120 * YouTube CMS user who is acting on behalf of the content owner specified in 121 * the parameter value. This parameter is intended for YouTube content partners 122 * that own and manage many different YouTube channels. It allows content owners 123 * to authenticate once and get access to all their video and channel data, 124 * without having to provide authentication credentials for each individual 125 * channel. The CMS account that the user authenticates with must be linked to 126 * the specified YouTube content owner. 127 * @return Google_Service_YouTube_ChannelSectionListResponse 128 */ 129 public function listChannelSections($part, $optParams = array()) 130 { 131 $params = array('part' => $part); 132 $params = array_merge($params, $optParams); 133 return $this->call('list', array($params), "Google_Service_YouTube_ChannelSectionListResponse"); 134 } 135 /** 136 * Updates an existing resource. (channelSections.update) 137 * 138 * @param string|array $part The *part* parameter serves two purposes in this 139 * operation. It identifies the properties that the write operation will set as 140 * well as the properties that the API response will include. The part names 141 * that you can include in the parameter value are snippet and contentDetails. 142 * @param Google_Service_YouTube_ChannelSection $postBody 143 * @param array $optParams Optional parameters. 144 * 145 * @opt_param string onBehalfOfContentOwner *Note:* This parameter is intended 146 * exclusively for YouTube content partners. The *onBehalfOfContentOwner* 147 * parameter indicates that the request's authorization credentials identify a 148 * YouTube CMS user who is acting on behalf of the content owner specified in 149 * the parameter value. This parameter is intended for YouTube content partners 150 * that own and manage many different YouTube channels. It allows content owners 151 * to authenticate once and get access to all their video and channel data, 152 * without having to provide authentication credentials for each individual 153 * channel. The CMS account that the user authenticates with must be linked to 154 * the specified YouTube content owner. 155 * @return Google_Service_YouTube_ChannelSection 156 */ 157 public function update($part, Google_Service_YouTube_ChannelSection $postBody, $optParams = array()) 158 { 159 $params = array('part' => $part, 'postBody' => $postBody); 160 $params = array_merge($params, $optParams); 161 return $this->call('update', array($params), "Google_Service_YouTube_ChannelSection"); 162 } 163} 164