Google_Service_YouTube_Playlists_Resource

The "playlists" collection of methods.

Defined (1)

The class is defined in the following location(s).

/src/Google/Service/YouTube.php  
  1. class Google_Service_YouTube_Playlists_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Deletes a playlist. (playlists.delete) 
  5. * @param string $id The id parameter specifies the YouTube playlist ID for the 
  6. * playlist that is being deleted. In a playlist resource, the id property 
  7. * specifies the playlist's ID. 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  10. * exclusively for YouTube content partners. 
  11. * The onBehalfOfContentOwner parameter indicates that the request's 
  12. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  13. * of the content owner specified in the parameter value. This parameter is 
  14. * intended for YouTube content partners that own and manage many different 
  15. * YouTube channels. It allows content owners to authenticate once and get 
  16. * access to all their video and channel data, without having to provide 
  17. * authentication credentials for each individual channel. The CMS account that 
  18. * the user authenticates with must be linked to the specified YouTube content 
  19. * owner. 
  20. */ 
  21. public function delete($id, $optParams = array()) 
  22. $params = array('id' => $id); 
  23. $params = array_merge($params, $optParams); 
  24. return $this->call('delete', array($params)); 
  25.  
  26. /** 
  27. * Creates a playlist. (playlists.insert) 
  28. * @param string $part The part parameter serves two purposes in this operation. 
  29. * It identifies the properties that the write operation will set as well as the 
  30. * properties that the API response will include. 
  31. * The part names that you can include in the parameter value are snippet and 
  32. * status. 
  33. * @param Google_Playlist $postBody 
  34. * @param array $optParams Optional parameters. 
  35. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be 
  36. * used in a properly authorized request. Note: This parameter is intended 
  37. * exclusively for YouTube content partners. 
  38. * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID 
  39. * of the channel to which a video is being added. This parameter is required 
  40. * when a request specifies a value for the onBehalfOfContentOwner parameter,  
  41. * and it can only be used in conjunction with that parameter. In addition, the 
  42. * request must be authorized using a CMS account that is linked to the content 
  43. * owner that the onBehalfOfContentOwner parameter specifies. Finally, the 
  44. * channel that the onBehalfOfContentOwnerChannel parameter value specifies must 
  45. * be linked to the content owner that the onBehalfOfContentOwner parameter 
  46. * specifies. 
  47. * This parameter is intended for YouTube content partners that own and manage 
  48. * many different YouTube channels. It allows content owners to authenticate 
  49. * once and perform actions on behalf of the channel specified in the parameter 
  50. * value, without having to provide authentication credentials for each separate 
  51. * channel. 
  52. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  53. * exclusively for YouTube content partners. 
  54. * The onBehalfOfContentOwner parameter indicates that the request's 
  55. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  56. * of the content owner specified in the parameter value. This parameter is 
  57. * intended for YouTube content partners that own and manage many different 
  58. * YouTube channels. It allows content owners to authenticate once and get 
  59. * access to all their video and channel data, without having to provide 
  60. * authentication credentials for each individual channel. The CMS account that 
  61. * the user authenticates with must be linked to the specified YouTube content 
  62. * owner. 
  63. * @return Google_Service_YouTube_Playlist 
  64. */ 
  65. public function insert($part, Google_Service_YouTube_Playlist $postBody, $optParams = array()) 
  66. $params = array('part' => $part, 'postBody' => $postBody); 
  67. $params = array_merge($params, $optParams); 
  68. return $this->call('insert', array($params), "Google_Service_YouTube_Playlist"); 
  69.  
  70. /** 
  71. * Returns a collection of playlists that match the API request parameters. For 
  72. * example, you can retrieve all playlists that the authenticated user owns, or 
  73. * you can retrieve one or more playlists by their unique IDs. 
  74. * (playlists.listPlaylists) 
  75. * @param string $part The part parameter specifies a comma-separated list of 
  76. * one or more playlist resource properties that the API response will include. 
  77. * The part names that you can include in the parameter value are id, snippet,  
  78. * status, and contentDetails. 
  79. * If the parameter identifies a property that contains child properties, the 
  80. * child properties will be included in the response. For example, in a playlist 
  81. * resource, the snippet property contains properties like author, title,  
  82. * description, tags, and timeCreated. As such, if you set part=snippet, the API 
  83. * response will contain all of those properties. 
  84. * @param array $optParams Optional parameters. 
  85. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  86. * exclusively for YouTube content partners. 
  87. * The onBehalfOfContentOwner parameter indicates that the request's 
  88. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  89. * of the content owner specified in the parameter value. This parameter is 
  90. * intended for YouTube content partners that own and manage many different 
  91. * YouTube channels. It allows content owners to authenticate once and get 
  92. * access to all their video and channel data, without having to provide 
  93. * authentication credentials for each individual channel. The CMS account that 
  94. * the user authenticates with must be linked to the specified YouTube content 
  95. * owner. 
  96. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be 
  97. * used in a properly authorized request. Note: This parameter is intended 
  98. * exclusively for YouTube content partners. 
  99. * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID 
  100. * of the channel to which a video is being added. This parameter is required 
  101. * when a request specifies a value for the onBehalfOfContentOwner parameter,  
  102. * and it can only be used in conjunction with that parameter. In addition, the 
  103. * request must be authorized using a CMS account that is linked to the content 
  104. * owner that the onBehalfOfContentOwner parameter specifies. Finally, the 
  105. * channel that the onBehalfOfContentOwnerChannel parameter value specifies must 
  106. * be linked to the content owner that the onBehalfOfContentOwner parameter 
  107. * specifies. 
  108. * This parameter is intended for YouTube content partners that own and manage 
  109. * many different YouTube channels. It allows content owners to authenticate 
  110. * once and perform actions on behalf of the channel specified in the parameter 
  111. * value, without having to provide authentication credentials for each separate 
  112. * channel. 
  113. * @opt_param string channelId This value indicates that the API should only 
  114. * return the specified channel's playlists. 
  115. * @opt_param bool mine Set this parameter's value to true to instruct the API 
  116. * to only return playlists owned by the authenticated user. 
  117. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  118. * number of items that should be returned in the result set. 
  119. * @opt_param string pageToken The pageToken parameter identifies a specific 
  120. * page in the result set that should be returned. In an API response, the 
  121. * nextPageToken and prevPageToken properties identify other pages that could be 
  122. * retrieved. 
  123. * @opt_param string id The id parameter specifies a comma-separated list of the 
  124. * YouTube playlist ID(s) for the resource(s) that are being retrieved. In a 
  125. * playlist resource, the id property specifies the playlist's YouTube playlist 
  126. * ID. 
  127. * @return Google_Service_YouTube_PlaylistListResponse 
  128. */ 
  129. public function listPlaylists($part, $optParams = array()) 
  130. $params = array('part' => $part); 
  131. $params = array_merge($params, $optParams); 
  132. return $this->call('list', array($params), "Google_Service_YouTube_PlaylistListResponse"); 
  133.  
  134. /** 
  135. * Modifies a playlist. For example, you could change a playlist's title,  
  136. * description, or privacy status. (playlists.update) 
  137. * @param string $part The part parameter serves two purposes in this operation. 
  138. * It identifies the properties that the write operation will set as well as the 
  139. * properties that the API response will include. 
  140. * The part names that you can include in the parameter value are snippet and 
  141. * status. 
  142. * Note that this method will override the existing values for all of the 
  143. * mutable properties that are contained in any parts that the parameter value 
  144. * specifies. For example, a playlist's privacy setting is contained in the 
  145. * status part. As such, if your request is updating a private playlist, and the 
  146. * request's part parameter value includes the status part, the playlist's 
  147. * privacy setting will be updated to whatever value the request body specifies. 
  148. * If the request body does not specify a value, the existing privacy setting 
  149. * will be removed and the playlist will revert to the default privacy setting. 
  150. * @param Google_Playlist $postBody 
  151. * @param array $optParams Optional parameters. 
  152. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  153. * exclusively for YouTube content partners. 
  154. * The onBehalfOfContentOwner parameter indicates that the request's 
  155. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  156. * of the content owner specified in the parameter value. This parameter is 
  157. * intended for YouTube content partners that own and manage many different 
  158. * YouTube channels. It allows content owners to authenticate once and get 
  159. * access to all their video and channel data, without having to provide 
  160. * authentication credentials for each individual channel. The CMS account that 
  161. * the user authenticates with must be linked to the specified YouTube content 
  162. * owner. 
  163. * @return Google_Service_YouTube_Playlist 
  164. */ 
  165. public function update($part, Google_Service_YouTube_Playlist $postBody, $optParams = array()) 
  166. $params = array('part' => $part, 'postBody' => $postBody); 
  167. $params = array_merge($params, $optParams); 
  168. return $this->call('update', array($params), "Google_Service_YouTube_Playlist");