mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-24 07:11:48 +00:00
26 lines
525 B
JavaScript
26 lines
525 B
JavaScript
'use strict';
|
|
|
|
const Parser = require('..');
|
|
|
|
/** @namespace */
|
|
class Explore {
|
|
#page;
|
|
|
|
/**
|
|
* @param {object} response - API response.
|
|
*/
|
|
constructor(response) {
|
|
this.#page = Parser.parseResponse(response.data);
|
|
|
|
const tab = this.page.contents.tabs.get({ selected: true });
|
|
|
|
this.top_buttons = tab.content.contents.get({ type: 'Grid' }).items;
|
|
this.sections = tab.content.contents.findAll({ type: 'MusicCarouselShelf' });
|
|
}
|
|
|
|
get page() {
|
|
return this.#page;
|
|
}
|
|
}
|
|
|
|
module.exports = Explore; |