Skip to main content

Documentation

Library Exports.VideoCategory

A YouTube Video category.

Constructors

constructor

new VideoCategory(youtube, data, full?)

Parameters

NameTypeDefault value
youtubeYouTubeundefined
dataSchema$VideoCategoryundefined
fullbooleantrue

Defined in

entities/video-category.ts:58

Properties

assignable

assignable: boolean

Whether or not videos can be associated with the category.

Defined in

entities/video-category.ts:56


channelId

channelId: string

The Channel that created the category.

Defined in

entities/video-category.ts:46


data

data: any

The raw data of this category.

Defined in

entities/video-category.ts:36


full

full: boolean = true

Whether or not this is a full category object.

Defined in

entities/video-category.ts:31


id

id: string

The ID of this category.

Defined in

entities/video-category.ts:41


title

title: string

The category's title.

Defined in

entities/video-category.ts:51


youtube

youtube: YouTube

The YouTube object that created this category object.

Defined in

entities/video-category.ts:26


endpoint

Static endpoint: string = 'videoCategories'

The name of the endpoint used for this entity.

Defined in

entities/video-category.ts:11


fields

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

The fields to request for this entity.

Defined in

entities/video-category.ts:21


part

Static part: string = 'snippet'

The parts to request for this entity.

Defined in

entities/video-category.ts:16

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:88


getChannel

getChannel(): Promise\<Channel>

Fetches the channel associated with this category from the API.

Returns

Promise\<Channel>

Defined in

entities/video-category.ts:96