Created
March 7, 2012 16:03
-
-
Save kulte/1993977 to your computer and use it in GitHub Desktop.
Spotify API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Loading a Track | |
var track = Track.fromURI(uri, function(track) { | |
console.log(track.name + " loaded!"); | |
if (track.playable) | |
// handle case in which some tracks are not playable | |
[...] | |
}); | |
// Loading an Album | |
var album = Album.fromURI(uri, function(album) { | |
console.log(album.cover); // a URI of the album cover art | |
}); | |
// This is the pattern the entire API tends to follow... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment