YouTubePHP Documentation

ThirdPartyLinksApi extends AbstractApi
in package

FinalYes

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.

Links between a channel and third-party services.

Reach it as $youtube->thirdPartyLinks. Every method takes the parameters Google documents, by the same names: use named arguments for the optional ones.

Tags
since
1.0.0

Table of Contents

Properties

$youtube  : YouTube

Methods

__construct()  : mixed
delete()  : PromiseInterface<string|int, null>
Deletes a resource.
insert()  : PromiseInterface<string|int, ThirdPartyLink>
Inserts a new resource into this collection.
list()  : PromiseInterface<string|int, ThirdPartyLinkListResponse>
Retrieves a list of resources, possibly filtered.
update()  : PromiseInterface<string|int, ThirdPartyLink>
Updates an existing resource.
call()  : PromiseInterface<string|int, mixed>
streamed()  : PromiseInterface<string|int, ResponseStream>
Opens a server-streamed call and reads its body as it arrives.

Properties

Methods

delete()

Deletes a resource.

public delete(string $linkingToken, string $type[, string|null $externalChannelId = null ][, array<int, string>|string|null $part = null ]) : PromiseInterface<string|int, null>

Costs 50 units of quota, by estimate: Google does not publish it, so it is counted as a write.

Parameters
$linkingToken : string

Delete the partner links with the given linking token.

$type : string

Type of the link to be deleted. One of linkUnspecified, channelToStoreLink, channelToAffiliateProgramLink.

$externalChannelId : string|null = null

Channel ID to which changes should be applied, for delegation.

$part : array<int, string>|string|null = null

Do not use. Required for compatibility.

Tags
since
1.0.0
Return values
PromiseInterface<string|int, null>

insert()

Inserts a new resource into this collection.

public insert(array<int, string>|string $part, ThirdPartyLink|array<string, mixed> $body[, string|null $externalChannelId = null ]) : PromiseInterface<string|int, ThirdPartyLink>

Costs 50 units of quota, by estimate: Google does not publish it, so it is counted as a write.

Parameters
$part : array<int, string>|string

The part parameter specifies the thirdPartyLink resource parts that the API request and response will include. Supported values are linkingToken, status, and snippet.

$body : ThirdPartyLink|array<string, mixed>

The ThirdPartyLink to send.

$externalChannelId : string|null = null

Channel ID to which changes should be applied, for delegation.

Tags
since
1.0.0
Return values
PromiseInterface<string|int, ThirdPartyLink>

list()

Retrieves a list of resources, possibly filtered.

public list(array<int, string>|string $part[, string|null $externalChannelId = null ][, string|null $linkingToken = null ][, string|null $type = null ]) : PromiseInterface<string|int, ThirdPartyLinkListResponse>

Costs 1 unit of quota, by estimate: Google does not publish it, so it is counted as a read.

Parameters
$part : array<int, string>|string

The part parameter specifies the thirdPartyLink resource parts that the API response will include. Supported values are linkingToken, status, and snippet.

$externalChannelId : string|null = null

Channel ID to which changes should be applied, for delegation.

$linkingToken : string|null = null

Get a third party link with the given linking token.

$type : string|null = null

Get a third party link of the given type. One of linkUnspecified, channelToStoreLink, channelToAffiliateProgramLink.

Tags
since
1.0.0
Return values
PromiseInterface<string|int, ThirdPartyLinkListResponse>

update()

Updates an existing resource.

public update(array<int, string>|string $part, ThirdPartyLink|array<string, mixed> $body[, string|null $externalChannelId = null ]) : PromiseInterface<string|int, ThirdPartyLink>

Costs 50 units of quota, by estimate: Google does not publish it, so it is counted as a write.

Parameters
$part : array<int, string>|string

The part parameter specifies the thirdPartyLink resource parts that the API request and response will include. Supported values are linkingToken, status, and snippet.

$body : ThirdPartyLink|array<string, mixed>

The ThirdPartyLink to send.

$externalChannelId : string|null = null

Channel ID to which changes should be applied, for delegation.

Tags
since
1.0.0
Return values
PromiseInterface<string|int, ThirdPartyLink>

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