mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 19:42:14 +00:00
29 lines
651 B
JavaScript
29 lines
651 B
JavaScript
'use strict';
|
|
|
|
const Parser = require('..');
|
|
const Text = require('./Text');
|
|
const NavigationEndpoint = require('./NavigationEndpoint');
|
|
|
|
class MusicShelf {
|
|
type = 'MusicShelf';
|
|
|
|
constructor(data) {
|
|
this.title = new Text(data.title).toString();
|
|
|
|
this.contents = Parser.parse(data.contents);
|
|
|
|
if (data.bottomEndpoint) {
|
|
this.endpoint = new NavigationEndpoint(data.bottomEndpoint);
|
|
}
|
|
|
|
if (data.continuations) {
|
|
this.continuation = data.continuations?.[0].nextContinuationData.continuation;
|
|
}
|
|
|
|
if (data.bottomText) {
|
|
this.bottom_text = new Text(data.bottomText);
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = MusicShelf; |