Skip to main content

Documentation

Library Exports.VideoCategory

A YouTube Video category.

Constructors

constructor

new VideoCategory(youtube, data, full?)

Parameters

NameTypeDefault value
youtubeYouTubeundefined
dataanyundefined
fullbooleantrue

Defined in

entities/video-category.ts:57

Properties

assignable

assignable: boolean

Whether or not videos can be associated with the category.

Defined in

entities/video-category.ts:55


channelId

channelId: string

The Channel that created the category.

Defined in

entities/video-category.ts:45


data

data: any

The raw data of this category.

Defined in

entities/video-category.ts:35


full

full: boolean = true

Whether or not this is a full category object.

Defined in

entities/video-category.ts:30


id

id: string

The ID of this category.

Defined in

entities/video-category.ts:40


title

title: string

The category's title.

Defined in

entities/video-category.ts:50


youtube

youtube: YouTube

The YouTube object that created this category object.

Defined in

entities/video-category.ts:25


endpoint

Static endpoint: string = 'videoCategories'

The name of the endpoint used for this entity.

Defined in

entities/video-category.ts:10


fields

Static fields: string = 'items(kind,id,snippet(channelId,title,assignable))'

The fields to request for this entity.

Defined in

entities/video-category.ts:20


part

Static part: string = 'snippet'

The parts to request for this entity.

Defined in

entities/video-category.ts:15

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

entities/video-category.ts:87


getChannel

getChannel(): Promise<Channel>

Fetches the channel associated with this category from the API.

Returns

Promise<Channel>

Defined in

entities/video-category.ts:95