Files
YouTube.js/src/parser/classes/CompactStation.ts
LuanRT 3cbcd71a3a feat: add support for topic/auto-generated channels and fix minor parsing errors (#233)
* dev: add support for topic channels

* dev(parser): do not try to parse empty nodes

* dev: add support for auto-generated game channels
2022-11-11 00:38:44 -03:00

25 lines
692 B
TypeScript

import { YTNode } from '../helpers';
import Text from './misc/Text';
import Thumbnail from './misc/Thumbnail';
import NavigationEndpoint from './NavigationEndpoint';
export default class CompactStation extends YTNode {
static type = 'CompactStation';
title: Text;
description: Text;
video_count: Text;
endpoint: NavigationEndpoint;
thumbnail: Thumbnail[];
constructor(data: any) {
super();
this.title = new Text(data.title);
this.description = new Text(data.description);
this.video_count = new Text(data.videoCountText);
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
this.thumbnail = Thumbnail.fromResponse(data.thumbnail);
}
}