feat(ytmusic): add support for artists

Available through `Innertube#music.getArtist(id: string)`

#78
This commit is contained in:
LuanRT
2022-06-20 06:08:24 -03:00
parent 99b88e2684
commit 7fc9b526b0
13 changed files with 142 additions and 22 deletions

View 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;