Package de.umass.lastfm
Class Session
- java.lang.Object
-
- de.umass.lastfm.Session
-
public class Session extends java.lang.Object
Contains Session data relevant for making API calls which require authentication. ASession
instance 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 Session
createSession(java.lang.String apiKey, java.lang.String secret, java.lang.String sessionKey)
Restores a Session instance with the given session key.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.java.lang.String
getApiKey()
java.lang.String
getKey()
java.lang.String
getSecret()
java.lang.String
getUsername()
boolean
isSubscriber()
-
-
-
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()
-
-