Skip to main content

Documentation

Library Exports.VideoRating

A YouTube Video rating (like/dislike).

Constructors

constructor

new VideoRating(youtube, data, full?)

Parameters

NameTypeDefault value
youtubeYouTubeundefined
dataSchema$VideoRatingundefined
fullbooleantrue

Defined in

entities/video-rating.ts:48

Properties

data

data: any

The raw data of this channel section.

Defined in

entities/video-rating.ts:36


full

full: boolean = true

Whether or not this a full channel section object.

Defined in

entities/video-rating.ts:31


rating

rating: "none" | "like" | "dislike" | "unspecified"

The rating left on this video.

Defined in

entities/video-rating.ts:46


videoId

videoId: string

The ID of the video this rating is for.

Defined in

entities/video-rating.ts:41


youtube

youtube: YouTube

The YouTube object that created this channel section object.

Defined in

entities/video-rating.ts:26


endpoint

Static endpoint: string = 'videos/getRating'

The name of the endpoint used for this entity.

Defined in

entities/video-rating.ts:11


fields

Static fields: string = 'items(videoId,rating)'

The fields to request for this entity.

Defined in

entities/video-rating.ts:21


part

Static part: string = ''

The parts to request for this entity.

Defined in

entities/video-rating.ts:16

Methods

fetch

fetch(): Promise\<VideoRating>

Fetches this video rating from the API and reassigns this object to the new rating object. Only useful if you want updated rating info.

Returns

Promise\<VideoRating>

Defined in

entities/video-rating.ts:76