mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
feat(yt): add getGuide() (#335)
* feat(yt): add `getGuide()` * chore: lint * fix(Guide): wrong prop * fix(Guide): include subscription section * fix(Guide): wrong import * feat(Guide): add `page`
This commit is contained in:
35
src/parser/classes/GuideCollapsibleEntry.ts
Normal file
35
src/parser/classes/GuideCollapsibleEntry.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import Text from './misc/Text.js';
|
||||
import { YTNode } from '../helpers.js';
|
||||
import Parser from '../parser.js';
|
||||
|
||||
class GuideCollapsibleEntry extends YTNode {
|
||||
static type = 'GuideCollapsibleEntry';
|
||||
|
||||
expander_item: {
|
||||
title: string,
|
||||
icon_type: string
|
||||
};
|
||||
collapser_item: {
|
||||
title: string,
|
||||
icon_type: string
|
||||
};
|
||||
expandable_items;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
|
||||
this.expander_item = {
|
||||
title: new Text(data.expanderItem.guideEntryRenderer.formattedTitle).toString(),
|
||||
icon_type: data.expanderItem.guideEntryRenderer.icon.iconType
|
||||
};
|
||||
|
||||
this.collapser_item = {
|
||||
title: new Text(data.collapserItem.guideEntryRenderer.formattedTitle).toString(),
|
||||
icon_type: data.collapserItem.guideEntryRenderer.icon.iconType
|
||||
};
|
||||
|
||||
this.expandable_items = Parser.parseArray(data.expandableItems);
|
||||
}
|
||||
}
|
||||
|
||||
export default GuideCollapsibleEntry;
|
||||
Reference in New Issue
Block a user