Files
YouTube.js/lib/parser/youtube/History.js
LuanRT 748e34758f feat: tidy things up and implement more renderers
- Finished Library parser
- Fixed search continuations
- Improved channel parser
- Improved playlist parser
- Added support for posts of type poll
- Improved History parser
- Removed redundant code
2022-06-20 03:02:42 -03:00

32 lines
779 B
JavaScript

'use strict';
const Feed = require('../../core/Feed');
// TODO: make filter actions usable
/** @namespace */
class History extends Feed {
/**
* @param {import('../../core/Actions')} actions
* @param {object} data - parsed data.
* @param {boolean} already_parsed
*/
constructor(actions, data, already_parsed = false) {
super(actions, data, already_parsed)
this.sections = this.memo.get('ItemSection');
this.feed_actions = this.memo.get('BrowseFeedActions')?.[0] || [];
}
/**
* Retrieves next batch of contents.
*
* @returns {Promise.<History>}
*/
async getContinuation() {
const continuation = await this.getContinuationData();
return new History(this.actions, continuation, true);
}
}
module.exports = History;