# swagger-java-client ## Requirements Building the API client library requires [Maven](https://maven.apache.org/) to be installed. ## Installation To install the API client library to your local Maven repository, simply execute: ```shell mvn install ``` To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: ```shell mvn deploy ``` Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. ### Maven users Add this dependency to your project's POM: ```xml io.swagger swagger-java-client 1.0.0 compile ``` ### Gradle users Add this dependency to your project's build file: ```groovy compile "io.swagger:swagger-java-client:1.0.0" ``` ### Others At first generate the JAR by executing: mvn package Then manually install the following JARs: * target/swagger-java-client-1.0.0.jar * target/lib/*.jar ## Getting Started Please follow the [installation](#installation) instruction and execute the following Java code: ```java import io.swagger.client.*; import io.swagger.client.auth.*; import io.swagger.client.model.*; import io.swagger.client.api.DefaultApi; import java.io.File; import java.util.*; public class DefaultApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); // Configure HTTP basic authorization: user HttpBasicAuth user = (HttpBasicAuth) defaultClient.getAuthentication("user"); user.setUsername("YOUR USERNAME"); user.setPassword("YOUR PASSWORD"); DefaultApi apiInstance = new DefaultApi(); String share = "share_example"; // String | The token of the share. try { Privilege result = apiInstance.addCurrentUserPrivilege(share); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DefaultApi#addCurrentUserPrivilege"); e.printStackTrace(); } } } ``` ## Documentation for API Endpoints All URIs are relative to *http://localhost/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DefaultApi* | [**addCurrentUserPrivilege**](docs/DefaultApi.md#addCurrentUserPrivilege) | **POST** /users/current/privileges | Add a privilege for the specified user. *DefaultApi* | [**addLocations**](docs/DefaultApi.md#addLocations) | **POST** /devices/current/locations | Updates the locations of the current device. *DefaultApi* | [**addNotice**](docs/DefaultApi.md#addNotice) | **POST** /notices | Adds a new notice and returns the notice as well as its location. *DefaultApi* | [**addUser**](docs/DefaultApi.md#addUser) | **POST** /users | Adds a user account with the specified roles and emails. *DefaultApi* | [**addUserPrivilege**](docs/DefaultApi.md#addUserPrivilege) | **POST** /users/{id}/privileges | Returns the privileges for a particular user. *DefaultApi* | [**createDevice**](docs/DefaultApi.md#createDevice) | **POST** /devices | Creates a new device and returns its handle. *DefaultApi* | [**createShare**](docs/DefaultApi.md#createShare) | **POST** /shares | Creates a new share. *DefaultApi* | [**deleteCurrentDevice**](docs/DefaultApi.md#deleteCurrentDevice) | **DELETE** /devices/current | Deletes the current device. *DefaultApi* | [**deleteDevice**](docs/DefaultApi.md#deleteDevice) | **DELETE** /devices/{id} | Deletes a device. *DefaultApi* | [**deletePrivilege**](docs/DefaultApi.md#deletePrivilege) | **DELETE** /privileges/{id} | Deletes a particular privilege. *DefaultApi* | [**deleteShare**](docs/DefaultApi.md#deleteShare) | **DELETE** /shares/{id} | Delete a share. *DefaultApi* | [**getActiveNotices**](docs/DefaultApi.md#getActiveNotices) | **GET** /notices/active | Returns a page of notices. *DefaultApi* | [**getBuildVersion**](docs/DefaultApi.md#getBuildVersion) | **GET** /versions/build | Returns the build version. *DefaultApi* | [**getCurrentDevice**](docs/DefaultApi.md#getCurrentDevice) | **GET** /devices/current | Returns the current device. *DefaultApi* | [**getCurrentUser**](docs/DefaultApi.md#getCurrentUser) | **GET** /users/current | Returns the user currently authorized. *DefaultApi* | [**getCurrentUserDevices**](docs/DefaultApi.md#getCurrentUserDevices) | **GET** /users/current/devices | Returns the list of devices for the current user. *DefaultApi* | [**getCurrentUserPlaces**](docs/DefaultApi.md#getCurrentUserPlaces) | **GET** /users/current/places | Returns the places for the current user. *DefaultApi* | [**getCurrentUserPrivileges**](docs/DefaultApi.md#getCurrentUserPrivileges) | **GET** /users/current/privileges | Returns the privileges for the current user. *DefaultApi* | [**getDevice**](docs/DefaultApi.md#getDevice) | **GET** /devices/{id} | Gets a device. *DefaultApi* | [**getDeviceLocation**](docs/DefaultApi.md#getDeviceLocation) | **GET** /devices/{id}/location | Gets the last device location. *DefaultApi* | [**getDeviceVisits**](docs/DefaultApi.md#getDeviceVisits) | **GET** /devices/{id}/visits | Gets the last device location. *DefaultApi* | [**getDevices**](docs/DefaultApi.md#getDevices) | **GET** /devices | Returns all devices. *DefaultApi* | [**getEntityStatistics**](docs/DefaultApi.md#getEntityStatistics) | **GET** /log/entities | Returns a list of entity statistics. *DefaultApi* | [**getLoadStatistic**](docs/DefaultApi.md#getLoadStatistic) | **GET** /log/load | Returns the current load statistic. *DefaultApi* | [**getLogMessages**](docs/DefaultApi.md#getLogMessages) | **GET** /log/messages | Returns a list of log messages starting from a particular id. *DefaultApi* | [**getNotice**](docs/DefaultApi.md#getNotice) | **GET** /notices/{id} | Returns the notice with the specified id. *DefaultApi* | [**getNotices**](docs/DefaultApi.md#getNotices) | **GET** /notices | Returns a page of notices. *DefaultApi* | [**getPlace**](docs/DefaultApi.md#getPlace) | **GET** /places/{id} | Returns the place with the specified id. *DefaultApi* | [**getPlaceVisits**](docs/DefaultApi.md#getPlaceVisits) | **GET** /places/{id}/visits | Returns the visits for a particular place. *DefaultApi* | [**getPrivilege**](docs/DefaultApi.md#getPrivilege) | **GET** /privileges/{id} | Returns the privileges for a particular user. *DefaultApi* | [**getPrivilegeLocation**](docs/DefaultApi.md#getPrivilegeLocation) | **GET** /privileges/{id}/location | Returns the location for a particular privilege. *DefaultApi* | [**getShare**](docs/DefaultApi.md#getShare) | **GET** /shares/{id} | Returns a share. *DefaultApi* | [**getShareInfo**](docs/DefaultApi.md#getShareInfo) | **GET** /shares/{token}/info | Get a share info by its secret token. *DefaultApi* | [**getShareLocation**](docs/DefaultApi.md#getShareLocation) | **GET** /shares/{token}/location | Get a shared location by its secret token. *DefaultApi* | [**getSystemStatistic**](docs/DefaultApi.md#getSystemStatistic) | **GET** /log/system | Returns the system statistic. *DefaultApi* | [**getUpdatedNotices**](docs/DefaultApi.md#getUpdatedNotices) | **GET** /notices/updated | Returns all active notices modified after the date. *DefaultApi* | [**getUser**](docs/DefaultApi.md#getUser) | **GET** /users/{id} | Returns the user account with the specified id. *DefaultApi* | [**getUserPlaces**](docs/DefaultApi.md#getUserPlaces) | **GET** /users/{id}/places | Returns the places for a particular user. *DefaultApi* | [**getUserPrivileges**](docs/DefaultApi.md#getUserPrivileges) | **GET** /users/{id}/privileges | Returns the privileges for a particular user. *DefaultApi* | [**getUsers**](docs/DefaultApi.md#getUsers) | **GET** /users | Returns a list of users. *DefaultApi* | [**registerUser**](docs/DefaultApi.md#registerUser) | **POST** /users/register | Registers a new user and sends an email account verification. *DefaultApi* | [**resetUser**](docs/DefaultApi.md#resetUser) | **POST** /users/reset | Sends a password reset email to the correspondence email account of a user. *DefaultApi* | [**resetUserPassword**](docs/DefaultApi.md#resetUserPassword) | **PUT** /users/password/{token} | Sets the password of a user account using a token received via email. *DefaultApi* | [**searchUsers**](docs/DefaultApi.md#searchUsers) | **GET** /users/search | Returns a list of users whose login name or name contains the term. *DefaultApi* | [**setCurrentPassword**](docs/DefaultApi.md#setCurrentPassword) | **PUT** /users/current/password | Sets the password of the currently authorized user. *DefaultApi* | [**setCurrentUser**](docs/DefaultApi.md#setCurrentUser) | **PUT** /users/current | Updates the currently authorized user. *DefaultApi* | [**setDevice**](docs/DefaultApi.md#setDevice) | **PUT** /devices/{id} | Sets the values of a device. *DefaultApi* | [**setNotice**](docs/DefaultApi.md#setNotice) | **PUT** /notices/{id} | Updates an existing notice. *DefaultApi* | [**setPlace**](docs/DefaultApi.md#setPlace) | **PUT** /places/{id} | Updates the place with the specified id. *DefaultApi* | [**setShare**](docs/DefaultApi.md#setShare) | **PUT** /shares/{id} | Updates an existing share. *DefaultApi* | [**setUser**](docs/DefaultApi.md#setUser) | **PUT** /users/{id} | Updates the values of a particular user account. *DefaultApi* | [**setUserPassword**](docs/DefaultApi.md#setUserPassword) | **PUT** /users/{id}/password | Sets the password of a user. *DefaultApi* | [**verifyUserEmail**](docs/DefaultApi.md#verifyUserEmail) | **PUT** /users/verify/{token} | Verifies an email address using a token received via email. *DeviceApi* | [**addLocations**](docs/DeviceApi.md#addLocations) | **POST** /devices/current/locations | Updates the locations of the current device. *DeviceApi* | [**createDevice**](docs/DeviceApi.md#createDevice) | **POST** /devices | Creates a new device and returns its handle. *DeviceApi* | [**deleteCurrentDevice**](docs/DeviceApi.md#deleteCurrentDevice) | **DELETE** /devices/current | Deletes the current device. *DeviceApi* | [**deleteDevice**](docs/DeviceApi.md#deleteDevice) | **DELETE** /devices/{id} | Deletes a device. *DeviceApi* | [**getCurrentDevice**](docs/DeviceApi.md#getCurrentDevice) | **GET** /devices/current | Returns the current device. *DeviceApi* | [**getCurrentUserDevices**](docs/DeviceApi.md#getCurrentUserDevices) | **GET** /users/current/devices | Returns the list of devices for the current user. *DeviceApi* | [**getDevice**](docs/DeviceApi.md#getDevice) | **GET** /devices/{id} | Gets a device. *DeviceApi* | [**getDeviceLocation**](docs/DeviceApi.md#getDeviceLocation) | **GET** /devices/{id}/location | Gets the last device location. *DeviceApi* | [**getDeviceVisits**](docs/DeviceApi.md#getDeviceVisits) | **GET** /devices/{id}/visits | Gets the last device location. *DeviceApi* | [**getDevices**](docs/DeviceApi.md#getDevices) | **GET** /devices | Returns all devices. *DeviceApi* | [**setDevice**](docs/DeviceApi.md#setDevice) | **PUT** /devices/{id} | Sets the values of a device. *PlaceApi* | [**getPlace**](docs/PlaceApi.md#getPlace) | **GET** /places/{id} | Returns the place with the specified id. *PlaceApi* | [**getPlaceVisits**](docs/PlaceApi.md#getPlaceVisits) | **GET** /places/{id}/visits | Returns the visits for a particular place. *PlaceApi* | [**setPlace**](docs/PlaceApi.md#setPlace) | **PUT** /places/{id} | Updates the place with the specified id. *PrivilegeApi* | [**deletePrivilege**](docs/PrivilegeApi.md#deletePrivilege) | **DELETE** /privileges/{id} | Deletes a particular privilege. *PrivilegeApi* | [**getPrivilege**](docs/PrivilegeApi.md#getPrivilege) | **GET** /privileges/{id} | Returns the privileges for a particular user. *PrivilegeApi* | [**getPrivilegeLocation**](docs/PrivilegeApi.md#getPrivilegeLocation) | **GET** /privileges/{id}/location | Returns the location for a particular privilege. *ServiceApi* | [**addNotice**](docs/ServiceApi.md#addNotice) | **POST** /notices | Adds a new notice and returns the notice as well as its location. *ServiceApi* | [**getActiveNotices**](docs/ServiceApi.md#getActiveNotices) | **GET** /notices/active | Returns a page of notices. *ServiceApi* | [**getBuildVersion**](docs/ServiceApi.md#getBuildVersion) | **GET** /versions/build | Returns the build version. *ServiceApi* | [**getEntityStatistics**](docs/ServiceApi.md#getEntityStatistics) | **GET** /log/entities | Returns a list of entity statistics. *ServiceApi* | [**getLoadStatistic**](docs/ServiceApi.md#getLoadStatistic) | **GET** /log/load | Returns the current load statistic. *ServiceApi* | [**getLogMessages**](docs/ServiceApi.md#getLogMessages) | **GET** /log/messages | Returns a list of log messages starting from a particular id. *ServiceApi* | [**getNotice**](docs/ServiceApi.md#getNotice) | **GET** /notices/{id} | Returns the notice with the specified id. *ServiceApi* | [**getNotices**](docs/ServiceApi.md#getNotices) | **GET** /notices | Returns a page of notices. *ServiceApi* | [**getSystemStatistic**](docs/ServiceApi.md#getSystemStatistic) | **GET** /log/system | Returns the system statistic. *ServiceApi* | [**getUpdatedNotices**](docs/ServiceApi.md#getUpdatedNotices) | **GET** /notices/updated | Returns all active notices modified after the date. *ServiceApi* | [**setNotice**](docs/ServiceApi.md#setNotice) | **PUT** /notices/{id} | Updates an existing notice. *ShareApi* | [**createShare**](docs/ShareApi.md#createShare) | **POST** /shares | Creates a new share. *ShareApi* | [**deleteShare**](docs/ShareApi.md#deleteShare) | **DELETE** /shares/{id} | Delete a share. *ShareApi* | [**getShare**](docs/ShareApi.md#getShare) | **GET** /shares/{id} | Returns a share. *ShareApi* | [**getShareInfo**](docs/ShareApi.md#getShareInfo) | **GET** /shares/{token}/info | Get a share info by its secret token. *ShareApi* | [**getShareLocation**](docs/ShareApi.md#getShareLocation) | **GET** /shares/{token}/location | Get a shared location by its secret token. *ShareApi* | [**setShare**](docs/ShareApi.md#setShare) | **PUT** /shares/{id} | Updates an existing share. *UserApi* | [**addCurrentUserPrivilege**](docs/UserApi.md#addCurrentUserPrivilege) | **POST** /users/current/privileges | Add a privilege for the specified user. *UserApi* | [**addUser**](docs/UserApi.md#addUser) | **POST** /users | Adds a user account with the specified roles and emails. *UserApi* | [**addUserPrivilege**](docs/UserApi.md#addUserPrivilege) | **POST** /users/{id}/privileges | Returns the privileges for a particular user. *UserApi* | [**getCurrentUser**](docs/UserApi.md#getCurrentUser) | **GET** /users/current | Returns the user currently authorized. *UserApi* | [**getCurrentUserPlaces**](docs/UserApi.md#getCurrentUserPlaces) | **GET** /users/current/places | Returns the places for the current user. *UserApi* | [**getCurrentUserPrivileges**](docs/UserApi.md#getCurrentUserPrivileges) | **GET** /users/current/privileges | Returns the privileges for the current user. *UserApi* | [**getUser**](docs/UserApi.md#getUser) | **GET** /users/{id} | Returns the user account with the specified id. *UserApi* | [**getUserPlaces**](docs/UserApi.md#getUserPlaces) | **GET** /users/{id}/places | Returns the places for a particular user. *UserApi* | [**getUserPrivileges**](docs/UserApi.md#getUserPrivileges) | **GET** /users/{id}/privileges | Returns the privileges for a particular user. *UserApi* | [**getUsers**](docs/UserApi.md#getUsers) | **GET** /users | Returns a list of users. *UserApi* | [**registerUser**](docs/UserApi.md#registerUser) | **POST** /users/register | Registers a new user and sends an email account verification. *UserApi* | [**resetUser**](docs/UserApi.md#resetUser) | **POST** /users/reset | Sends a password reset email to the correspondence email account of a user. *UserApi* | [**resetUserPassword**](docs/UserApi.md#resetUserPassword) | **PUT** /users/password/{token} | Sets the password of a user account using a token received via email. *UserApi* | [**searchUsers**](docs/UserApi.md#searchUsers) | **GET** /users/search | Returns a list of users whose login name or name contains the term. *UserApi* | [**setCurrentPassword**](docs/UserApi.md#setCurrentPassword) | **PUT** /users/current/password | Sets the password of the currently authorized user. *UserApi* | [**setCurrentUser**](docs/UserApi.md#setCurrentUser) | **PUT** /users/current | Updates the currently authorized user. *UserApi* | [**setUser**](docs/UserApi.md#setUser) | **PUT** /users/{id} | Updates the values of a particular user account. *UserApi* | [**setUserPassword**](docs/UserApi.md#setUserPassword) | **PUT** /users/{id}/password | Sets the password of a user. *UserApi* | [**verifyUserEmail**](docs/UserApi.md#verifyUserEmail) | **PUT** /users/verify/{token} | Verifies an email address using a token received via email. ## Documentation for Models - [BuildVersion](docs/BuildVersion.md) - [Coordinate](docs/Coordinate.md) - [Device](docs/Device.md) - [DeviceHandle](docs/DeviceHandle.md) - [DeviceInfo](docs/DeviceInfo.md) - [DevicePage](docs/DevicePage.md) - [Email](docs/Email.md) - [EntityStatistic](docs/EntityStatistic.md) - [LoadStatistic](docs/LoadStatistic.md) - [Location](docs/Location.md) - [LocationUpdate](docs/LocationUpdate.md) - [LogMessage](docs/LogMessage.md) - [Message](docs/Message.md) - [Notice](docs/Notice.md) - [NoticePage](docs/NoticePage.md) - [Place](docs/Place.md) - [PlacePage](docs/PlacePage.md) - [Privilege](docs/Privilege.md) - [PrivilegePage](docs/PrivilegePage.md) - [ReleasedLocation](docs/ReleasedLocation.md) - [Share](docs/Share.md) - [ShareInfo](docs/ShareInfo.md) - [User](docs/User.md) - [UserPage](docs/UserPage.md) - [UserPassword](docs/UserPassword.md) - [UserRegistration](docs/UserRegistration.md) - [Visit](docs/Visit.md) - [VisitPage](docs/VisitPage.md) ## Documentation for Authorization Authentication schemes defined for the API: ### admin - **Type**: HTTP basic authentication ### device - **Type**: API key - **API key parameter name**: Authorization - **Location**: HTTP header ### user - **Type**: HTTP basic authentication ## Recommendation It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. ## Author nes-admin@uni-due.de