Documentation
Library Exports.VideoCategory
A YouTube Video category.
Constructors
constructor
• new VideoCategory(youtube
, data
, full?
)
Parameters
Name | Type | Default value |
---|---|---|
youtube | YouTube | undefined |
data | any | undefined |
full | boolean | true |
Defined in
Properties
assignable
• assignable: boolean
Whether or not videos can be associated with the category.
Defined in
channelId
• channelId: string
The Channel that created the category.
Defined in
data
• data: any
The raw data of this category.
Defined in
full
• full: boolean
= true
Whether or not this is a full category object.
Defined in
id
• id: string
The ID of this category.
Defined in
title
• title: string
The category's title.
Defined in
youtube
• youtube: YouTube
The YouTube object that created this category object.
Defined in
endpoint
▪ Static
endpoint: string
= 'videoCategories'
The name of the endpoint used for this entity.
Defined in
fields
▪ Static
fields: string
= 'items(kind,id,snippet(channelId,title,assignable))'
The fields to request for this entity.
Defined in
part
▪ Static
part: string
= 'snippet'
The parts to request for this entity.
Defined in
Methods
fetch
▸ fetch(): Promise
<VideoCategory
>
Fetches this category from the API and reassigns this object to the new category object.
Only useful if this.full
is false, or if you want updated category info.
Returns
Promise
<VideoCategory
>
Defined in
getChannel
▸ getChannel(): Promise
<Channel
>
Fetches the channel associated with this category from the API.
Returns
Promise
<Channel
>