mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 11:32:27 +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
756 B
TypeScript
27 lines
756 B
TypeScript
import Text from './misc/Text';
|
|
import Thumbnail from './misc/Thumbnail';
|
|
import NavigationEndpoint from './NavigationEndpoint';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class EndScreenPlaylist extends YTNode {
|
|
static type = 'EndScreenPlaylist';
|
|
|
|
id: string;
|
|
title: Text;
|
|
author: Text;
|
|
endpoint: NavigationEndpoint;
|
|
thumbnails: Thumbnail[];
|
|
video_count: Text;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.id = data.playlistId;
|
|
this.title = new Text(data.title);
|
|
this.author = new Text(data.longBylineText);
|
|
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
|
this.thumbnails = Thumbnail.fromResponse(data.thumbnail);
|
|
this.video_count = new Text(data.videoCountText);
|
|
}
|
|
}
|
|
|
|
export default EndScreenPlaylist; |