class Captions extends Resource (View source)

The "captions" collection of methods.

Typical usage is:

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

Methods

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

Deletes a resource. (captions.delete)

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

Downloads a caption track. (captions.download)

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

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

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

Retrieves a list of resources, possibly filtered. (captions.listCaptions)

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

Updates an existing resource. (captions.update)

Details

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

Deletes a resource. (captions.delete)

Parameters

string $id
array $optParams

Optional parameters.

Exceptions

Exception

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

Downloads a caption track. (captions.download)

Parameters

string $id

The ID of the caption track to download, required for One Platform.

array $optParams

Optional parameters.

Exceptions

Exception

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

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

Parameters

string|array $part

The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet.

Caption $postBody
array $optParams

Optional parameters.

Return Value

Caption

Exceptions

Exception

CaptionListResponse listCaptions(string|array $part, string $videoId, array $optParams = [])

Retrieves a list of resources, possibly filtered. (captions.listCaptions)

Parameters

string|array $part

The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet.

string $videoId

Returns the captions for the specified video.

array $optParams

Optional parameters.

Return Value

CaptionListResponse

Exceptions

Exception

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

Updates an existing resource. (captions.update)

Parameters

string|array $part

The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet.

Caption $postBody
array $optParams

Optional parameters.

Return Value

Caption

Exceptions

Exception