Files
YouTube.js/lib/parser/contents/classes/LikeButton.js
LuanRT 2254b69670 feat: add support for retrieving YTMusic “related” tab
+ finish lyrics parser and implement all needed YouTube Music renderers
2022-06-11 08:00:58 -03:00

20 lines
439 B
JavaScript

'use strict';
const NavigationEndpoint = require('./NavigationEndpoint');
class LikeButton {
type = 'likeButtonRenderer';
constructor(data) {
this.target = {
video_id: data.target.videoId
};
this.like_status = data.likeStatus;
this.likes_allowed = data.likesAllowed;
this.endpoints = data.serviceEndpoints.map((endpoint) => new NavigationEndpoint(endpoint));
}
}
module.exports = LikeButton;