import { ChannelParts, ChannelSectionParts, PlaylistParts, SubscriptionParts } from '../types/Parts'; import { YouTube, Playlist, Channel, ChannelSectionType, PageOptions, PaginatedResponse, Subscription } from '..'; import { youtube_v3 } from '@googleapis/youtube'; /** * A YouTube [Channel](./Channel#) section. */ export declare class ChannelSection { /** * The name of the endpoint used for this entity. */ static endpoint: string; /** * The parts to request for this entity. */ static part: string; /** * The fields to request for this entity. */ static fields: string; /** * The YouTube object that created this channel section object. */ youtube: YouTube; /** * Whether or not this a full channel section object. */ full: boolean; /** * The raw data of this channel section. */ data: any; /** * The name of this channel section. */ name: string; /** * The type of this channel section. */ type: Lowercase; /** * The ID of the channel that created this channel section. */ channelId: string; /** * The zero-based position of this channel section on the channel page. */ position: number; /** * The IDs of the playlists in this channel section. Undefined if there aren't any. */ playlistIds?: string[]; /** * The IDs of the channels in this channel section. Undefined if there aren't any. */ channelIds?: string[]; /** * The playlists in the channel section. Only available after calling [ChannelSection.fetchPlaylists](./ChannelSection#fetchplaylists). */ playlists?: Playlist[]; /** * The channels in the channel section. Only available after calling [ChannelSection.fetchChannels](./ChannelSection#fetchchannels). */ channels?: Channel[]; /** * The subscriptions in the channel section. * Only valid if `ChannelSection.type` is `subscriptions`. * Only available after calling [ChannelSection.fetchChannels()](./ChannelSection#fetchchannels). */ subscriptions?: PaginatedResponse; /** * The ID of this channel section. */ id: string; constructor(youtube: YouTube, data: youtube_v3.Schema$ChannelSection, full?: boolean); /** * @ignore */ private _init; /** * Fetches this channel section from the API and reassigns this object to the new channel section object. * Only useful if `this.full` is false, or if you want updated channel section info. */ fetch(parts?: ChannelSectionParts): Promise; /** * Fetches the channel section's playlists from the API and assigns them to the [ChannelSection.playlists](./ChannelSection#playlists) property. */ fetchPlaylists(pageOptions?: PageOptions, parts?: PlaylistParts): Promise; /** * Fetches the channel section's channels from the API and assigns them to the [ChannelSection.channels](./ChannelSection#channels) property. */ fetchChannels(parts?: ChannelParts): Promise; fetchSubscriptions(pageOptions?: PageOptions, parts?: SubscriptionParts): Promise>; }