Google_Service_YouTube_Subscriptions_Resource

The "subscriptions" collection of methods.

Defined (1)

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

/includes/api-libs/Google/Service/YouTube.php  
  1. class Google_Service_YouTube_Subscriptions_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Deletes a subscription. (subscriptions.delete) 
  5. * @param string $id The id parameter specifies the YouTube subscription ID for 
  6. * the resource that is being deleted. In a subscription resource, the id 
  7. * property specifies the YouTube subscription ID. 
  8. * @param array $optParams Optional parameters. 
  9. */ 
  10. public function delete($id, $optParams = array()) 
  11. $params = array('id' => $id); 
  12. $params = array_merge($params, $optParams); 
  13. return $this->call('delete', array($params)); 
  14.  
  15. /** 
  16. * Adds a subscription for the authenticated user's channel. 
  17. * (subscriptions.insert) 
  18. * @param string $part The part parameter serves two purposes in this operation. 
  19. * It identifies the properties that the write operation will set as well as the 
  20. * properties that the API response will include. 
  21. * The part names that you can include in the parameter value are snippet and 
  22. * contentDetails. 
  23. * @param Google_Subscription $postBody 
  24. * @param array $optParams Optional parameters. 
  25. * @return Google_Service_YouTube_Subscription 
  26. */ 
  27. public function insert($part, Google_Service_YouTube_Subscription $postBody, $optParams = array()) 
  28. $params = array('part' => $part, 'postBody' => $postBody); 
  29. $params = array_merge($params, $optParams); 
  30. return $this->call('insert', array($params), "Google_Service_YouTube_Subscription"); 
  31.  
  32. /** 
  33. * Returns subscription resources that match the API request criteria. 
  34. * (subscriptions.listSubscriptions) 
  35. * @param string $part The part parameter specifies a comma-separated list of 
  36. * one or more subscription resource properties that the API response will 
  37. * include. The part names that you can include in the parameter value are id,  
  38. * snippet, and contentDetails. 
  39. * If the parameter identifies a property that contains child properties, the 
  40. * child properties will be included in the response. For example, in a 
  41. * subscription resource, the snippet property contains other properties, such 
  42. * as a display title for the subscription. If you set part=snippet, the API 
  43. * response will also contain all of those nested properties. 
  44. * @param array $optParams Optional parameters. 
  45. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  46. * exclusively for YouTube content partners. 
  47. * The onBehalfOfContentOwner parameter indicates that the request's 
  48. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  49. * of the content owner specified in the parameter value. This parameter is 
  50. * intended for YouTube content partners that own and manage many different 
  51. * YouTube channels. It allows content owners to authenticate once and get 
  52. * access to all their video and channel data, without having to provide 
  53. * authentication credentials for each individual channel. The CMS account that 
  54. * the user authenticates with must be linked to the specified YouTube content 
  55. * owner. 
  56. * @opt_param string onBehalfOfContentOwnerChannel This parameter can only be 
  57. * used in a properly authorized request. Note: This parameter is intended 
  58. * exclusively for YouTube content partners. 
  59. * The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID 
  60. * of the channel to which a video is being added. This parameter is required 
  61. * when a request specifies a value for the onBehalfOfContentOwner parameter,  
  62. * and it can only be used in conjunction with that parameter. In addition, the 
  63. * request must be authorized using a CMS account that is linked to the content 
  64. * owner that the onBehalfOfContentOwner parameter specifies. Finally, the 
  65. * channel that the onBehalfOfContentOwnerChannel parameter value specifies must 
  66. * be linked to the content owner that the onBehalfOfContentOwner parameter 
  67. * specifies. 
  68. * This parameter is intended for YouTube content partners that own and manage 
  69. * many different YouTube channels. It allows content owners to authenticate 
  70. * once and perform actions on behalf of the channel specified in the parameter 
  71. * value, without having to provide authentication credentials for each separate 
  72. * channel. 
  73. * @opt_param string channelId The channelId parameter specifies a YouTube 
  74. * channel ID. The API will only return that channel's subscriptions. 
  75. * @opt_param bool mine Set this parameter's value to true to retrieve a feed of 
  76. * the authenticated user's subscriptions. 
  77. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  78. * number of items that should be returned in the result set. 
  79. * @opt_param string forChannelId The forChannelId parameter specifies a comma- 
  80. * separated list of channel IDs. The API response will then only contain 
  81. * subscriptions matching those channels. 
  82. * @opt_param string pageToken The pageToken parameter identifies a specific 
  83. * page in the result set that should be returned. In an API response, the 
  84. * nextPageToken and prevPageToken properties identify other pages that could be 
  85. * retrieved. 
  86. * @opt_param bool mySubscribers Set this parameter's value to true to retrieve 
  87. * a feed of the subscribers of the authenticated user. 
  88. * @opt_param string order The order parameter specifies the method that will be 
  89. * used to sort resources in the API response. 
  90. * @opt_param string id The id parameter specifies a comma-separated list of the 
  91. * YouTube subscription ID(s) for the resource(s) that are being retrieved. In a 
  92. * subscription resource, the id property specifies the YouTube subscription ID. 
  93. * @return Google_Service_YouTube_SubscriptionListResponse 
  94. */ 
  95. public function listSubscriptions($part, $optParams = array()) 
  96. $params = array('part' => $part); 
  97. $params = array_merge($params, $optParams); 
  98. return $this->call('list', array($params), "Google_Service_YouTube_SubscriptionListResponse");