Grooveshark.downloadSongByNameAndArtist()

Download a song, and save it into a folder, by name and artist

Usage

Hover over inputs/exits for more info.

var Grooveshark = require('machinepack-grooveshark');


// Download a song, and save it into a folder, by name and artist

Grooveshark.downloadSongByNameAndArtist({

name: 'Bohemian Rhapsody',

artist: 'Queen',

path: '/www/music/userId/coolFolder',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Song not found, try with another name/artist

notFound: function () {

 

},

// It looks like we are banned by Grooveshark, please try again in a few hours

downloadLimitExceded: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

name required

Song name, not case sensitive

'Bohemian Rhapsody'
artist required

Artist name, not case sensitive

'Queen'
path required

ABSOLUTE Path to the folder where the song will be saved, if the folder doesn't exist it will be created

'/www/music/userId/coolFolder'

Exits

error

An unexpected error occurred.

notFound

Song not found, try with another name/artist

downloadLimitExceded

It looks like we are banned by Grooveshark, please try again in a few hours

success

OK.

'/www/music/userId/coolFolder/Bohemian Rhapsody.mp3'