Skip to content

Commit

Permalink
feat: add FeedNudge (#533)
Browse files Browse the repository at this point in the history
* feat: add `FeedNudge`

see https://github.com/LuanRT/YouTube.js/actions/runs/6679090140/job/18150827068?pr=532

* fix: lint

* fix: update parser-map
  • Loading branch information
JellyBrick authored Oct 29, 2023
1 parent db7f620 commit e021395
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/parser/classes/FeedNudge.ts
Original file line number Diff line number Diff line change
@@ -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;
}
}
1 change: 1 addition & 0 deletions src/parser/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit e021395

Please sign in to comment.