Closed MellKam closed 8 months ago
Paginator will create request for every 20 tracks.
const playlistTracks = new Paginator((opts) => getPlaylistTracks(client, "6LPdVFowaGmmHu3nb20Mg3", opts) ); for await (const track of playlistTracks) { console.log(track); }
You can change the chunk size by setting limit in second argument.
const playlistTracks = new Paginator( (opts) => getPlaylistTracks(client, "6LPdVFowaGmmHu3nb20Mg3", opts), { limit: 50 } );
Paginator will create request for every 20 tracks.
You can change the chunk size by setting limit in second argument.