de.umass.lastfm
Class Session

java.lang.Object
  extended by de.umass.lastfm.Session

public class Session
extends Object

Contains Session data relevant for making API calls which require authentication. A Session instance is passed to all methods requiring previous authentication.

Author:
Janni Kovacs
See Also:
Authenticator

Method Summary
static Session createSession(String apiKey, String secret, String sessionKey)
          Restores a Session instance with the given session key.
static Session createSession(String apiKey, String secret, String sessionKey, String username, boolean subscriber)
          Restores a Session instance with the given session key.
 String getApiKey()
           
 String getKey()
           
 String getSecret()
           
 String getUsername()
           
 boolean isSubscriber()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSession

public static Session createSession(String apiKey,
                                    String secret,
                                    String sessionKey)
Restores a Session instance with the given session key.

Parameters:
apiKey - An api key
secret - A secret
sessionKey - The previously obtained session key
Returns:
a Session instance

createSession

public static Session createSession(String apiKey,
                                    String secret,
                                    String sessionKey,
                                    String username,
                                    boolean subscriber)
Restores a Session instance with the given session key.

Parameters:
apiKey - An api key
secret - A secret
sessionKey - The previously obtained session key
username - A Last.fm username
subscriber - Subscriber status
Returns:
a Session instance

getSecret

public String getSecret()

getApiKey

public String getApiKey()

getKey

public String getKey()

isSubscriber

public boolean isSubscriber()

getUsername

public String getUsername()