All URIs are relative to https://trackme.lk/api/v1
Method | HTTP request | Description |
---|---|---|
getCurrentUser | GET /users/me | |
registerNewUser | POST /users | |
updateCurrentUser | PUT /users/me |
User getCurrentUser()
Get information about currently logged in user
// Import classes:
//import lk.trackme.client.api.UsersApi;
UsersApi apiInstance = new UsersApi();
try {
User result = apiInstance.getCurrentUser();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#getCurrentUser");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
User registerNewUser(body)
Register new user
// Import classes:
//import lk.trackme.client.api.UsersApi;
UsersApi apiInstance = new UsersApi();
User body = new User(); // User | user to add to the system
try {
User result = apiInstance.registerNewUser(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#registerNewUser");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | User | user to add to the system |
No authorization required
- Content-Type: application/json
- Accept: application/json
User updateCurrentUser(body)
Updates information about currently logged in user
// Import classes:
//import lk.trackme.client.api.UsersApi;
UsersApi apiInstance = new UsersApi();
User body = new User(); // User | user profile to update
try {
User result = apiInstance.updateCurrentUser(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#updateCurrentUser");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | User | user profile to update |
- Content-Type: application/json
- Accept: application/json