Package wappsto.api.rest.session
Class RestSession
- java.lang.Object
-
- wappsto.api.rest.session.RestSession
-
-
Field Summary
Fields Modifier and Type Field Description javax.ws.rs.client.WebTargetservice
-
Constructor Summary
Constructors Constructor Description RestSession(java.lang.String id, java.lang.String serviceUrl)Instantiates a session object from an existing session IDRestSession(Credentials credentials, java.lang.String serviceUrl)The base class for API sessions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserResponsefetchUser(java.lang.String username)Fetch a user by username.
-
-
-
Constructor Detail
-
RestSession
public RestSession(Credentials credentials, java.lang.String serviceUrl) throws java.lang.Exception
The base class for API sessions- Parameters:
credentials- Login credentialsserviceUrl- URL to the API- Throws:
java.lang.Exception
-
RestSession
public RestSession(java.lang.String id, java.lang.String serviceUrl)Instantiates a session object from an existing session ID- Parameters:
id- Session IDserviceUrl- URL to the API
-
-
Method Detail
-
fetchUser
public UserResponse fetchUser(java.lang.String username) throws java.lang.Exception
Fetch a user by username. Currently, only the username gets deserialized from the server response, so this method is only useful for validating the correctness of other methods.
-
-