Package de.umass.lastfm
Class Session
- java.lang.Object
-
- de.umass.lastfm.Session
-
public class Session extends java.lang.ObjectContains Session data relevant for making API calls which require authentication. ASessioninstance is passed to all methods requiring previous authentication.- Author:
- Janni Kovacs
- See Also:
Authenticator
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SessioncreateSession(java.lang.String apiKey, java.lang.String secret, java.lang.String sessionKey)Restores a Session instance with the given session key.static SessioncreateSession(java.lang.String apiKey, java.lang.String secret, java.lang.String sessionKey, java.lang.String username, boolean subscriber)Restores a Session instance with the given session key.java.lang.StringgetApiKey()java.lang.StringgetKey()java.lang.StringgetSecret()java.lang.StringgetUsername()booleanisSubscriber()
-
-
-
Method Detail
-
createSession
public static Session createSession(java.lang.String apiKey, java.lang.String secret, java.lang.String sessionKey)
Restores a Session instance with the given session key.- Parameters:
apiKey- An api keysecret- A secretsessionKey- The previously obtained session key- Returns:
- a Session instance
-
createSession
public static Session createSession(java.lang.String apiKey, java.lang.String secret, java.lang.String sessionKey, java.lang.String username, boolean subscriber)
Restores a Session instance with the given session key.- Parameters:
apiKey- An api keysecret- A secretsessionKey- The previously obtained session keyusername- A Last.fm usernamesubscriber- Subscriber status- Returns:
- a Session instance
-
getSecret
public java.lang.String getSecret()
-
getApiKey
public java.lang.String getApiKey()
-
getKey
public java.lang.String getKey()
-
isSubscriber
public boolean isSubscriber()
-
getUsername
public java.lang.String getUsername()
-
-