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:
20
src/parser/classes/GuideSection.ts
Normal file
20
src/parser/classes/GuideSection.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Text from './misc/Text.js';
|
||||
import { YTNode } from '../helpers.js';
|
||||
import Parser from '../parser.js';
|
||||
|
||||
class GuideSection extends YTNode {
|
||||
static type = 'GuideSection';
|
||||
|
||||
title?: Text;
|
||||
items;
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
if (data.formattedTitle) {
|
||||
this.title = new Text(data.formattedTitle);
|
||||
}
|
||||
this.items = Parser.parseArray(data.items);
|
||||
}
|
||||
}
|
||||
|
||||
export default GuideSection;
|
||||
Reference in New Issue
Block a user