UNPKG

@duell10111/youtubei.js

Version:

A JavaScript client for YouTube's private API, known as InnerTube.

16 lines 857 B
import { YTNode } from '../helpers.js'; import { Parser } from '../index.js'; import NavigationEndpoint from './NavigationEndpoint.js'; import PreviewButton from './PreviewButton.js'; class MaybeHistoryEndpoint extends YTNode { constructor(data) { super(); this.use_prev_history_item = Reflect.has(data, 'usePrevHistoryItem') ? data.usePrevHistoryItem : undefined; this.endpoint = Reflect.has(data, 'endpoint') ? new NavigationEndpoint(data.endpoint) : undefined; this.use_next_history_item = Reflect.has(data, 'useNextHistoryItem') ? data.useNextHistoryItem : undefined; this.item = Reflect.has(data, 'item') ? Parser.parseItem(data.item, PreviewButton) : undefined; } } MaybeHistoryEndpoint.type = 'MaybeHistoryEndpoint'; export default MaybeHistoryEndpoint; //# sourceMappingURL=MaybeHistoryEndpoint.js.map