Google_PlaylistItemsServiceResource

The "playlistItems" collection of methods.

Defined (1)

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

/src/contrib/Google_YouTubeService.php  
  1. class Google_PlaylistItemsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Deletes a playlist item. (playlistItems.delete) 
  5. * @param string $id The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID. 
  6. * @param array $optParams Optional parameters. 
  7. */ 
  8. public function delete($id, $optParams = array()) { 
  9. $params = array('id' => $id); 
  10. $params = array_merge($params, $optParams); 
  11. $data = $this->__call('delete', array($params)); 
  12. return $data; 
  13. /** 
  14. * Adds a resource to a playlist. (playlistItems.insert) 
  15. * @param string $part The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. 
  16. The part names that you can include in the parameter value are snippet and contentDetails. 
  17. * @param Google_PlaylistItem $postBody 
  18. * @param array $optParams Optional parameters. 
  19. * @return Google_PlaylistItem 
  20. */ 
  21. public function insert($part, Google_PlaylistItem $postBody, $optParams = array()) { 
  22. $params = array('part' => $part, 'postBody' => $postBody); 
  23. $params = array_merge($params, $optParams); 
  24. $data = $this->__call('insert', array($params)); 
  25. if ($this->useObjects()) { 
  26. return new Google_PlaylistItem($data); 
  27. } else { 
  28. return $data; 
  29. /** 
  30. * Returns a collection of playlist items that match the API request parameters. You can retrieve 
  31. * all of the playlist items in a specified playlist or retrieve one or more playlist items by their 
  32. * unique IDs. (playlistItems.list) 
  33. * @param string $part The part parameter specifies a comma-separated list of one or more playlistItem resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. 
  34. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set part=snippet, the API response will contain all of those properties. 
  35. * @param array $optParams Optional parameters. 
  36. * @opt_param string id The id parameter specifies a comma-separated list of one or more unique playlist item IDs. 
  37. * @opt_param string maxResults USE_DESCRIPTION --- channels:list:maxResults 
  38. * @opt_param string pageToken USE_DESCRIPTION --- channels:list:pageToken 
  39. * @opt_param string playlistId The playlistId parameter specifies the unique ID of the playlist for which you want to retrieve playlist items. Note that even though this is an optional parameter, every request to retrieve playlist items must specify a value for either the id parameter or the playlistId parameter. 
  40. * @opt_param string videoId The videoId parameter specifies that the request should return only the playlist items that contain the specified video. 
  41. * @return Google_PlaylistItemListResponse 
  42. */ 
  43. public function listPlaylistItems($part, $optParams = array()) { 
  44. $params = array('part' => $part); 
  45. $params = array_merge($params, $optParams); 
  46. $data = $this->__call('list', array($params)); 
  47. if ($this->useObjects()) { 
  48. return new Google_PlaylistItemListResponse($data); 
  49. } else { 
  50. return $data; 
  51. /** 
  52. * Modifies a playlist item. For example, you could update the item's position in the playlist. 
  53. * (playlistItems.update) 
  54. * @param string $part The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. 
  55. The part names that you can include in the parameter value are snippet and contentDetails. 
  56. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist item can specify a start time and end time, which identify the times portion of the video that should play when users watch the video in the playlist. If your request is updating a playlist item that sets these values, and the request's part parameter value includes the contentDetails part, the playlist item's start and end times will be updated to whatever value the request body specifies. If the request body does not specify values, the existing start and end times will be removed and replaced with the default settings. 
  57. * @param Google_PlaylistItem $postBody 
  58. * @param array $optParams Optional parameters. 
  59. * @return Google_PlaylistItem 
  60. */ 
  61. public function update($part, Google_PlaylistItem $postBody, $optParams = array()) { 
  62. $params = array('part' => $part, 'postBody' => $postBody); 
  63. $params = array_merge($params, $optParams); 
  64. $data = $this->__call('update', array($params)); 
  65. if ($this->useObjects()) { 
  66. return new Google_PlaylistItem($data); 
  67. } else { 
  68. return $data;