mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-22 22:18:14 +00:00
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
24 lines
640 B
TypeScript
24 lines
640 B
TypeScript
import Text from './misc/Text.js';
|
|
import Author from './misc/Author.js';
|
|
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
|
|
export default class VideoOwner extends YTNode {
|
|
static type = 'VideoOwner';
|
|
|
|
subscription_button;
|
|
subscriber_count: Text;
|
|
author: Author;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
// TODO: check this
|
|
this.subscription_button = data.subscriptionButton;
|
|
this.subscriber_count = new Text(data.subscriberCountText);
|
|
|
|
this.author = new Author({
|
|
...data.title,
|
|
navigationEndpoint: data.navigationEndpoint
|
|
}, data.badges, data.thumbnail);
|
|
}
|
|
} |