Google_Service_YouTube_Channels_Resource

The "channels" collection of methods.

Defined (1)

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

/src/Google/Service/YouTube.php  
  1. class Google_Service_YouTube_Channels_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Returns a collection of zero or more channel resources that match the request 
  5. * criteria. (channels.listChannels) 
  6. * @param string $part The part parameter specifies a comma-separated list of 
  7. * one or more channel resource properties that the API response will include. 
  8. * The part names that you can include in the parameter value are id, snippet,  
  9. * contentDetails, statistics, topicDetails, and invideoPromotion. 
  10. * If the parameter identifies a property that contains child properties, the 
  11. * child properties will be included in the response. For example, in a channel 
  12. * resource, the contentDetails property contains other properties, such as the 
  13. * uploads properties. As such, if you set part=contentDetails, the API response 
  14. * will also contain all of those nested properties. 
  15. * @param array $optParams Optional parameters. 
  16. * @opt_param bool managedByMe Set this parameter's value to true to instruct 
  17. * the API to only return channels managed by the content owner that the 
  18. * onBehalfOfContentOwner parameter specifies. The user must be authenticated as 
  19. * a CMS account linked to the specified content owner and 
  20. * onBehalfOfContentOwner must be provided. 
  21. * @opt_param string onBehalfOfContentOwner The onBehalfOfContentOwner parameter 
  22. * indicates that the authenticated user is acting on behalf of the content 
  23. * owner specified in the parameter value. This parameter is intended for 
  24. * YouTube content partners that own and manage many different YouTube channels. 
  25. * It allows content owners to authenticate once and get access to all their 
  26. * video and channel data, without having to provide authentication credentials 
  27. * for each individual channel. The actual CMS account that the user 
  28. * authenticates with needs to be linked to the specified YouTube content owner. 
  29. * @opt_param string forUsername The forUsername parameter specifies a YouTube 
  30. * username, thereby requesting the channel associated with that username. 
  31. * @opt_param bool mine Set this parameter's value to true to instruct the API 
  32. * to only return channels owned by the authenticated user. 
  33. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  34. * number of items that should be returned in the result set. 
  35. * @opt_param string id The id parameter specifies a comma-separated list of the 
  36. * YouTube channel ID(s) for the resource(s) that are being retrieved. In a 
  37. * channel resource, the id property specifies the channel's YouTube channel ID. 
  38. * @opt_param string pageToken The pageToken parameter identifies a specific 
  39. * page in the result set that should be returned. In an API response, the 
  40. * nextPageToken and prevPageToken properties identify other pages that could be 
  41. * retrieved. 
  42. * @opt_param bool mySubscribers Set this parameter's value to true to retrieve 
  43. * a list of channels that subscribed to the authenticated user's channel. 
  44. * @opt_param string categoryId The categoryId parameter specifies a YouTube 
  45. * guide category, thereby requesting YouTube channels associated with that 
  46. * category. 
  47. * @return Google_Service_YouTube_ChannelListResponse 
  48. */ 
  49. public function listChannels($part, $optParams = array()) 
  50. $params = array('part' => $part); 
  51. $params = array_merge($params, $optParams); 
  52. return $this->call('list', array($params), "Google_Service_YouTube_ChannelListResponse"); 
  53.  
  54. /** 
  55. * Updates a channel's metadata. (channels.update) 
  56. * @param string $part The part parameter serves two purposes in this operation. 
  57. * It identifies the properties that the write operation will set as well as the 
  58. * properties that the API response will include. 
  59. * The part names that you can include in the parameter value are id and 
  60. * invideoPromotion. 
  61. * Note that this method will override the existing values for all of the 
  62. * mutable properties that are contained in any parts that the parameter value 
  63. * specifies. 
  64. * @param Google_Channel $postBody 
  65. * @param array $optParams Optional parameters. 
  66. * @opt_param string onBehalfOfContentOwner The onBehalfOfContentOwner parameter 
  67. * indicates that the authenticated user is acting on behalf of the content 
  68. * owner specified in the parameter value. This parameter is intended for 
  69. * YouTube content partners that own and manage many different YouTube channels. 
  70. * It allows content owners to authenticate once and get access to all their 
  71. * video and channel data, without having to provide authentication credentials 
  72. * for each individual channel. The actual CMS account that the user 
  73. * authenticates with needs to be linked to the specified YouTube content owner. 
  74. * @return Google_Service_YouTube_Channel 
  75. */ 
  76. public function update($part, Google_Service_YouTube_Channel $postBody, $optParams = array()) 
  77. $params = array('part' => $part, 'postBody' => $postBody); 
  78. $params = array_merge($params, $optParams); 
  79. return $this->call('update', array($params), "Google_Service_YouTube_Channel");