Documentation
OAuth.OAuthChannels
Constructors
constructor
• new OAuthChannels(oauth)
Parameters
| Name | Type |
|---|---|
oauth | OAuth |
Defined in
Properties
oauth
• oauth: OAuth
Defined in
Methods
addChannelSection
▸ addChannelSection(type, name?, position?, playlistsResolvable?, channelsResolvable?): Promise\<ChannelSection>
Adds a ChannelSection to the authorized user's Channel.
Parameters
| Name | Type | Description |
|---|---|---|
type | ChannelSectionType | The type of channel section. |
name? | string | The name of the channel section. |
position? | number | The 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
deleteChannelSection
▸ deleteChannelSection(id): Promise\<ChannelSection>
Deletes a ChannelSection.
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The ID of the channel section. |
Returns
Promise\<ChannelSection>
Defined in
setChannelMadeForKids
▸ setChannelMadeForKids(channelResolvable, madeForKids): Promise\<Channel>
Sets a channel as made for kids or not made for kids.
Parameters
| Name | Type | Description |
|---|---|---|
channelResolvable | ChannelResolvable | The channel to update. |
madeForKids | boolean | Whether or not the channel is made for kids. |
Returns
Promise\<Channel>
Defined in
setChannelWatermark
▸ setChannelWatermark(channelResolvable, type, offset, duration, image): Promise\<void>
Sets a channel's watermark.
Parameters
| Name | Type | Description |
|---|---|---|
channelResolvable | ChannelResolvable | The channel to set the watermark for. |
type | "fromStart" | "fromEnd" | The timing type of the watermark. |
offset | number | The offset, in milliseconds, from the start/end of the video to display the watermark from. |
duration | number | The duration, in millseconds, to display the watermark for. |
image | Image | The watermark image. |
Returns
Promise\<void>
Defined in
subscribeToChannel
▸ subscribeToChannel(channelResolvable): Promise\<Subscription>
Subscribe to a Channel.
Parameters
| Name | Type | Description |
|---|---|---|
channelResolvable | ChannelResolvable | The channel to subscribe to. |
Returns
Promise\<Subscription>
A partial subscription object.
Defined in
unsetChannelWatermark
▸ unsetChannelWatermark(channelResolvable): Promise\<void>
Unsets a channel's watermark.
Parameters
| Name | Type | Description |
|---|---|---|
channelResolvable | ChannelResolvable | The channel to unset the watermark from. |
Returns
Promise\<void>
Defined in
unsubscribeFromChannel
▸ unsubscribeFromChannel(subscriptionId): Promise\<void>
Unsubscribe from a Channel.
Parameters
| Name | Type |
|---|---|
subscriptionId | string |
Returns
Promise\<void>
Defined in
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
| Name | Type | Description |
|---|---|---|
channelResolvable | ChannelResolvable | The channel to update the branding settings of. |
brandingSettings | ChannelBrandingSettings | The new branding settings. |
Returns
Promise\<Channel>
Defined in
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
| Name | Type | Description |
|---|---|---|
channelResolvable | ChannelResolvable | The channel to update the localizations of. |
localizations | Object | The new localizations. |
Returns
Promise\<Channel>
Defined in
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
| Name | Type | Description |
|---|---|---|
id | string | The ID of the channel section. |
type | ChannelSectionType | The type of channel section. |
name? | string | The name of the channel section. |
position? | number | The 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
uploadChannelBanner
▸ uploadChannelBanner(image): Promise\<string>
Uploads a channel banner.
Parameters
| Name | Type | Description |
|---|---|---|
image | Image | The channel banner to upload. |
Returns
Promise\<string>
The URL of the uploaded banner, used as
BrandingSettings.image.bannerExternalUrl
in OAuth.updateChannelBranding()