mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-26 16:18:51 +00:00
feat: add FeedNudge (#533)
* feat: add `FeedNudge` see https://github.com/LuanRT/YouTube.js/actions/runs/6679090140/job/18150827068?pr=532 * fix: lint * fix: update parser-map
This commit is contained in:
25
src/parser/classes/FeedNudge.ts
Normal file
25
src/parser/classes/FeedNudge.ts
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user