class PlaylistItems extends Resource (View source)

The "playlistItems" collection of methods.

Typical usage is:

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

Methods

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

Deletes a resource. (playlistItems.delete)

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

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

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

Retrieves a list of resources, possibly filtered.

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

Updates an existing resource. (playlistItems.update)

Details

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

Deletes a resource. (playlistItems.delete)

Parameters

string $id
array $optParams

Optional parameters.

Exceptions

Exception

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

Inserts a new resource into this collection. (playlistItems.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.

PlaylistItem $postBody
array $optParams

Optional parameters.

Return Value

PlaylistItem

Exceptions

Exception

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

Retrieves a list of resources, possibly filtered.

(playlistItems.listPlaylistItems)

Parameters

string|array $part

The part parameter specifies a comma-separated list of one or more playlistItem 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 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.

array $optParams

Optional parameters.

Return Value

PlaylistItemListResponse

Exceptions

Exception

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

Updates an existing resource. (playlistItems.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 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.

PlaylistItem $postBody
array $optParams

Optional parameters.

Return Value

PlaylistItem

Exceptions

Exception