Skip to main content

Documentation

OAuth.OAuthChannels

Constructors

constructor

new OAuthChannels(oauth)

Parameters

NameType
oauthOAuth

Defined in

oauth/channels.ts:11

Properties

oauth

oauth: OAuth

Defined in

oauth/channels.ts:11

Methods

addChannelSection

addChannelSection(type, name?, position?, playlistsResolvable?, channelsResolvable?): Promise\<ChannelSection>

Adds a ChannelSection to the authorized user's Channel.

Parameters

NameTypeDescription
typeChannelSectionTypeThe type of channel section.
name?stringThe name of the channel section.
position?numberThe position of the channel section on the channel homepage.
playlistsResolvable?PlaylistResolvable[]Any playlists in the channel section.
channelsResolvable?ChannelResolvable[]Any channels in the channel section.

Returns

Promise\<ChannelSection>

Defined in

oauth/channels.ts:159


deleteChannelSection

deleteChannelSection(id): Promise\<ChannelSection>

Deletes a ChannelSection.

Parameters

NameTypeDescription
idstringThe ID of the channel section.

Returns

Promise\<ChannelSection>

Defined in

oauth/channels.ts:249


setChannelMadeForKids

setChannelMadeForKids(channelResolvable, madeForKids): Promise\<Channel>

Sets a channel as made for kids or not made for kids.

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to update.
madeForKidsbooleanWhether or not the channel is made for kids.

Returns

Promise\<Channel>

Defined in

oauth/channels.ts:69


setChannelWatermark

setChannelWatermark(channelResolvable, type, offset, duration, image): Promise\<void>

Sets a channel's watermark.

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to set the watermark for.
type"fromStart" | "fromEnd"The timing type of the watermark.
offsetnumberThe offset, in milliseconds, from the start/end of the video to display the watermark from.
durationnumberThe duration, in millseconds, to display the watermark for.
imageImageThe watermark image.

Returns

Promise\<void>

Defined in

oauth/channels.ts:96


subscribeToChannel

subscribeToChannel(channelResolvable): Promise\<Subscription>

Subscribe to a Channel.

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to subscribe to.

Returns

Promise\<Subscription>

A partial subscription object.

Defined in

oauth/channels.ts:262


unsetChannelWatermark

unsetChannelWatermark(channelResolvable): Promise\<void>

Unsets a channel's watermark.

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to unset the watermark from.

Returns

Promise\<void>

Defined in

oauth/channels.ts:124


unsubscribeFromChannel

unsubscribeFromChannel(subscriptionId): Promise\<void>

Unsubscribe from a Channel.

Parameters

NameType
subscriptionIdstring

Returns

Promise\<void>

Defined in

oauth/channels.ts:282


updateChannelBranding

updateChannelBranding(channelResolvable, brandingSettings): Promise\<Channel>

Updates a channel's branding settings. If your request does not specify a value for a property that already has a value, the property's existing value will be deleted.

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to update the branding settings of.
brandingSettingsChannelBrandingSettingsThe new branding settings.

Returns

Promise\<Channel>

Defined in

oauth/channels.ts:20


updateChannelLocalizations

updateChannelLocalizations(channelResolvable, localizations): Promise\<Channel>

Updates a channel's localizations. CURRENTLY BROKEN in the API If your request does not specify a value for a property that already has a value, the property's existing value will be deleted.

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to update the localizations of.
localizationsObjectThe new localizations.

Returns

Promise\<Channel>

Defined in

oauth/channels.ts:45


updateChannelSection

updateChannelSection(id, type, name?, position?, playlistsResolvable?, channelsResolvable?): Promise\<ChannelSection>

Updates a ChannelSection. If your request does not specify a value for a property that already has a value, the property's existing value will be deleted.

Parameters

NameTypeDescription
idstringThe ID of the channel section.
typeChannelSectionTypeThe type of channel section.
name?stringThe name of the channel section.
position?numberThe position of the channel section on the channel homepage.
playlistsResolvable?PlaylistResolvable[]Any playlists in the channel section.
channelsResolvable?ChannelResolvable[]Any channels in the channel section.

Returns

Promise\<ChannelSection>

Defined in

oauth/channels.ts:214


uploadChannelBanner

uploadChannelBanner(image): Promise\<string>

Uploads a channel banner.

Parameters

NameTypeDescription
imageImageThe channel banner to upload.

Returns

Promise\<string>

The URL of the uploaded banner, used as BrandingSettings.image.bannerExternalUrl in OAuth.updateChannelBranding()

Defined in

oauth/channels.ts:141