refactor(Innertube#getPlaylists)!: Return a Feed instance instead of items

This commit is contained in:
LuanRT
2024-05-21 20:50:41 -03:00
parent b6ce5f903f
commit 766045049d

View File

@@ -328,13 +328,11 @@ export default class Innertube {
/**
* Retrieves playlists.
*/
async getPlaylists() {
async getPlaylists(): Promise<Feed<IBrowseResponse>> {
const response = await this.actions.execute(
BrowseEndpoint.PATH, { ...BrowseEndpoint.build({ browse_id: 'FEplaylist_aggregation' }), parse: true }
);
const feed = new Feed(this.actions, response);
return feed.playlists;
return new Feed(this.actions, response);
}
/**