Files
YouTube.js/src/parser/classes/VideoSecondaryInfo.ts
LuanRT 4181969d52 feat: properly type renderer parsers
CardCollection, ChipCloud, Endscreen, PlayerOverlay, PlayerOverlayAutoplay, VideoSecondaryInfo and WatchNextEndScreen.
2022-09-05 03:25:36 -03:00

32 lines
1.1 KiB
TypeScript

import Parser from '../index';
import Text from './misc/Text';
import SubscribeButton from './SubscribeButton';
import MetadataRowContainer from './MetadataRowContainer';
import { YTNode } from '../helpers';
class VideoSecondaryInfo extends YTNode {
static type = 'VideoSecondaryInfo';
owner; // TODO: VideoOwner?
description: Text;
subscribe_button;
metadata: MetadataRowContainer | null;
show_more_text: string;
show_less_text: string;
default_expanded: string;
description_collapsed_lines: string;
constructor(data: any) {
super();
this.owner = Parser.parse(data.owner);
this.description = new Text(data.description);
this.subscribe_button = Parser.parseItem<SubscribeButton>(data.subscribeButton, SubscribeButton);
this.metadata = Parser.parseItem<MetadataRowContainer>(data.metadataRowContainer, MetadataRowContainer);
this.show_more_text = data.showMoreText;
this.show_less_text = data.showLessText;
this.default_expanded = data.defaultExpanded;
this.description_collapsed_lines = data.descriptionCollapsedLines;
}
}
export default VideoSecondaryInfo;