co.arcs.groove.thresher
Class Client

java.lang.Object
  extended by co.arcs.groove.thresher.Client

public class Client
extends Object


Constructor Summary
Client()
           
 
Method Summary
 InputStream getStream(long songId)
           
 InputStream getStream(Song song)
           
 com.belladati.httpclientandroidlib.HttpResponse getStreamResponse(long songId)
           
 com.belladati.httpclientandroidlib.HttpResponse getStreamResponse(Song song)
           
 URL getStreamUrl(long songId)
           
 URL getStreamUrl(Song song)
           
 User getUser()
           
 User login(String username, String password)
          Logs in as the given user, allowing access to various authentication-requiring methods in the User class.
 List<Song> searchPopularSongs()
           
 List<Song> searchSongs(String query)
           
 void setDebugLoggingEnabled(boolean enabled)
          Set whether debug information is written to standard output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()
Method Detail

getStream

public InputStream getStream(Song song)
                      throws IOException,
                             GroovesharkException
Throws:
IOException
GroovesharkException

getStream

public InputStream getStream(long songId)
                      throws IOException,
                             GroovesharkException
Throws:
IOException
GroovesharkException

getStreamResponse

public com.belladati.httpclientandroidlib.HttpResponse getStreamResponse(Song song)
                                                                  throws IOException,
                                                                         GroovesharkException
Throws:
IOException
GroovesharkException

getStreamResponse

public com.belladati.httpclientandroidlib.HttpResponse getStreamResponse(long songId)
                                                                  throws IOException,
                                                                         GroovesharkException
Throws:
IOException
GroovesharkException

getStreamUrl

public URL getStreamUrl(Song song)
                 throws IOException,
                        GroovesharkException
Throws:
IOException
GroovesharkException

getStreamUrl

public URL getStreamUrl(long songId)
                 throws IOException,
                        GroovesharkException
Throws:
IOException
GroovesharkException

searchSongs

public List<Song> searchSongs(String query)
                       throws IOException,
                              GroovesharkException
Throws:
IOException
GroovesharkException

searchPopularSongs

public List<Song> searchPopularSongs()
                              throws IOException,
                                     GroovesharkException
Throws:
IOException
GroovesharkException

login

public User login(String username,
                  String password)
           throws IOException,
                  GroovesharkException
Logs in as the given user, allowing access to various authentication-requiring methods in the User class.

Parameters:
username -
password -
Returns:
The logged in user. Also available via getUser();
Throws:
IOException
GroovesharkException

getUser

@Nullable
public User getUser()
Returns:
The user that logged in via this client, or null.

setDebugLoggingEnabled

public void setDebugLoggingEnabled(boolean enabled)
Set whether debug information is written to standard output. Default value is disabled.



Copyright © 2014. All rights reserved.