Documentation
Library Exports.VideoRating
A YouTube Video rating (like/dislike).
Constructors
constructor
• new VideoRating(youtube, data, full?)
Parameters
| Name | Type | Default value |
|---|---|---|
youtube | YouTube | undefined |
data | Schema$VideoRating | undefined |
full | boolean | true |
Defined in
Properties
data
• data: any
The raw data of this channel section.
Defined in
full
• full: boolean = true
Whether or not this a full channel section object.
Defined in
rating
• rating: "none" | "like" | "dislike" | "unspecified"
The rating left on this video.
Defined in
videoId
• videoId: string
The ID of the video this rating is for.
Defined in
youtube
• youtube: YouTube
The YouTube object that created this channel section object.
Defined in
endpoint
▪ Static endpoint: string = 'videos/getRating'
The name of the endpoint used for this entity.
Defined in
fields
▪ Static fields: string = 'items(videoId,rating)'
The fields to request for this entity.
Defined in
part
▪ Static part: string = ''
The parts to request for this entity.
Defined in
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>