Skip to main content

Documentation

Classes

References

default

Renames and re-exports YouTube

Type Aliases

Authorization

Ƭ Authorization: Object

Type declaration

NameType
accessToken?string
apiKey?string

Defined in

types/Util.ts:44


Banners

Ƭ Banners: Object

Type declaration

NameType
bannerImageUrlstring
bannerMobileExtraHdImageUrlstring
bannerMobileHdImageUrlstring
bannerMobileImageUrlstring
bannerMobileLowImageUrlstring
bannerMobileMediumImageUrlstring
bannerTabletExtraHdImageUrlstring
bannerTabletHdImageUrlstring
bannerTabletImageUrlstring
bannerTabletLowImageUrlstring
bannerTvHighImageUrlstring
bannerTvImageUrlstring
bannerTvLowImageUrlstring
bannerTvMediumImageUrlstring

Defined in

types/Banners.ts:1


ChannelBrandingSettings

Ƭ ChannelBrandingSettings: Object

Type declaration

NameType
channel?{ country?: string ; defaultLanguage?: string ; defaultTab?: string ; description?: string ; featuredChannelsTitle?: string ; featuredChannelsUrls?: string[] ; keywords?: string ; moderateComments?: boolean ; profileColor?: string ; showBrowseView?: boolean ; showRelatedChannels?: boolean ; trackingAnalyticsAccountId?: string ; unsubscribedTrailer?: string }
channel.country?string
channel.defaultLanguage?string
channel.defaultTab?string
channel.description?string
channel.featuredChannelsTitle?string
channel.featuredChannelsUrls?string[]
channel.keywords?string
channel.moderateComments?boolean
channel.profileColor?string
channel.showBrowseView?boolean
channel.showRelatedChannels?boolean
channel.trackingAnalyticsAccountId?string
channel.unsubscribedTrailer?string
image?{ bannerExternalUrl?: string ; trackingImageUrl?: string ; watchIconImageUrl?: string }
image.bannerExternalUrl?string
image.trackingImageUrl?string
image.watchIconImageUrl?string

Defined in

types/BrandingSettings.ts:1


ChannelParts

Ƭ ChannelParts: ("auditDetails" | "brandingSettings" | "contentDetails" | "contentOwnerDetails" | "id" | "localizations" | "snippet" | "statistics" | "status" | "topicDetails")[]

Defined in

types/Parts.ts:17


ChannelResolvable

Ƭ ChannelResolvable: string | Channel

A URL, ID, search query, or object of a channel.

Defined in

types/Resolvable.ts:33


ChannelSearchOptions

Ƭ ChannelSearchOptions: Object

Type declaration

NameTypeDescription
channelType?"any" | "show"Filter by TV shows

Defined in

types/GetPaginatedItems.ts:128


ChannelSectionParts

Ƭ ChannelSectionParts: ("contentDetails" | "id" | "localizations" | "snippet" | "targeting")[]

Defined in

types/Parts.ts:36


ChannelSectionType

Ƭ ChannelSectionType: "allPlaylists" | "completedEvents" | "likedPlaylists" | "likes" | "liveEvents" | "multipleChannels" | "multiplePlaylists" | "popularUploads" | "postedPlaylists" | "postedVideos" | "recentActivity" | "recentPosts" | "recentUploads" | "singlePlaylist" | "subscriptions" | "upcomingEvents"

Defined in

types/ChannelSectionType.ts:1


CommentParts

Ƭ CommentParts: ("id" | "snippet")[]

Defined in

types/Parts.ts:32


CommentResolvable

Ƭ CommentResolvable: string | Comment

An ID or object of a comment.

Defined in

types/Resolvable.ts:43


CommentThreadParts

Ƭ CommentThreadParts: ("id" | "replies" | "snippet")[]

Defined in

types/Parts.ts:40


EntitySearchOptions

Ƭ EntitySearchOptions<T>: Object

Type parameters

NameType
Textends SearchType = SearchType

Type declaration

NameType
pageOptions?PageOptions
searchFilters?Omit<SearchFilters<T>, "types">

Defined in

types/GetPaginatedItems.ts:92


GenericSearchOptions

Ƭ GenericSearchOptions<T>: Object

Type parameters

NameType
Textends SearchType = SearchType

Type declaration

NameType
pageOptions?PageOptions
searchFilters?SearchFilters<T>

Defined in

types/GetPaginatedItems.ts:87


Image

Ƭ Image: Object

Type declaration

NameType
dataBuffer
type"jpeg" | "png"

Defined in

types/Util.ts:46


ItemReturns

Ƭ ItemReturns<T, K>: T extends any[] ? InstanceType<K>[] : InstanceType<K>

Type parameters

NameType
Textends any | any[]
Kextends ItemTypes

Defined in

types/GetItem.ts:7


ItemTypes

Ƭ ItemTypes: typeof GETTABLE_CLASSES[number]

Defined in

types/GetItem.ts:5


PageOptions

Ƭ PageOptions: Object

Type declaration

NameType
maxPerPage?number
pageToken?string
pages?number

Defined in

types/GetPaginatedItems.ts:63


PaginatedInstance

Ƭ PaginatedInstance: InstanceType<PaginatedType>

Defined in

types/GetPaginatedItems.ts:27


PaginatedResponse

Ƭ PaginatedResponse<T>: Object

Type parameters

NameType
Textends PaginatedInstance

Type declaration

NameType
itemsT[]
nextPageToken?string
prevPageToken?string

Defined in

types/GetPaginatedItems.ts:69


PaginatedType

Ƭ PaginatedType: typeof PAGINATED_CLASSES[number]

Defined in

types/GetPaginatedItems.ts:25


PlaylistItemParts

Ƭ PlaylistItemParts: ("contentDetails" | "id" | "snippet" | "status")[]

Defined in

types/Parts.ts:38


PlaylistParts

Ƭ PlaylistParts: ("contentDetails" | "id" | "localizations" | "player" | "snippet" | "status")[]

Defined in

types/Parts.ts:30


PlaylistResolvable

Ƭ PlaylistResolvable: string | Playlist

A URL, ID, search query, or object of a playlist.

Defined in

types/Resolvable.ts:28


PlaylistSearchOptions

Ƭ PlaylistSearchOptions: Object

Type declaration

NameType
channel?ChannelResolvable

Defined in

types/GetPaginatedItems.ts:124


Resolvable

Ƭ Resolvable<T>: string | InstanceType<T>

Type parameters

NameType
Textends PaginatedType

Defined in

types/Resolvable.ts:7


SearchFilters

Ƭ SearchFilters<T>: { order?: "date" | "rating" | "relevance" | "title" | "videoCount" | "viewCount" ; types?: T[] } & T extends typeof Video ? VideoSearchOptions : T extends typeof Playlist ? PlaylistSearchOptions : T extends typeof Channel ? ChannelSearchOptions : {}

Type parameters

NameType
Textends SearchType = SearchType

Defined in

types/GetPaginatedItems.ts:79


SearchType

Ƭ SearchType: typeof Video | typeof Playlist | typeof Channel

Defined in

types/GetPaginatedItems.ts:77


SubscriptionParts

Ƭ SubscriptionParts: ("contentDetails" | "id" | "snippet" | "subscriberSnippet")[]

Defined in

types/Parts.ts:34


SubscriptionResolvable

Ƭ SubscriptionResolvable: string | Subscription

An ID or object of a subscription.

Defined in

types/Resolvable.ts:48


Thumbnail

Ƭ Thumbnail: Object

Type declaration

NameType
height?number
url?string
width?number

Defined in

types/Thumbnail.ts:1


VideoCategoryResolvable

Ƭ VideoCategoryResolvable: string | VideoCategory

An ID or object of a video category.

Defined in

types/Resolvable.ts:38


VideoParts

Ƭ VideoParts: ("contentDetails" | "fileDetails" | "id" | "liveStreamingDetails" | "localizations" | "player" | "processingDetails" | "recordingDetails" | "snippet" | "statistics" | "status" | "suggestions" | "topicDetails")[]

Defined in

types/Parts.ts:1


VideoResolvable

Ƭ VideoResolvable: string | Video

A URL, ID, search query, or object of a video.

Defined in

types/Resolvable.ts:23


VideoSearchOptions

Ƭ VideoSearchOptions: Object

Type declaration

NameTypeDescription
channel?ChannelResolvable-
eventType?"completed" | "live" | "upcoming"-
location?stringLatitude and longitude coordinates in the format (37.42307,-122.08427).
locationRadius?stringUnits are m, km, ft, and mi. E.g. 5km. No larger than 1000km
videoCaption?"any" | "closedCaption" | "none"-
videoCategory?VideoCategoryResolvable-
videoEmbeddable?boolean-
videoType?"any" | "episode" | "movie"-

Defined in

types/GetPaginatedItems.ts:104


VideoUpdateResource

Ƭ VideoUpdateResource: Object

Type declaration

NameType
idstring
localizations?{ [key: string]: { description: string ; title: string }; }
recordingDetails?{ recordingDate?: Date | string }
recordingDetails.recordingDate?Date | string
snippet?{ categoryId: string ; defaultLanguage?: string ; description?: string ; tags?: string[] | string ; title: string }
snippet.categoryIdstring
snippet.defaultLanguage?string
snippet.description?string
snippet.tags?string[] | string
snippet.titlestring
status?{ embeddable?: boolean ; license?: string ; privacyStatus?: "private" | "public" | "unlisted" ; publicStatsViewable?: boolean ; publishAt?: Date | string ; selfDeclaredMadeForKids?: boolean }
status.embeddable?boolean
status.license?string
status.privacyStatus?"private" | "public" | "unlisted"
status.publicStatsViewable?boolean
status.publishAt?Date | string
status.selfDeclaredMadeForKids?boolean

Defined in

types/VideoUpdateResource.ts:1


YouTubeOptions

Ƭ YouTubeOptions: Object

Type declaration

NameTypeDescription
cache?booleanWhether or not to cache entities.
cacheCheckInterval?numberHow often to check for and delete expired cached items in seconds.
cacheSearches?booleanWhether or not we should cache searches
cacheTTL?numberHow long to cache entities in seconds (0 = unlimited).
request?RequestA custom internal request object to use instead of the default one.

Defined in

index.ts:394

Variables

GETTABLE_CLASSES

Const GETTABLE_CLASSES: (typeof Video | typeof Channel | typeof Playlist | typeof Comment | typeof Subscription | typeof VideoCategory | typeof ChannelSection | typeof Caption)[]

Defined in

types/GetItem.ts:3