Async generator that yields individual items across all pages, automatically following next_href pagination.
next_href
Function that fetches the first page of results
Function that fetches subsequent pages given a next_href URL
An async generator yielding individual items
import { paginateItems, searchTracks, scFetchUrl } from 'soundcloud-api-ts';const tracks = paginateItems( () => searchTracks(token, 'lofi'), (url) => scFetchUrl(url, token),);for await (const track of tracks) { console.log(track.title);} Copy
import { paginateItems, searchTracks, scFetchUrl } from 'soundcloud-api-ts';const tracks = paginateItems( () => searchTracks(token, 'lofi'), (url) => scFetchUrl(url, token),);for await (const track of tracks) { console.log(track.title);}
https://developers.soundcloud.com/docs/api/explorer/open-api
Async generator that yields individual items across all pages, automatically following
next_hrefpagination.