Skip to main content

Documentation

OAuth.OAuth

All methods requiring an OAuth access token. Use YouTube.oauth to access these methods.

Constructors

constructor

new OAuth(youtube)

Parameters

NameTypeDescription
youtubeYouTubeThe YouTube object to retrieve the token from.

Defined in

oauth/index.ts:56

Properties

captions

captions: OAuthCaptions

All OAuth methods related to captions.

Defined in

oauth/index.ts:50


channels

channels: OAuthChannels

All OAuth methods related to channels.

Defined in

oauth/index.ts:45


comments

comments: OAuthComments

All OAuth methods related to comments.

Defined in

oauth/index.ts:29


playlists

playlists: OAuthPlaylists

All OAuth methods related to playlists/playlist items.

Defined in

oauth/index.ts:40


videos

videos: OAuthVideos

All OAuth methods related to videos/video ratings.

Defined in

oauth/index.ts:34


youtube

youtube: YouTube

Defined in

oauth/index.ts:24

Methods

getMe

getMe(parts?): Promise<Channel>

Gets the authorized user's Channel.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameType
parts?ChannelParts

Returns

Promise<Channel>

Defined in

oauth/index.ts:73


getMyChannelSections

getMyChannelSections(parts?): Promise<ChannelSection[]>

Gets the authorized user's ChannelSections.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameType
parts?ChannelSectionParts

Returns

Promise<ChannelSection[]>

Defined in

oauth/index.ts:137


getMyPlaylists

getMyPlaylists(pageOptions?, parts?): Promise<PaginatedResponse<Playlist>>

Gets the authorized user's Playlists.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
pageOptions?PageOptionsThe number of pages and maximum number of items per page. Fetches the maximum number of items allowed by the API per page by default. Set pages to a value <=0 to fetch Fetches the maximum allowed by the API by default. Set to a value <=0 to fetch all.
parts?PlaylistParts-

Returns

Promise<PaginatedResponse<Playlist>>

Defined in

oauth/index.ts:125


getMySubscriptions

getMySubscriptions(pageOptions?, parts?): Promise<PaginatedResponse<Subscription>>

Gets the authorized user's Subscriptions.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
pageOptions?PageOptionsThe number of pages and maximum number of items per page. Fetches the maximum number of items allowed by the API per page by default. Set pages to a value <=0 to fetch Fetches the maximum allowed by the API by default. Set to a value <=0 to fetch all.
parts?SubscriptionParts-

Returns

Promise<PaginatedResponse<Subscription>>

Defined in

oauth/index.ts:108


getMyUploads

getMyUploads(pageOptions?, parts?): Promise<PaginatedResponse<Video>>

Gets the authorized user's uploads.
These are partial Video objects, meaning they are missing some data. See the properties they include here. Use YouTube.getVideo(playlist.videos) to fetch the full objects while not spamming your quota like you would using a loop.
Last tested NEVER

Parameters

NameTypeDescription
pageOptions?PageOptionsThe number of pages and maximum number of items per page. Fetches the maximum number of items allowed by the API per page by default. Set pages to a value <=0 to fetch all.
parts?PlaylistItemPartsThe parts of the videos to fetch.

Returns

Promise<PaginatedResponse<Video>>

Defined in

oauth/index.ts:90