Files
YouTube.js/lib/parser/classes/WatchCardRichHeader.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
594 B
JavaScript

'use strict';
const Author = require('./Author');
const NavigationEndpoint = require('./NavigationEndpoint');
const Text = require('./Text');
class WatchCardRichHeader {
type = 'WatchCardRichHeader';
constructor(data) {
this.title = new Text(data.title);
this.title_endpoint = new NavigationEndpoint(data.titleNavigationEndpoint);
this.subtitle = new Text(data.subtitle);
this.author = new Author(data, data.titleBadge ? [ data.titleBadge ] : null, data.avatar);
this.author.name = this.title;
this.style = data.style;
}
}
module.exports = WatchCardRichHeader;