ThumbnailsApi
extends AbstractApi
in package
This file is generated from spec/discovery.json (YouTube Data API v3, revision 20260924) by tools/generate.php. Do not edit it by hand - run `composer spec:build` instead.
Setting a video's custom thumbnail.
Reach it as $youtube->thumbnails. Every method takes the parameters Google
documents, by the same names: use named arguments for the optional ones.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- set() : PromiseInterface<string|int, ThumbnailSetResponse>
- As this is not an insert in a strict sense (it supports uploading/setting of a thumbnail for multiple videos, which doesn't result in creation of a single resource), I use a custom verb here.
- call() : PromiseInterface<string|int, mixed>
- streamed() : PromiseInterface<string|int, ResponseStream>
- Opens a server-streamed call and reads its body as it arrives.
Properties
$youtube read-only
protected
YouTube
$youtube
Methods
__construct()
public
__construct(YouTube $youtube) : mixed
Parameters
- $youtube : YouTube
set()
As this is not an insert in a strict sense (it supports uploading/setting of a thumbnail for multiple videos, which doesn't result in creation of a single resource), I use a custom verb here.
public
set(string $videoId[, Media|null $media = null ][, string|null $onBehalfOfContentOwner = null ]) : PromiseInterface<string|int, ThumbnailSetResponse>
Costs 50 units of quota.
Parameters
- $videoId : string
-
Returns the Thumbnail with the given video IDs for Stubby or Apiary.
- $media : Media|null = null
-
The file to upload: image/jpeg, image/png, application/octet-stream, up to 50 MB. Sent in the same request as the metadata.
- $onBehalfOfContentOwner : string|null = null
-
Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.
Tags
Return values
PromiseInterface<string|int, ThumbnailSetResponse>call()
protected
call(string $endpoint, string $method, string $path[, array<string, mixed> $query = [] ][, array<string, mixed>|JsonSerializable|null $body = null ][, string|null $returns = null ][, ?Media $media = null ][, ?string $uploadPath = null ][, bool $download = false ]) : PromiseInterface<string|int, mixed>
Parameters
- $endpoint : string
-
The API method, e.g.
liveChatMessages.list. - $method : string
- $path : string
- $query : array<string, mixed> = []
- $body : array<string, mixed>|JsonSerializable|null = null
- $returns : string|null = null
-
The type token the result hydrates as; null leaves it raw.
- $media : ?Media = null
- $uploadPath : ?string = null
- $download : bool = false
Return values
PromiseInterface<string|int, mixed>streamed()
Opens a server-streamed call and reads its body as it arrives.
protected
streamed(string $endpoint, string $path, array<string, mixed> $query, string $returns) : PromiseInterface<string|int, ResponseStream>
Parameters
- $endpoint : string
- $path : string
- $query : array<string, mixed>
- $returns : string
-
The type token each element hydrates as.