Documentation
OAuth.OAuth
All methods requiring an OAuth access token.
Use YouTube.oauth
to access these methods.
Constructors
constructor
• new OAuth(youtube
)
Parameters
Name | Type | Description |
---|---|---|
youtube | YouTube | The YouTube object to retrieve the token from. |
Defined in
Properties
captions
• captions: OAuthCaptions
All OAuth methods related to captions.
Defined in
channels
• channels: OAuthChannels
All OAuth methods related to channels.
Defined in
comments
• comments: OAuthComments
All OAuth methods related to comments.
Defined in
playlists
• playlists: OAuthPlaylists
All OAuth methods related to playlists/playlist items.
Defined in
videos
• videos: OAuthVideos
All OAuth methods related to videos/video ratings.
Defined in
youtube
• youtube: YouTube
Defined in
Methods
getMe
▸ getMe(parts?
): Promise
<Channel
>
Gets the authorized user's Channel.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type |
---|---|
parts? | ChannelParts |
Returns
Promise
<Channel
>
Defined in
getMyChannelSections
▸ getMyChannelSections(parts?
): Promise
<ChannelSection
[]>
Gets the authorized user's ChannelSections.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type |
---|---|
parts? | ChannelSectionParts |
Returns
Promise
<ChannelSection
[]>
Defined in
getMyPlaylists
▸ getMyPlaylists(pageOptions?
, parts?
): Promise
<PaginatedResponse
<Playlist
>>
Gets the authorized user's Playlists.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
pageOptions? | PageOptions | The 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
getMySubscriptions
▸ getMySubscriptions(pageOptions?
, parts?
): Promise
<PaginatedResponse
<Subscription
>>
Gets the authorized user's Subscriptions.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
pageOptions? | PageOptions | The 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
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
Name | Type | Description |
---|---|---|
pageOptions? | PageOptions | The 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? | PlaylistItemParts | The parts of the videos to fetch. |
Returns
Promise
<PaginatedResponse
<Video
>>