VideoCategory
popyt / Library Exports / VideoCategory
Class: VideoCategory
Defined in: entities/video-category.ts:7
A YouTube Video category.
Constructors
Constructor
new VideoCategory(
youtube,data,full?):VideoCategory
Defined in: entities/video-category.ts:58
Parameters
youtube
data
Schema$VideoCategory
full?
boolean = true
Returns
VideoCategory
Properties
assignable
assignable:
boolean
Defined in: entities/video-category.ts:56
Whether or not videos can be associated with the category.
channelId
channelId:
string
Defined in: entities/video-category.ts:46
The Channel that created the category.
data
data:
any
Defined in: entities/video-category.ts:36
The raw data of this category.
full
full:
boolean=true
Defined in: entities/video-category.ts:31
Whether or not this is a full category object.
id
id:
string
Defined in: entities/video-category.ts:41
The ID of this category.
title
title:
string
Defined in: entities/video-category.ts:51
The category's title.
youtube
youtube:
YouTube
Defined in: entities/video-category.ts:26
The YouTube object that created this category object.
endpoint
staticendpoint:string='videoCategories'
Defined in: entities/video-category.ts:11
The name of the endpoint used for this entity.
fields
staticfields:string='items(kind,id,snippet(channelId,title,assignable))'
Defined in: entities/video-category.ts:21
The fields to request for this entity.
part
staticpart:string='snippet'
Defined in: entities/video-category.ts:16
The parts to request for this entity.
Methods
fetch()
fetch():
Promise<VideoCategory>
Defined in: entities/video-category.ts:88
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>
getChannel()
getChannel():
Promise<Channel>
Defined in: entities/video-category.ts:96
Fetches the channel associated with this category from the API.
Returns
Promise<Channel>