Package wappsto.api.rest.session
Class RestAdmin
- java.lang.Object
-
- wappsto.api.rest.session.RestSession
-
- wappsto.api.rest.session.RestAdmin
-
public class RestAdmin extends RestSession implements Admin
-
-
Field Summary
-
Fields inherited from class wappsto.api.rest.session.RestSession
service
-
-
Constructor Summary
Constructors Constructor Description RestAdmin(AdminCredentials credentials, java.lang.String serviceUrl)An API session with admin privileges
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(java.lang.String username)Delete an existing user by usernamejava.lang.StringgetId()Get the session IDvoidregister(Credentials credentials)Register a new user with the given credentials-
Methods inherited from class wappsto.api.rest.session.RestSession
fetchUser
-
-
-
-
Constructor Detail
-
RestAdmin
public RestAdmin(AdminCredentials credentials, java.lang.String serviceUrl) throws java.lang.Exception
An API session with admin privileges- Parameters:
credentials- Admin username and password used to log in and retrieve the sessionserviceUrl- URL to the API- Throws:
java.lang.Exception- Throws an HttpException if admin credentials or API URL are invalid
-
-
Method Detail
-
register
public void register(Credentials credentials) throws java.lang.Exception
Register a new user with the given credentials
-
delete
public void delete(java.lang.String username) throws java.lang.ExceptionDelete an existing user by username
-
-