YouTubePHP Documentation

AbstractApi
in package

AbstractYes

What every generated resource API extends: one call, sent through the client and hydrated into the part the method returns.

Tags
since
1.0.0
author

Valithor Obsidion valithor@valgorithms.com

Table of Contents

Properties

$youtube  : YouTube

Methods

__construct()  : mixed
call()  : PromiseInterface<string|int, mixed>
streamed()  : PromiseInterface<string|int, ResponseStream>
Opens a server-streamed call and reads its body as it arrives.

Properties

Methods

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.

Return values
PromiseInterface<string|int, ResponseStream>
On this page

Search results