Google_Service_YouTube_PlaylistItems_Resource

The "playlistItems" 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_PlaylistItems_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Deletes a playlist item. (playlistItems.delete) 
  5. * @param string $id The id parameter specifies the YouTube playlist item ID for 
  6. * the playlist item that is being deleted. In a playlistItem resource, the id 
  7. * property specifies the playlist item's 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 resource to a playlist. (playlistItems.insert) 
  17. * @param string $part The part parameter serves two purposes in this operation. 
  18. * It identifies the properties that the write operation will set as well as the 
  19. * properties that the API response will include. 
  20. * The part names that you can include in the parameter value are snippet,  
  21. * contentDetails, and status. 
  22. * @param Google_PlaylistItem $postBody 
  23. * @param array $optParams Optional parameters. 
  24. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  25. * exclusively for YouTube content partners. 
  26. * The onBehalfOfContentOwner parameter indicates that the request's 
  27. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  28. * of the content owner specified in the parameter value. This parameter is 
  29. * intended for YouTube content partners that own and manage many different 
  30. * YouTube channels. It allows content owners to authenticate once and get 
  31. * access to all their video and channel data, without having to provide 
  32. * authentication credentials for each individual channel. The CMS account that 
  33. * the user authenticates with must be linked to the specified YouTube content 
  34. * owner. 
  35. * @return Google_Service_YouTube_PlaylistItem 
  36. */ 
  37. public function insert($part, Google_Service_YouTube_PlaylistItem $postBody, $optParams = array()) 
  38. $params = array('part' => $part, 'postBody' => $postBody); 
  39. $params = array_merge($params, $optParams); 
  40. return $this->call('insert', array($params), "Google_Service_YouTube_PlaylistItem"); 
  41.  
  42. /** 
  43. * Returns a collection of playlist items that match the API request parameters. 
  44. * You can retrieve all of the playlist items in a specified playlist or 
  45. * retrieve one or more playlist items by their unique IDs. 
  46. * (playlistItems.listPlaylistItems) 
  47. * @param string $part The part parameter specifies a comma-separated list of 
  48. * one or more playlistItem resource properties that the API response will 
  49. * include. The part names that you can include in the parameter value are id,  
  50. * snippet, contentDetails, and status. 
  51. * If the parameter identifies a property that contains child properties, the 
  52. * child properties will be included in the response. For example, in a 
  53. * playlistItem resource, the snippet property contains numerous fields,  
  54. * including the title, description, position, and resourceId properties. As 
  55. * such, if you set part=snippet, the API response will contain all of those 
  56. * properties. 
  57. * @param array $optParams Optional parameters. 
  58. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  59. * exclusively for YouTube content partners. 
  60. * The onBehalfOfContentOwner parameter indicates that the request's 
  61. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  62. * of the content owner specified in the parameter value. This parameter is 
  63. * intended for YouTube content partners that own and manage many different 
  64. * YouTube channels. It allows content owners to authenticate once and get 
  65. * access to all their video and channel data, without having to provide 
  66. * authentication credentials for each individual channel. The CMS account that 
  67. * the user authenticates with must be linked to the specified YouTube content 
  68. * owner. 
  69. * @opt_param string playlistId The playlistId parameter specifies the unique ID 
  70. * of the playlist for which you want to retrieve playlist items. Note that even 
  71. * though this is an optional parameter, every request to retrieve playlist 
  72. * items must specify a value for either the id parameter or the playlistId 
  73. * parameter. 
  74. * @opt_param string videoId The videoId parameter specifies that the request 
  75. * should return only the playlist items that contain the specified video. 
  76. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  77. * number of items that should be returned in the result set. 
  78. * @opt_param string pageToken The pageToken parameter identifies a specific 
  79. * page in the result set that should be returned. In an API response, the 
  80. * nextPageToken and prevPageToken properties identify other pages that could be 
  81. * retrieved. 
  82. * @opt_param string id The id parameter specifies a comma-separated list of one 
  83. * or more unique playlist item IDs. 
  84. * @return Google_Service_YouTube_PlaylistItemListResponse 
  85. */ 
  86. public function listPlaylistItems($part, $optParams = array()) 
  87. $params = array('part' => $part); 
  88. $params = array_merge($params, $optParams); 
  89. return $this->call('list', array($params), "Google_Service_YouTube_PlaylistItemListResponse"); 
  90.  
  91. /** 
  92. * Modifies a playlist item. For example, you could update the item's position 
  93. * in the playlist. (playlistItems.update) 
  94. * @param string $part The part parameter serves two purposes in this operation. 
  95. * It identifies the properties that the write operation will set as well as the 
  96. * properties that the API response will include. 
  97. * The part names that you can include in the parameter value are snippet,  
  98. * contentDetails, and status. 
  99. * Note that this method will override the existing values for all of the 
  100. * mutable properties that are contained in any parts that the parameter value 
  101. * specifies. For example, a playlist item can specify a start time and end 
  102. * time, which identify the times portion of the video that should play when 
  103. * users watch the video in the playlist. If your request is updating a playlist 
  104. * item that sets these values, and the request's part parameter value includes 
  105. * the contentDetails part, the playlist item's start and end times will be 
  106. * updated to whatever value the request body specifies. If the request body 
  107. * does not specify values, the existing start and end times will be removed and 
  108. * replaced with the default settings. 
  109. * @param Google_PlaylistItem $postBody 
  110. * @param array $optParams Optional parameters. 
  111. * @return Google_Service_YouTube_PlaylistItem 
  112. */ 
  113. public function update($part, Google_Service_YouTube_PlaylistItem $postBody, $optParams = array()) 
  114. $params = array('part' => $part, 'postBody' => $postBody); 
  115. $params = array_merge($params, $optParams); 
  116. return $this->call('update', array($params), "Google_Service_YouTube_PlaylistItem");