VideoCategoriesApi
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.
The categories a video can be filed under.
Reach it as $youtube->videoCategories. 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
- list() : PromiseInterface<string|int, VideoCategoryListResponse>
- Retrieves a list of resources, possibly filtered.
- 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
list()
Retrieves a list of resources, possibly filtered.
public
list(array<int, string>|string $part[, string|null $hl = null ][, array<int, string>|string|null $id = null ][, string|null $regionCode = null ]) : PromiseInterface<string|int, VideoCategoryListResponse>
Costs 1 unit of quota.
Parameters
- $part : array<int, string>|string
-
The part parameter specifies the videoCategory resource properties that the API response will include. Set the parameter value to snippet.
- $hl : string|null = null
-
YouTube assumes
en-USwhen it is left out. - $id : array<int, string>|string|null = null
-
Returns the video categories with the given IDs for Stubby or Apiary.
- $regionCode : string|null = null
Tags
Return values
PromiseInterface<string|int, VideoCategoryListResponse>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.