mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-15 18:42:11 +00:00
* dev: add `WEB_KIDS` innertube client * refactor: move DASH manifest stuff out of `VideoInfo` This makes it easier to use these functions elsewhere. * feat(ytkids): add `Kids#getInfo()` & `Kids#search()` * feat: add `Innertube#kids.getHomeFeed()` * docs: add YouTube Kids API ref * docs: fix typo * docs: fix yet another typo * docs: update YouTube Music API ref Unrelated but required to reflect changes made to the DASH manifest generation functions * chore: lint * chore: add tests * feat: include `captions` in `VideoInfo` * chore: fix tests
28 lines
732 B
TypeScript
28 lines
732 B
TypeScript
import Parser from '..';
|
|
import Text from './misc/Text';
|
|
import { YTNode } from '../helpers';
|
|
|
|
class SlimVideoMetadata extends YTNode {
|
|
static type = 'SlimVideoMetadata';
|
|
|
|
title: Text;
|
|
collapsed_subtitle: Text;
|
|
expanded_subtitle: Text;
|
|
owner: any;
|
|
description: Text;
|
|
video_id: string;
|
|
date: Text;
|
|
|
|
constructor(data: any) {
|
|
super();
|
|
this.title = new Text(data.title);
|
|
this.collapsed_subtitle = new Text(data.collapsedSubtitle);
|
|
this.expanded_subtitle = new Text(data.expandedSubtitle);
|
|
this.owner = Parser.parseItem(data.owner);
|
|
this.description = new Text(data.description);
|
|
this.video_id = data.videoId;
|
|
this.date = new Text(data.dateText);
|
|
}
|
|
}
|
|
|
|
export default SlimVideoMetadata; |