mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-20 21:13:33 +00:00
* tests: improve coverage * refactor: clean up nodes * chore: lint * feat(parser): ignore `BrandVideoShelf` Seems to be used for ads. * feat(parser): ignore `BrandVideoSingleton` too
20 lines
537 B
TypeScript
20 lines
537 B
TypeScript
import NavigationEndpoint from './NavigationEndpoint.js';
|
|
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
|
|
export default class DownloadButton extends YTNode {
|
|
static type = 'DownloadButton';
|
|
|
|
style: string;
|
|
size: string; // TODO: check this
|
|
endpoint: NavigationEndpoint;
|
|
target_id: string;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.style = data.style;
|
|
this.size = data.size;
|
|
this.endpoint = new NavigationEndpoint(data.command);
|
|
this.target_id = data.targetId;
|
|
}
|
|
} |