Files
YouTube.js/src/parser/classes/VideoOwner.ts
LuanRT 34281e2445 refactor: migrate parsers to TS (#133)
* dev: finish top-level parsers TS migration

* dev: migrate menu renderers to TS

* chore: fix ts errors

* dev: finish ts migration 🎉
2022-08-20 03:18:17 -03:00

25 lines
604 B
TypeScript

import Text from './misc/Text';
import Author from './misc/Author';
import { YTNode } from '../helpers';
class VideoOwner extends YTNode {
static type = 'VideoOwner';
subscription_button;
subscriber_count: Text;
author: Author;
constructor(data: any) {
super();
// TODO: check this
this.subscription_button = data.subscriptionButton || null;
this.subscriber_count = new Text(data.subscriberCountText);
this.author = new Author({
...data.title,
navigationEndpoint: data.navigationEndpoint
}, data.badges, data.thumbnail);
}
}
export default VideoOwner;