Files
YouTube.js/lib/parser/classes/PlaylistSidebarPrimaryInfo.js
LuanRT 68cb841c00 refactor!: finish parser migration
Finally! :)

This removes all code related to the old parser.

#65
2022-07-11 06:19:10 -03:00

20 lines
626 B
JavaScript

'use strict';
const Parser = require('..');
const NavigationEndpoint = require('./NavigationEndpoint');
const Text = require('./Text');
class PlaylistSidebarPrimaryInfo {
type = 'PlaylistSidebarPrimaryInfo';
constructor(data) {
this.stats = data.stats.map((stat) => new Text(stat));
this.thumbnail_renderer = Parser.parse(data.thumbnailRenderer);
this.title = new Text(data.title);
this.menu = data.menu && Parser.parse(data.menu);
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
this.description = new Text(data.description);
}
}
module.exports = PlaylistSidebarPrimaryInfo;