Thresher
An unofficial API for Grooveshark, in Java.
Download
With Maven:
<dependency>
<groupId>co.arcs.groove</groupId>
<artifactId>thresher</artifactId>
<version>X.X.X</version>
</dependency>
Or Gradle:
compile 'co.arcs.groove:thresher:X.X.X'
Find the latest version on maven central.
Usage
All API requests go through a client object:
client = new Client();
Search
By keyword:
client.search("clair de lune");
For popular songs:
client.searchPopularSongs();
Stream
Get a short-lived song URL:
client.getStreamUrl(Song);
Log in
Log in to get access a user's data:
user = client.login("username", "hunter2");
List the contents of their library and favorites:
user.library().get();
user.favorites().get();
Add or remove songs:
user.library().add(song);
user.library().remove(song);
user.favorites().add(song);
user.favorites().remove(song);
Build / Test
To build and run tests against the real servers:
mvn clean test
Notes
Bug reports and pull requests are much appreciated.
Thanks to sosedoff and contributors for providing API information in their Ruby library.
Licence
Apache 2.0. See LICENCE.txt for details.