mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-03 09:35:05 +00:00
feat(ytmusic): add support for artists
Available through `Innertube#music.getArtist(id: string)` #78
This commit is contained in:
22
lib/parser/contents/classes/MusicPlaylistShelf.js
Normal file
22
lib/parser/contents/classes/MusicPlaylistShelf.js
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
const Parser = require('..');
|
||||
|
||||
class MusicPlaylistShelf {
|
||||
type = 'MusicPlaylistShelf';
|
||||
|
||||
#continuations;
|
||||
|
||||
constructor(data) {
|
||||
this.playlist_id = data.playlistId;
|
||||
this.contents = Parser.parse(data.contents);
|
||||
this.collapsed_item_count = data.collapsedItemCount;
|
||||
this.#continuations = data.continuations;
|
||||
}
|
||||
|
||||
get continuation() {
|
||||
return this.#continuations?.[0]?.nextContinuationData;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = MusicPlaylistShelf;
|
||||
Reference in New Issue
Block a user