class Playlists extends Resource (View source)

The "playlists" collection of methods.

Typical usage is:

 $youtubeService = new Google\Service\YouTube(...);
 $playlists = $youtubeService->playlists;

Methods

delete(string $id, array $optParams = [])

Deletes a resource. (playlists.delete)

insert(string|array $part, Playlist $postBody, array $optParams = [])

Inserts a new resource into this collection. (playlists.insert)

listPlaylists(string|array $part, array $optParams = [])

Retrieves a list of resources, possibly filtered. (playlists.listPlaylists)

update(string|array $part, Playlist $postBody, array $optParams = [])

Updates an existing resource. (playlists.update)

Details

delete(string $id, array $optParams = [])

Deletes a resource. (playlists.delete)

Parameters

string $id
array $optParams

Optional parameters.

Exceptions

Exception

Playlist insert(string|array $part, Playlist $postBody, array $optParams = [])

Inserts a new resource into this collection. (playlists.insert)

Parameters

string|array $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.

Playlist $postBody
array $optParams

Optional parameters.

Return Value

Playlist

Exceptions

Exception

PlaylistListResponse listPlaylists(string|array $part, array $optParams = [])

Retrieves a list of resources, possibly filtered. (playlists.listPlaylists)

Parameters

string|array $part

The part parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include. 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.

array $optParams

Optional parameters.

Return Value

PlaylistListResponse

Exceptions

Exception

Playlist update(string|array $part, Playlist $postBody, array $optParams = [])

Updates an existing resource. (playlists.update)

Parameters

string|array $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. Note that this method will override the existing values for mutable properties that are contained in any parts that the request body specifies. For example, a playlist's description is contained in the snippet part, which must be included in the request body. If the request does not specify a value for the snippet.description property, the playlist's existing description will be deleted.

Playlist $postBody
array $optParams

Optional parameters.

Return Value

Playlist

Exceptions

Exception