Skip to content

v0.2.4

Choose a tag to compare

@zackradisic zackradisic released this 21 Jan 08:54
· 30 commits to master since this release

New

Options for scdl.search()

You can now invoke scdl.search() with a SearchOptions object which changes the behaviour of the fuction:

const querySearch = await scdl.search({ 
  query: 'sdfjdksf',
  resourceType: 'tracks',
  limit: 100, // How many items to return, defaults to 10 if not specified
  offset: 0 // How many items to offset by (used for pagination), defaults to 0 if not specified
})

// Get the next page of data:
const nextPage = await scdl.search({
  nextHref: querySearch.next_href
})

URL utility functions

isPlaylistURL, isPersonalizedTrackURL, and isFirebaseURL can be used to determine the type of an input url.