/** * @module OAuth */ import { Request } from '../util'; import * as Part from '../types/Parts'; import YouTube, * as YT from '..'; import { OAuthVideos } from './videos'; import { OAuthPlaylists } from './playlists'; import { OAuthComments } from './comments'; import { OAuthChannels } from './channels'; import { OAuthCaptions } from './captions'; export * from './videos'; export * from './playlists'; export * from './comments'; export * from './channels'; export * from './captions'; /** * All methods requiring an OAuth access token. * Use [`YouTube.oauth`](../../Library-Exports/classes/YouTube#oauth) to access these methods. */ export declare class OAuth { youtube: YouTube; /** * All OAuth methods related to [comments](../../Library-Exports/classes/Comment). */ comments: OAuthComments; /** * All OAuth methods related to [videos](../../Library-Exports/classes/Video)/video ratings. */ videos: OAuthVideos; /** * All OAuth methods related to * [playlists](../../Library-Exports/classes/Playlist)/playlist items. */ playlists: OAuthPlaylists; /** * All OAuth methods related to [channels](../../Library-Exports/classes/Channel). */ channels: OAuthChannels; /** * All OAuth methods related to [captions](../../Library-Exports/classes/Caption). */ captions: OAuthCaptions; /** * * @param youtube The [YouTube](../../Library-Exports/classes/YouTube) object to retrieve the token from. */ constructor(youtube: YouTube, request: Request, upload: Request); /** * @ignore */ checkTokenAndThrow(): void; /** * Gets the authorized user's [Channel](../../Library-Exports/classes/Channel#). */ getMe(parts?: Part.ChannelParts): Promise; /** * Gets the authorized user's uploads. * These are **partial [Video](../../Library-Exports/classes/Video) objects**, * meaning they are missing some data. See the properties they include [here](https://developers.google.com/youtube/v3/docs/playlistItems#resource-representation). * Use [`YouTube.getVideo(playlist.videos)`](../../Library-Exports/classes/YouTube#getvideo) to * fetch the full objects while not spamming your quota like you would using a loop. * @param 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. * @param parts The parts of the videos to fetch. */ getMyUploads(pageOptions?: YT.PageOptions, parts?: Part.PlaylistItemParts): Promise>; /** * Gets the authorized user's [Subscription](../../Library-Exports/classes/Subscription#)s. * @param 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. */ getMySubscriptions(pageOptions?: YT.PageOptions, parts?: Part.SubscriptionParts): Promise>; /** * Gets the authorized user's [Playlist](../../Library-Exports/classes/Playlist#)s. * @param 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. */ getMyPlaylists(pageOptions?: YT.PageOptions, parts?: Part.PlaylistParts): Promise>; /** * Gets the authorized user's [ChannelSection](../../Library-Exports/classes/ChannelSection)s. */ getMyChannelSections(parts?: Part.ChannelSectionParts): Promise; } export default OAuth;