From fdb754043b809223ae8938fbbdd5780f585b697e Mon Sep 17 00:00:00 2001 From: Luan Date: Sat, 9 Nov 2024 20:18:14 -0300 Subject: [PATCH] feat(parser): Add `UpdateSubscribeButtonAction` --- .../actions/UpdateSubscribeButtonAction.ts | 15 +++++++++++++++ src/parser/nodes.ts | 1 + 2 files changed, 16 insertions(+) create mode 100644 src/parser/classes/actions/UpdateSubscribeButtonAction.ts diff --git a/src/parser/classes/actions/UpdateSubscribeButtonAction.ts b/src/parser/classes/actions/UpdateSubscribeButtonAction.ts new file mode 100644 index 000000000..d4d1cc25a --- /dev/null +++ b/src/parser/classes/actions/UpdateSubscribeButtonAction.ts @@ -0,0 +1,15 @@ +import type { RawNode } from '../../index.js'; +import { YTNode } from '../../helpers.js'; + +export default class UpdateSubscribeButtonAction extends YTNode { + static type = 'UpdateSubscribeButtonAction'; + + public channel_id: string; + public subscribed: boolean; + + constructor(data: RawNode) { + super(); + this.channel_id = data.channelId; + this.subscribed = data.subscribed; + } +} \ No newline at end of file diff --git a/src/parser/nodes.ts b/src/parser/nodes.ts index fe5f344c3..068f82c67 100644 --- a/src/parser/nodes.ts +++ b/src/parser/nodes.ts @@ -12,6 +12,7 @@ export { default as AppendContinuationItemsAction } from './classes/actions/Appe export { default as GetMultiPageMenuAction } from './classes/actions/GetMultiPageMenuAction.js'; export { default as OpenPopupAction } from './classes/actions/OpenPopupAction.js'; export { default as UpdateEngagementPanelAction } from './classes/actions/UpdateEngagementPanelAction.js'; +export { default as UpdateSubscribeButtonAction } from './classes/actions/UpdateSubscribeButtonAction.js'; export { default as Alert } from './classes/Alert.js'; export { default as AlertWithButton } from './classes/AlertWithButton.js'; export { default as AnalyticsMainAppKeyMetrics } from './classes/analytics/AnalyticsMainAppKeyMetrics.js';