From 16239aa752bfcf22e007cd62765ec03ab04a24da Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Fri, 24 Nov 2023 19:08:11 +0100 Subject: [PATCH] feat(parser): Add `ChannelOwnerEmptyState` --- src/parser/classes/ChannelOwnerEmptyState.ts | 17 +++++++++++++++++ src/parser/nodes.ts | 1 + 2 files changed, 18 insertions(+) create mode 100644 src/parser/classes/ChannelOwnerEmptyState.ts diff --git a/src/parser/classes/ChannelOwnerEmptyState.ts b/src/parser/classes/ChannelOwnerEmptyState.ts new file mode 100644 index 000000000..dbf9cb481 --- /dev/null +++ b/src/parser/classes/ChannelOwnerEmptyState.ts @@ -0,0 +1,17 @@ +import { YTNode } from '../helpers.js'; +import type { RawNode } from '../index.js'; +import Text from './misc/Text.js'; +import Thumbnail from './misc/Thumbnail.js'; + +export default class ChannelOwnerEmptyState extends YTNode { + static type = 'ChannelOwnerEmptyState'; + + illustration: Thumbnail[]; + description: Text; + + constructor(data: RawNode) { + super(); + this.illustration = Thumbnail.fromResponse(data.illustration); + this.description = new Text(data.description); + } +} \ No newline at end of file diff --git a/src/parser/nodes.ts b/src/parser/nodes.ts index dcd7a3dd4..f419cd884 100644 --- a/src/parser/nodes.ts +++ b/src/parser/nodes.ts @@ -42,6 +42,7 @@ export { default as ChannelHeaderLinksView } from './classes/ChannelHeaderLinksV export { default as ChannelMetadata } from './classes/ChannelMetadata.js'; export { default as ChannelMobileHeader } from './classes/ChannelMobileHeader.js'; export { default as ChannelOptions } from './classes/ChannelOptions.js'; +export { default as ChannelOwnerEmptyState } from './classes/ChannelOwnerEmptyState.js'; export { default as ChannelSubMenu } from './classes/ChannelSubMenu.js'; export { default as ChannelThumbnailWithLink } from './classes/ChannelThumbnailWithLink.js'; export { default as ChannelVideoPlayer } from './classes/ChannelVideoPlayer.js';