Grooveshark Ruby

Grooveshark Ruby is an unofficial wrapper for the Grooveshark API.

Getting started

You can install Grooveshark Ruby with the following command,

gem install grooveshark-ruby

Before you can invoke any of the methods, make sure to require the gem,

require 'grooveshark-ruby'

Most of the commands seen here require an API key which can be requested through the website. Please refer to the API for information on which methods require a key. Start a new session with,

derp = Grooveshark.new(key, secret)

If you do not have a key or secret, simply use '' for both of them. Again, I have no idea which methods require a key, so you’re best to simply request one. There are 3 different ways to authenticate a user, though the website seems to recommend:

derp.authenticate('username', 'password')

From this point you can make requests to the Grooveshark server. For example,

derp.getPopularSongsToday

will return a list of the day’s popular songs.

As always, don’t forget to logout,

a.logout

Does it work or not? A list of methods

The lists below are a near-complete collection of methods offered by the API. The method names are verbatim with the API page. Methods that aren’t included on the website are not included in this gem for now - presumably because they don’t work properly. The full list can be found by invoking getServiceDescription.

For more information on the methods and their parameters, please refer to the API.

Added by myself and required to create a token

Working

Sorta working

These methods are working, but with awkward glitches.

Not working

The following methods are not working at all and it is unclear whether this is the fault of the wrapper or the API itself. More testing is required.

Not enough permissions with standard API key

These methods are not aloud by standard API key holders. See the API for information on how you can increase your permissions

Not tested

Credits

Much of the code to post requests to the grooveshark server is based off of a now outdated grooveshark gem by sosedoff.