Floby/node-libspotify — pull request #24 by swissmanu (2013-09-03 19:47:11+00:00)
Title: sp_album_cover implemented

hi florent
following pull request contains the implementation of `sp_album_cover` for the album object.

it adds the following methods to the album object:
* `coverImage(cb)`
* `smallCoverImage(cb)`
* `largeCoverImage(cb)`

each of them expects a function callback which will be called as soon as the cover image is loaded. the images raw data will be contained in the first function argument, represented inside a `Buffer`:

album.coverImage(function(buffer) {
if(buffer.length > 0) {
fs.writeFileSync('cover.jpg', buffer);
} else {
console.log('image was not available');
}
});

a unit test is included and should run successfully. further i allowed myself to update your package.json with the minimum requirement of node.js 0.10.0 since `node-libspotify` needs the new stream implementations.

please let me know if you want some modifications/improvements on the code. otherwise i'd be happy if you can use my addition to bring node-libspotify one step closer to completion.

cheers,
manu