Skip to content

Instantly share code, notes, and snippets.

@JonathanZWhite
Created April 17, 2016 20:10
Show Gist options
  • Save JonathanZWhite/ec168a035f6db2582d05aee3b31b1293 to your computer and use it in GitHub Desktop.
Save JonathanZWhite/ec168a035f6db2582d05aee3b31b1293 to your computer and use it in GitHub Desktop.
(function(module) {
function getRecommendation(selectedGenre, limit) {
...
return Promise.resolve()
.then(getSpotifyAccessToken)
.then(getRecommendation)
function getRecommendation() {
return spotify.getRecommendations({
seed_genres: selectedGenre,
limit: limit
})
.then((resp) => {
return _parseForTrackList(resp.body.tracks, limit)
})
}
}
...
}(exports));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment