mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-24 15:21:54 +00:00
refactor(parser): fix many minor inconsistencies
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import Parser from '../index.js';
|
||||
import Text from './misc/Text.js';
|
||||
import { YTNode } from '../helpers.js';
|
||||
import Parser, { RawNode } from '../index.js';
|
||||
import Author from './misc/Author.js';
|
||||
import Text from './misc/Text.js';
|
||||
import Thumbnail from './misc/Thumbnail.js';
|
||||
import NavigationEndpoint from './NavigationEndpoint.js';
|
||||
import { YTNode } from '../helpers.js';
|
||||
|
||||
class EndScreenVideo extends YTNode {
|
||||
static type = 'EndScreenVideo';
|
||||
@@ -22,12 +22,12 @@ class EndScreenVideo extends YTNode {
|
||||
seconds: number;
|
||||
};
|
||||
|
||||
constructor(data: any) {
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.id = data.videoId;
|
||||
this.title = new Text(data.title);
|
||||
this.thumbnails = Thumbnail.fromResponse(data.thumbnail);
|
||||
this.thumbnail_overlays = Parser.parse(data.thumbnailOverlays);
|
||||
this.thumbnail_overlays = Parser.parseArray(data.thumbnailOverlays);
|
||||
this.author = new Author(data.shortBylineText, data.ownerBadges);
|
||||
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
||||
this.short_view_count = new Text(data.shortViewCountText);
|
||||
|
||||
Reference in New Issue
Block a user