Base
Class GroovesharkClient

java.lang.Object
  extended by Base.GroovesharkClient
All Implemented Interfaces:
java.io.Serializable

public class GroovesharkClient
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 java.lang.String client
           
 java.lang.String clientRevision
           
 java.lang.String staticRandomizer
           
 boolean UseGZip
           
 
Constructor Summary
GroovesharkClient(boolean ConnectJustInTime)
          Initialized the GroovesharkClient
GroovesharkClient(boolean ConnectJustInTime, java.lang.String GrooveFixData)
          Initialized the GroovesharkClient with GrooveFixData from a String
 
Method Summary
 java.lang.String CommunicationToken()
           
 Base.GroovesharkCountry Country()
           
 java.lang.String Cowbell()
           
 Functions.GetArtistAutocomplete.GetArtistAutocompleteResponse GetArtistAutocomplete(java.lang.String search)
          Searches for Artists beginning with your search
 Base.GroovesharkAudioStream GetMusicStream(int SongId)
           
 Functions.UserGetPlaylists.UserGetPlaylistsResponse GetPlaylists(int userId)
          Get the playlists of a user
 Functions.PlaylistGetSongs.PlaylistGetSongsResponse GetPlaylistSongs(int playlistId)
          Fetches the songs from a playlist
 Functions.ArtistGetSongs.ArtistGetSongsResponse GetSongsByArtist(Functions.SearchArtist.SearchArtistResult song)
          Searches for songs by the same artist of the song.
 Functions.AlbumGetSongs.AlbumGetSongsResponse GetSongsFromAlbum(Functions.SearchArtist.SearchArtistResult song)
          Searches for songs in the same album of the song.
 boolean isConnected()
           
 Functions.AuthenticateUserEx.AuthenticateUserExResponse Login(java.lang.String user, java.lang.String pass)
          Logins into the grooveshark(tm) service.
 Functions.LogoutUser.LogoutUserResponse Logout()
          Logs out
 Functions.PopularSongs.popularGetSongsResultsResponse PopularSongs()
          Searches for popular Songs
 void Reconnect()
          Reconnects the api
 Functions.SearchArtist.getSearchArtistResultsResponse SearchArtist(java.lang.String Search)
          Searches for Songs
 Functions.SearchArtist.getSearchArtistResultsResponse SearchArtist(java.lang.String Search, int Limit)
           
 java.lang.String SecretKey()
           
 java.lang.String SessionID()
           
 java.lang.String UserId()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

public java.lang.String client

clientRevision

public java.lang.String clientRevision

staticRandomizer

public java.lang.String staticRandomizer

UseGZip

public boolean UseGZip
Constructor Detail

GroovesharkClient

public GroovesharkClient(boolean ConnectJustInTime)
                  throws java.lang.Exception
Initialized the GroovesharkClient

Parameters:
ConnectJustInTime - Should the api connect now or then when needed?
Throws:
java.lang.Exception

GroovesharkClient

public GroovesharkClient(boolean ConnectJustInTime,
                         java.lang.String GrooveFixData)
                  throws java.lang.Exception
Initialized the GroovesharkClient with GrooveFixData from a String

Parameters:
ConnectJustInTime - Should the api connect now or then when needed?
GrooveFixData - The XML String to parse that contains the GrooveFixData
Throws:
java.lang.Exception
Method Detail

GetMusicStream

public Base.GroovesharkAudioStream GetMusicStream(int SongId)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

PopularSongs

public Functions.PopularSongs.popularGetSongsResultsResponse PopularSongs()
                                                                   throws java.lang.Exception
Searches for popular Songs

Returns:
A list of PopularSongs
Throws:
java.lang.Exception

Reconnect

public void Reconnect()
               throws java.lang.Exception
Reconnects the api

Throws:
java.lang.Exception

SearchArtist

public Functions.SearchArtist.getSearchArtistResultsResponse SearchArtist(java.lang.String Search)
                                                                   throws java.lang.Exception
Searches for Songs

Parameters:
Search - A string to search for
Returns:
Songs that fitting the search
Throws:
java.lang.Exception

SearchArtist

public Functions.SearchArtist.getSearchArtistResultsResponse SearchArtist(java.lang.String Search,
                                                                          int Limit)
                                                                   throws java.lang.Exception
Throws:
java.lang.Exception

GetSongsFromAlbum

public Functions.AlbumGetSongs.AlbumGetSongsResponse GetSongsFromAlbum(Functions.SearchArtist.SearchArtistResult song)
                                                                throws java.lang.Exception
Searches for songs in the same album of the song.

Parameters:
song - Song
Returns:
Songs in the same album
Throws:
java.lang.Exception

GetSongsByArtist

public Functions.ArtistGetSongs.ArtistGetSongsResponse GetSongsByArtist(Functions.SearchArtist.SearchArtistResult song)
                                                                 throws java.lang.Exception
Searches for songs by the same artist of the song.

Parameters:
song - Song
Returns:
Songs by the same artist
Throws:
java.lang.Exception

Login

public Functions.AuthenticateUserEx.AuthenticateUserExResponse Login(java.lang.String user,
                                                                     java.lang.String pass)
                                                              throws java.lang.Exception
Logins into the grooveshark(tm) service. Needed when you want to get a list of your playlists. When authReal=1 you are successfully logged on.

Parameters:
user - Username
pass - Password
Returns:
Throws:
java.lang.Exception

Logout

public Functions.LogoutUser.LogoutUserResponse Logout()
                                               throws java.lang.Exception
Logs out

Returns:
Throws:
java.lang.Exception

GetArtistAutocomplete

public Functions.GetArtistAutocomplete.GetArtistAutocompleteResponse GetArtistAutocomplete(java.lang.String search)
                                                                                    throws java.lang.Exception
Searches for Artists beginning with your search

Parameters:
search - beginning of an artist name
Returns:
Throws:
java.lang.Exception

GetPlaylists

public Functions.UserGetPlaylists.UserGetPlaylistsResponse GetPlaylists(int userId)
                                                                 throws java.lang.Exception
Get the playlists of a user

Parameters:
userId - The userid of the user. Can be fetched over the login
Returns:
Throws:
java.lang.Exception

GetPlaylistSongs

public Functions.PlaylistGetSongs.PlaylistGetSongsResponse GetPlaylistSongs(int playlistId)
                                                                     throws java.lang.Exception
Fetches the songs from a playlist

Parameters:
playlistId - playlists id
Returns:
Throws:
java.lang.Exception

CommunicationToken

public java.lang.String CommunicationToken()

Country

public Base.GroovesharkCountry Country()

Cowbell

public java.lang.String Cowbell()

isConnected

public boolean isConnected()

SecretKey

public java.lang.String SecretKey()

SessionID

public java.lang.String SessionID()

UserId

public java.lang.String UserId()