@imput/youtubei.js
Version:
A JavaScript client for YouTube's private API, known as InnerTube. Fork of youtubei.js
18 lines • 657 B
JavaScript
import { YTNode } from '../helpers.js';
import { Parser } from '../index.js';
import Text from './misc/Text.js';
import Button from './Button.js';
import ButtonView from './ButtonView.js';
class BackgroundPromo extends YTNode {
constructor(data) {
super();
this.body_text = new Text(data.bodyText);
this.cta_button = Parser.parseItem(data.ctaButton, [Button, ButtonView]);
if (Reflect.has(data, 'icon'))
this.icon_type = data.icon.iconType;
this.title = new Text(data.title);
}
}
BackgroundPromo.type = 'BackgroundPromo';
export default BackgroundPromo;
//# sourceMappingURL=BackgroundPromo.js.map