Compare commits

...

1 Commits

Author SHA1 Message Date
LuanRT
7668ebc98e chore: v4.0.1 release 2023-03-16 07:56:23 +00:00
2 changed files with 5 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "youtubei.js",
"version": "4.0.0",
"version": "4.0.1",
"description": "A wrapper around YouTube's private API. Supports YouTube, YouTube Music, YouTube Kids and YouTube Studio (WIP).",
"type": "module",
"types": "./dist/src/platform/lib.d.ts",

View File

@@ -5,6 +5,7 @@ import Author from './misc/Author.ts';
import NavigationEndpoint from './NavigationEndpoint.ts';
import SubscribeButton from './SubscribeButton.ts';
import Button from './Button.ts';
import { YTNode } from '../helpers.ts';
@@ -18,7 +19,7 @@ class Channel extends YTNode {
long_byline: Text;
short_byline: Text;
endpoint: NavigationEndpoint;
subscribe_button: SubscribeButton | null;
subscribe_button: SubscribeButton | Button | null;
description_snippet: Text;
constructor(data: any) {
@@ -36,9 +37,9 @@ class Channel extends YTNode {
this.long_byline = new Text(data.longBylineText);
this.short_byline = new Text(data.shortBylineText);
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
this.subscribe_button = Parser.parseItem(data.subscribeButton, SubscribeButton);
this.subscribe_button = Parser.parseItem(data.subscribeButton, [ SubscribeButton, Button ]);
this.description_snippet = new Text(data.descriptionSnippet);
}
}
export default Channel;
export default Channel;