Google_PlaylistsServiceResource

The "playlists" collection of methods.

Defined (1)

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

/src/contrib/Google_YouTubeService.php  
  1. class Google_PlaylistsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Deletes a playlist. (playlists.delete) 
  5. * @param string $id The id parameter specifies the YouTube playlist ID for the playlist that is being deleted. In a playlist resource, the id property specifies the playlist'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. * Creates a playlist. (playlists.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 status. 
  17. * @param Google_Playlist $postBody 
  18. * @param array $optParams Optional parameters. 
  19. * @return Google_Playlist 
  20. */ 
  21. public function insert($part, Google_Playlist $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_Playlist($data); 
  27. } else { 
  28. return $data; 
  29. /** 
  30. * Returns a collection of playlists that match the API request parameters. For example, you can 
  31. * retrieve all playlists that the authenticated user owns, or you can retrieve one or more 
  32. * playlists by their unique IDs. (playlists.list) 
  33. * @param string $part The part parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and status. 
  34. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlist resource, the snippet property contains properties like author, title, description, tags, and timeCreated. 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 channelId This value indicates that the API should only return the specified channel's playlists. 
  37. * @opt_param string id The id parameter specifies a comma-separated list of the YouTube playlist ID(s) for the resource(s) that are being retrieved. In a playlist resource, the id property specifies the playlist's YouTube playlist ID. 
  38. * @opt_param string maxResults USE_DESCRIPTION --- channels:list:maxResults 
  39. * @opt_param bool mine Set this parameter's value to true to instruct the API to only return playlists owned by the authenticated user. 
  40. * @opt_param string pageToken USE_DESCRIPTION --- channels:list:pageToken 
  41. * @return Google_PlaylistListResponse 
  42. */ 
  43. public function listPlaylists($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_PlaylistListResponse($data); 
  49. } else { 
  50. return $data; 
  51. /** 
  52. * Modifies a playlist. For example, you could change a playlist's title, description, or privacy 
  53. * status. (playlists.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 status. 
  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's privacy setting is contained in the status part. As such, if your request is updating a private playlist, and the request's part parameter value includes the status part, the playlist's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the playlist will revert to the default privacy setting. 
  57. * @param Google_Playlist $postBody 
  58. * @param array $optParams Optional parameters. 
  59. * @return Google_Playlist 
  60. */ 
  61. public function update($part, Google_Playlist $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_Playlist($data); 
  67. } else { 
  68. return $data;