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:
Patrick Kan
2023-03-04 17:23:17 +08:00
committed by GitHub
parent 2d774e26aa
commit 2cc7b8bcd6
13 changed files with 204 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
import { YTNode } from '../helpers.js';
import Parser from '../parser.js';
class GuideCollapsibleSectionEntry extends YTNode {
static type = 'GuideCollapsibleSectionEntry';
header_entry;
expander_icon: string;
collapser_icon: string;
section_items;
constructor(data: any) {
super();
this.header_entry = Parser.parseItem(data.headerEntry);
this.expander_icon = data.expanderIcon.iconType;
this.collapser_icon = data.collapserIcon.iconType;
this.section_items = Parser.parseArray(data.sectionItems);
}
}
export default GuideCollapsibleSectionEntry;