Skip to main content

Documentation

OAuth.OAuthChannels

Constructors

constructor

new OAuthChannels(oauth)

Parameters

NameType
oauthOAuth

Defined in

oauth/channels.ts:10

Properties

oauth

oauth: OAuth

Defined in

oauth/channels.ts:10

Methods

addChannelSection

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

Adds a ChannelSection to the authorized user's Channel.
Last tested 05/24/2020 10:11. PASSING

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:165


deleteChannelSection

deleteChannelSection(id): Promise<ChannelSection>

Deletes a ChannelSection. Last tested 05/24/2020 10:11. PASSING

Parameters

NameTypeDescription
idstringThe ID of the channel section.

Returns

Promise<ChannelSection>

Defined in

oauth/channels.ts:257


setChannelMadeForKids

setChannelMadeForKids(channelResolvable, madeForKids): Promise<Channel>

Sets a channel as made for kids or not made for kids.
Last tested 05/20/2020 02:58. PASSING

Parameters

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

Returns

Promise<Channel>

Defined in

oauth/channels.ts:71


setChannelWatermark

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

Sets a channel's watermark.
Last tested 05/19/2020 18:07. PASSING

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:99


subscribeToChannel

subscribeToChannel(channelResolvable): Promise<Subscription>

Subscribe to a Channel.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to subscribe to.

Returns

Promise<Subscription>

A partial subscription object.

Defined in

oauth/channels.ts:271


unsetChannelWatermark

unsetChannelWatermark(channelResolvable): Promise<void>

Unsets a channel's watermark.
Last tested 05/18/2020 18:23. PASSING

Parameters

NameTypeDescription
channelResolvableChannelResolvableThe channel to unset the watermark from.

Returns

Promise<void>

Defined in

oauth/channels.ts:128


unsubscribeFromChannel

unsubscribeFromChannel(subscriptionId): Promise<void>

Unsubscribe from a Channel.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameType
subscriptionIdstring

Returns

Promise<void>

Defined in

oauth/channels.ts:292


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.
Last tested NEVER

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.
Last tested 05/20/2020 02:58. PASSING

Parameters

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

Returns

Promise<Channel>

Defined in

oauth/channels.ts:46


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.
Last tested 05/24/2020 10:11. PASSING

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:221


uploadChannelBanner

uploadChannelBanner(image): Promise<string>

Uploads a channel banner.
Last tested 05/20/2020 03:17. PASSING

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:146