Package de.umass.lastfm
Class Session
java.lang.Object
de.umass.lastfm.Session
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:
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.getKey()
boolean
-
Method Details
-
createSession
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(String apiKey, String secret, String sessionKey, 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
-
getApiKey
-
getKey
-
isSubscriber
public boolean isSubscriber() -
getUsername
-