mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 19:42:14 +00:00
* dev: finish top-level parsers TS migration
* dev: migrate menu renderers to TS
* chore: fix ts errors
* dev: finish ts migration 🎉
25 lines
651 B
TypeScript
25 lines
651 B
TypeScript
import NavigationEndpoint from './NavigationEndpoint';
|
|
import Text from './misc/Text';
|
|
import Thumbnail from './misc/Thumbnail';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class ReelItem extends YTNode {
|
|
static type = 'ReelItem';
|
|
|
|
id: string;
|
|
title: Text;
|
|
thumbnails: Thumbnail[];
|
|
views: Text;
|
|
endpoint: NavigationEndpoint;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.id = data.videoId;
|
|
this.title = new Text(data.headline);
|
|
this.thumbnails = Thumbnail.fromResponse(data.thumbnail);
|
|
this.views = new Text(data.viewCountText);
|
|
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
|
}
|
|
}
|
|
|
|
export default ReelItem; |