mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-03 17:38:23 +00:00
refactor!: finish parser migration
Finally! :) This removes all code related to the old parser. #65
This commit is contained in:
22
lib/parser/classes/ReelShelf.js
Normal file
22
lib/parser/classes/ReelShelf.js
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
const Parser = require('..');
|
||||
const NavigationEndpoint = require('./NavigationEndpoint');
|
||||
const Text = require('./Text');
|
||||
|
||||
class ReelShelf {
|
||||
type = 'ReelShelf';
|
||||
|
||||
constructor(data) {
|
||||
this.title = new Text(data.title);
|
||||
this.items = Parser.parse(data.items);
|
||||
this.endpoint = data.endpoint ? new NavigationEndpoint(data.endpoint) : null;
|
||||
}
|
||||
|
||||
// XXX: alias for consistency
|
||||
get contents() {
|
||||
return this.items;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ReelShelf;
|
||||
Reference in New Issue
Block a user