Skip to content

Latest commit

 

History

History
136 lines (91 loc) · 2.82 KB

UsersApi.md

File metadata and controls

136 lines (91 loc) · 2.82 KB

UsersApi

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

getCurrentUser

User getCurrentUser()

Get information about currently logged in user

Example

// 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();
}

Parameters

This endpoint does not need any parameter.

Return type

User

Authorization

TrackMe-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

registerNewUser

User registerNewUser(body)

Register new user

Example

// 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();
}

Parameters

Name Type Description Notes
body User user to add to the system

Return type

User

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateCurrentUser

User updateCurrentUser(body)

Updates information about currently logged in user

Example

// 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();
}

Parameters

Name Type Description Notes
body User user profile to update

Return type

User

Authorization

TrackMe-Api-Key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json