mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
25 lines
704 B
JavaScript
25 lines
704 B
JavaScript
import Author from './misc/Author';
|
|
import NavigationEndpoint from './NavigationEndpoint';
|
|
import Text from './misc/Text';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class Channel extends YTNode {
|
|
static type = 'Channel';
|
|
|
|
constructor(data) {
|
|
super();
|
|
this.id = data.channelId;
|
|
|
|
this.author = new Author({
|
|
...data.title,
|
|
navigationEndpoint: data.navigationEndpoint
|
|
}, data.ownerBadges, data.thumbnail);
|
|
|
|
this.subscribers = new Text(data.subscriberCountText);
|
|
this.videos = new Text(data.videoCountText);
|
|
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
|
|
this.description_snippet = new Text(data.descriptionSnippet);
|
|
}
|
|
}
|
|
|
|
export default Channel; |