feat: bring back Video#is_live and add ExpandableMetadata (#256)

* bring back `Video#is_live`

* add ExpandableMetadata
This commit is contained in:
LuanRT
2022-12-15 19:01:42 -03:00
committed by GitHub
parent 883a023624
commit e37f42f41b
8 changed files with 127 additions and 20 deletions

View File

@@ -2,6 +2,7 @@ import Parser from '../index';
import { YTNode } from '../helpers';
import SearchRefinementCard from './SearchRefinementCard';
import Button from './Button';
import MacroMarkersListItem from './MacroMarkersListItem';
class HorizontalCardList extends YTNode {
static type = 'HorizontalCardList';
@@ -13,7 +14,7 @@ class HorizontalCardList extends YTNode {
constructor(data: any) {
super();
this.cards = Parser.parseArray<SearchRefinementCard>(data.cards, SearchRefinementCard);
this.cards = Parser.parseArray<SearchRefinementCard | MacroMarkersListItem>(data.cards);
this.header = Parser.parseItem(data.header);
this.previous_button = Parser.parseItem<Button>(data.previousButton, Button);
this.next_button = Parser.parseItem<Button>(data.nextButton, Button);