refactor(parser)!: Implement endpoint/command parsers (#812)

This commit is contained in:
Luan
2024-11-21 18:24:16 -03:00
committed by GitHub
parent 7156a585c0
commit 7397aa3f64
114 changed files with 2228 additions and 1956 deletions

View File

@@ -0,0 +1,22 @@
import { YTNode } from '../../helpers.js';
import { type RawNode } from '../../index.js';
import NavigationEndpoint from '../NavigationEndpoint.js';
export default class AddToPlaylistCommand extends YTNode {
static type = 'AddToPlaylistCommand';
public open_miniplayer: boolean;
public video_id: string;
public list_type: string;
public endpoint: NavigationEndpoint;
public video_ids: string[];
constructor(data: RawNode) {
super();
this.open_miniplayer = data.openMiniplayer;
this.video_id = data.videoId;
this.list_type = data.listType;
this.endpoint = new NavigationEndpoint(data.onCreateListCommand);
this.video_ids = data.videoIds;
}
}