mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
* dev: finish top-level parsers TS migration
* dev: migrate menu renderers to TS
* chore: fix ts errors
* dev: finish ts migration 🎉
27 lines
803 B
TypeScript
27 lines
803 B
TypeScript
import Text from './misc/Text';
|
|
import Thumbnail from './misc/Thumbnail';
|
|
import NavigationEndpoint from './NavigationEndpoint';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class VideoInfoCardContent extends YTNode {
|
|
static type = 'VideoInfoCardContent';
|
|
|
|
title: Text;
|
|
channel_name: Text;
|
|
view_count: Text;
|
|
video_thumbnails: Thumbnail[];
|
|
duration: Text;
|
|
endpoint: NavigationEndpoint;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.title = new Text(data.videoTitle);
|
|
this.channel_name = new Text(data.channelName);
|
|
this.view_count = new Text(data.viewCountText);
|
|
this.video_thumbnails = Thumbnail.fromResponse(data.videoThumbnail);
|
|
this.duration = new Text(data.lengthString);
|
|
this.endpoint = new NavigationEndpoint(data.action);
|
|
}
|
|
}
|
|
|
|
export default VideoInfoCardContent; |