mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-28 00:56:23 +00:00
refactor!: finish parser migration
Finally! :) This removes all code related to the old parser. #65
This commit is contained in:
20
lib/parser/classes/VideoInfoCardContent.js
Normal file
20
lib/parser/classes/VideoInfoCardContent.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
const Text = require('./Text');
|
||||
const Thumbnail = require('./Thumbnail');
|
||||
const NavigationEndpoint = require('./NavigationEndpoint');
|
||||
|
||||
class VideoInfoCardContent {
|
||||
type = 'VideoInfoCardContent';
|
||||
|
||||
constructor(data) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = VideoInfoCardContent;
|
||||
Reference in New Issue
Block a user