public class Session extends Object
Session
instance is passed to all methods requiring previous authentication.Authenticator
Modifier and Type | Field and Description |
---|---|
private String |
apiKey |
private String |
key |
private String |
secret |
private boolean |
subscriber |
private String |
username |
Modifier | Constructor and Description |
---|---|
private |
Session() |
Modifier and Type | Method and Description |
---|---|
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() |
(package private) static Session |
sessionFromElement(DomElement element,
String apiKey,
String secret) |
String |
toString() |
private boolean subscriber
private Session()
public static Session createSession(String apiKey, String secret, String sessionKey)
apiKey
- An api keysecret
- A secretsessionKey
- The previously obtained session keypublic static Session createSession(String apiKey, String secret, String sessionKey, String username, boolean subscriber)
apiKey
- An api keysecret
- A secretsessionKey
- The previously obtained session keyusername
- A Last.fm usernamesubscriber
- Subscriber statuspublic boolean isSubscriber()
public String getUsername()
static Session sessionFromElement(DomElement element, String apiKey, String secret)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses