import { ChannelParts, SubscriptionParts } from '../types/Parts'; import { Thumbnail } from '../types'; import YouTube from '..'; import { youtube_v3 } from '@googleapis/youtube'; /** * A YouTube subscription. */ export declare class Subscription { /** * 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 subscription object. */ youtube: YouTube; /** * Whether or not this is a full subscription object. */ full: boolean; /** * The raw data of this subscription. */ data: any; /** * The ID of this subscription. */ id: string; /** * The date that the user subscribed to the channel on. */ dateSubscribed: Date; /** * Information on the [Channel](./Channel#) that the user subscribed to. */ channel: { /** * The ID of the channel. */ id: string; /** * The name of the channel. */ name: string; }; /** * The title of the subscription. */ title: string; /** * The details of the subscription. */ description: string; /** * Information on the user that subscribed to the channel. * **CURRENTLY NOT WORKING**, see https://issuetracker.google.com/issues/181152600 */ subscriber: { /** * The user's ID. */ id: string; /** * The user's username. */ name?: string; /** * The user's description. */ description?: string; /** * Thumbnail images for the user's channel. */ thumbnails?: { default?: Thumbnail; medium?: Thumbnail; high?: Thumbnail; }; }; /** * Thumbnail images for the subscription. */ thumbnails: { default?: Thumbnail; medium?: Thumbnail; high?: Thumbnail; }; /** * Statistics on the items that the subscription points to. * **CURRENTLY NOT WORKING**, see https://issuetracker.google.com/issues/181152600 */ items: { /** * The number of new items in the subscription. */ new: number; /** * The total number of items that the subscription points to. */ total: number; }; /** * The activities that the user has subscribed to. * **CURRENTLY NOT WORKING**, see https://issuetracker.google.com/issues/181152600 */ activities: 'all' | 'uploads'; constructor(youtube: YouTube, data: youtube_v3.Schema$Subscription, full?: boolean); /** * @ignore */ private _init; /** * Fetches this subscription from the API and reassigns this object to the new subscription object. * Only useful if `this.full` is false, or if you want updated subscription info. * **CURRENTLY NOT WORKING** unless the subscriber and channel properties are populated, * see https://issuetracker.google.com/issues/288609601 */ fetch(parts?: SubscriptionParts): Promise; getChannel(parts?: ChannelParts): Promise; getSubscriber(parts?: ChannelParts): Promise; }