mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 19:42:14 +00:00
21 lines
465 B
JavaScript
21 lines
465 B
JavaScript
'use strict';
|
|
|
|
const NavigationEndpoint = require('./NavigationEndpoint');
|
|
|
|
class LikeButton {
|
|
type = 'LikeButton';
|
|
|
|
constructor(data) {
|
|
this.target = {
|
|
video_id: data.target.videoId
|
|
};
|
|
|
|
this.like_status = data.likeStatus;
|
|
this.likes_allowed = data.likesAllowed;
|
|
|
|
data.serviceEndpoints &&
|
|
(this.endpoints = data.serviceEndpoints?.map((endpoint) => new NavigationEndpoint(endpoint)));
|
|
}
|
|
}
|
|
|
|
module.exports = LikeButton; |