feat: Add Shorts endpoint (#512)

* chore: first try for shorts endpoints

* chore: add shorts to index

* fix: fix code style

* chore: fix suggestions

* fix: fix code style with spaces on curly brackets

* chore: add curly rule to eslint

* chore: run request in parallel

* chore: remove console.logs and add other expect tests

* chore: apply eslint suggestions

* Update ReelPlayerOverlay.ts

* Update VideoInfo.ts

* chore: remove console.log from tests

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: LuanRT <luan.lrt4@gmail.com>
This commit is contained in:
Konstantin
2023-12-01 02:58:11 +01:00
committed by GitHub
parent 4806fc6c11
commit a32aa8c633
25 changed files with 485 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
import { type RawNode } from '../index.js';
import { YTNode } from '../helpers.js';
import Thumbnail from './misc/Thumbnail.js';
import Author from './misc/Author.js';
import Text from './misc/Text.js';
export default class ReelPlayerHeader extends YTNode {
static type = 'ReelPlayerHeader';
reel_title_text: Text;
timestamp_text: Text;
channel_title_text: Text;
channel_thumbnail: Thumbnail[];
author: Author;
constructor(data: RawNode) {
super();
this.reel_title_text = new Text(data.reelTitleText);
this.timestamp_text = new Text(data.timestampText);
this.channel_title_text = new Text(data.channelTitleText);
this.channel_thumbnail = Thumbnail.fromResponse(data.channelThumbnail);
this.author = new Author(data.channelNavigationEndpoint, undefined);
}
}