@duell10111/youtubei.js
Version:
A JavaScript client for YouTube's private API, known as InnerTube.
22 lines • 911 B
JavaScript
import { Parser } from '../index.js';
import { YTNode } from '../helpers.js';
class PlaylistVideoList extends YTNode {
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;
}
}
}
}
PlaylistVideoList.type = 'PlaylistVideoList';
export default PlaylistVideoList;
//# sourceMappingURL=PlaylistVideoList.js.map