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