Files
YouTube.js/src/parser/classes/CollageHeroImage.ts
LuanRT 257bd475a0 refactor: clean up parser and tests (#387)
* tests: improve coverage

* refactor: clean up nodes

* chore: lint

* feat(parser): ignore `BrandVideoShelf`

Seems to be used for ads.

* feat(parser): ignore `BrandVideoSingleton` too
2023-04-23 06:37:33 -03:00

21 lines
711 B
TypeScript

import NavigationEndpoint from './NavigationEndpoint.js';
import Thumbnail from './misc/Thumbnail.js';
import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
export default class CollageHeroImage extends YTNode {
static type = 'CollageHeroImage';
left: Thumbnail[];
top_right: Thumbnail[];
bottom_right: Thumbnail[];
endpoint: NavigationEndpoint;
constructor(data: RawNode) {
super();
this.left = Thumbnail.fromResponse(data.leftThumbnail);
this.top_right = Thumbnail.fromResponse(data.topRightThumbnail);
this.bottom_right = Thumbnail.fromResponse(data.bottomRightThumbnail);
this.endpoint = new NavigationEndpoint(data.navigationEndpoint);
}
}