mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 02:52:12 +00:00
* replaced YTNode's data arg as RawNode * updated documentation * removed unused import ---- Note that there are still many nodes that need to be updated, hence the WIP status.
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { YTNode } from '../../helpers.js';
|
|
import Thumbnail from '../misc/Thumbnail.js';
|
|
import type { RawNode } from '../../index.js';
|
|
|
|
class CreatorHeart extends YTNode {
|
|
static type = 'CreatorHeart';
|
|
|
|
creator_thumbnail: Thumbnail[];
|
|
heart_icon_type: string;
|
|
heart_color: {
|
|
basic_color_palette_data: {
|
|
foreground_title_color: string;
|
|
}
|
|
};
|
|
hearted_tooltip: string;
|
|
is_hearted: boolean;
|
|
is_enabled: boolean;
|
|
kennedy_heart_color_string: string;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.creator_thumbnail = Thumbnail.fromResponse(data.creatorThumbnail);
|
|
this.heart_icon_type = data.heartIcon?.iconType;
|
|
this.heart_color = {
|
|
basic_color_palette_data: {
|
|
foreground_title_color: data.heartColor?.basicColorPaletteData?.foregroundTitleColor
|
|
}
|
|
};
|
|
this.hearted_tooltip = data.heartedTooltip;
|
|
this.is_hearted = data.isHearted;
|
|
this.is_enabled = data.isEnabled;
|
|
this.kennedy_heart_color_string = data.kennedyHeartColorString;
|
|
}
|
|
}
|
|
|
|
export default CreatorHeart; |