diff --git a/src/parser/classes/FeedNudge.ts b/src/parser/classes/FeedNudge.ts new file mode 100644 index 00000000..ede37e08 --- /dev/null +++ b/src/parser/classes/FeedNudge.ts @@ -0,0 +1,25 @@ +import { YTNode } from '../helpers.js'; +import { NavigationEndpoint } from '../nodes.js'; + +import type { RawNode } from '../types/index.js'; + +export default class FeedNudge extends YTNode { + static type = 'FeedNudge'; + + title: Text; + subtitle: Text; + endpoint: NavigationEndpoint; + apply_modernized_style: boolean; + trim_style: string; + background_style: string; + + constructor(data: RawNode) { + super(); + this.title = new Text(data.title); + this.subtitle = new Text(data.subtitle); + this.endpoint = new NavigationEndpoint(data.impressionEndpoint); + this.apply_modernized_style = data.applyModernizedStyle; + this.trim_style = data.trimStyle; + this.background_style = data.backgroundStyle; + } +} \ No newline at end of file diff --git a/src/parser/nodes.ts b/src/parser/nodes.ts index afa97a91..dcd7a3dd 100644 --- a/src/parser/nodes.ts +++ b/src/parser/nodes.ts @@ -105,6 +105,7 @@ export { default as ExpandedShelfContents } from './classes/ExpandedShelfContent export { default as Factoid } from './classes/Factoid.js'; export { default as FancyDismissibleDialog } from './classes/FancyDismissibleDialog.js'; export { default as FeedFilterChipBar } from './classes/FeedFilterChipBar.js'; +export { default as FeedNudge } from './classes/FeedNudge.js'; export { default as FeedTabbedHeader } from './classes/FeedTabbedHeader.js'; export { default as GameCard } from './classes/GameCard.js'; export { default as GameDetails } from './classes/GameDetails.js';