Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
async function identifyAlbumsByArtistId(artistId, returnSimpleArray=true) {
//returns an array of albumIds that appear in the playlist, without duplicates
const arrayOfAlbumObjects = await spotifyApi.getArtistAlbums(artistId)
let albumIds = => {
if (returnSimpleArray) {
} else {
return ({albumId:, albumName:, albumUri: albumObj.uri})
albumIds = uniq(albumIds);
albumIds = shuffleArray(albumIds);
return albumIds;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.