@duell10111/youtubei.js
Version:
A JavaScript client for YouTube's private API, known as InnerTube.
26 lines • 957 B
JavaScript
import { Parser } from '../index.js';
import { YTNode } from '../helpers.js';
export default class PlaylistVideoList extends YTNode {
static type = 'PlaylistVideoList';
id;
is_editable;
can_reorder;
videos;
continuation;
constructor(data) {
super();
this.id = data.playlistId;
this.is_editable = data.isEditable;
this.can_reorder = data.canReorder;
this.videos = Parser.parseArray(data.contents);
if (Reflect.has(data, 'continuations')) {
if (Reflect.has(data.continuations[0], 'nextContinuationData')) {
this.continuation = data.continuations[0].nextContinuationData.continuation;
}
else if (Reflect.has(data.continuations[0], 'reloadContinuationData')) {
this.continuation = data.continuations[0].reloadContinuationData.continuation;
}
}
}
}
//# sourceMappingURL=PlaylistVideoList.js.map