Add generated client
This commit is contained in:
14
client/docs/Application.md
Normal file
14
client/docs/Application.md
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
# Application
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**description** | **String** | The description of the application. |
|
||||
**id** | **Integer** | The application id. |
|
||||
**image** | **String** | The image of the application. |
|
||||
**name** | **String** | The application name. This is how the application should be displayed to the user. |
|
||||
**token** | **String** | The application token. Can be used as `appToken`. See Authentication. |
|
||||
|
||||
|
||||
|
||||
12
client/docs/Client.md
Normal file
12
client/docs/Client.md
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
# Client
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | The client id. |
|
||||
**name** | **String** | The client name. This is how the client should be displayed to the user. |
|
||||
**token** | **String** | The client token. Can be used as `clientToken`. See Authentication. |
|
||||
|
||||
|
||||
|
||||
12
client/docs/Error.md
Normal file
12
client/docs/Error.md
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
# Error
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**error** | **String** | The general error message |
|
||||
**errorCode** | **Long** | The http error code. |
|
||||
**errorDescription** | **String** | The http error code. |
|
||||
|
||||
|
||||
|
||||
15
client/docs/Message.md
Normal file
15
client/docs/Message.md
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
# Message
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**appid** | **Integer** | The application id that send this message. |
|
||||
**date** | [**OffsetDateTime**](OffsetDateTime.md) | The date the message was created. |
|
||||
**id** | **Integer** | The message id. |
|
||||
**message** | **String** | The actual message. |
|
||||
**priority** | **Long** | The priority of the message. | [optional]
|
||||
**title** | **String** | The title of the message. |
|
||||
|
||||
|
||||
|
||||
455
client/docs/MessageApi.md
Normal file
455
client/docs/MessageApi.md
Normal file
@@ -0,0 +1,455 @@
|
||||
# MessageApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createMessage**](MessageApi.md#createMessage) | **POST** /message | Create a message.
|
||||
[**deleteAppMessages**](MessageApi.md#deleteAppMessages) | **DELETE** /application/{id}/message | Delete all messages from a specific application.
|
||||
[**deleteMessage**](MessageApi.md#deleteMessage) | **DELETE** /message/{id} | Deletes a message with an id.
|
||||
[**deleteMessages**](MessageApi.md#deleteMessages) | **DELETE** /message | Delete all messages.
|
||||
[**getAppMessages**](MessageApi.md#getAppMessages) | **GET** /application/{id}/message | Return all messages from a specific application.
|
||||
[**getMessages**](MessageApi.md#getMessages) | **GET** /message | Return all messages.
|
||||
[**streamMessages**](MessageApi.md#streamMessages) | **GET** /stream | Websocket, return newly created messages.
|
||||
|
||||
|
||||
<a name="createMessage"></a>
|
||||
# **createMessage**
|
||||
> Message createMessage(body)
|
||||
|
||||
Create a message.
|
||||
|
||||
__NOTE__: This API ONLY accepts an application token as authentication.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.MessageApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: appTokenHeader
|
||||
ApiKeyAuth appTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("appTokenHeader");
|
||||
appTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//appTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: appTokenQuery
|
||||
ApiKeyAuth appTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("appTokenQuery");
|
||||
appTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//appTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Message body = new Message(); // Message | the message to add
|
||||
try {
|
||||
Message result = apiInstance.createMessage(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MessageApi#createMessage");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Message**](Message.md)| the message to add |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Message**](Message.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[appTokenHeader](../README.md#appTokenHeader), [appTokenQuery](../README.md#appTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteAppMessages"></a>
|
||||
# **deleteAppMessages**
|
||||
> deleteAppMessages(id)
|
||||
|
||||
Delete all messages from a specific application.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.MessageApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer id = 56; // Integer | the application id
|
||||
try {
|
||||
apiInstance.deleteAppMessages(id);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MessageApi#deleteAppMessages");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the application id |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteMessage"></a>
|
||||
# **deleteMessage**
|
||||
> deleteMessage(id)
|
||||
|
||||
Deletes a message with an id.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.MessageApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer id = 56; // Integer | the message id
|
||||
try {
|
||||
apiInstance.deleteMessage(id);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MessageApi#deleteMessage");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the message id |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteMessages"></a>
|
||||
# **deleteMessages**
|
||||
> deleteMessages()
|
||||
|
||||
Delete all messages.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.MessageApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
try {
|
||||
apiInstance.deleteMessages();
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MessageApi#deleteMessages");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getAppMessages"></a>
|
||||
# **getAppMessages**
|
||||
> PagedMessages getAppMessages(id, limit, since)
|
||||
|
||||
Return all messages from a specific application.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.MessageApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer id = 56; // Integer | the application id
|
||||
Integer limit = 100; // Integer | the maximal amount of messages to return
|
||||
Integer since = 56; // Integer | return all messages with an ID less than this value
|
||||
try {
|
||||
PagedMessages result = apiInstance.getAppMessages(id, limit, since);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MessageApi#getAppMessages");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the application id |
|
||||
**limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100]
|
||||
**since** | **Integer**| return all messages with an ID less than this value | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**PagedMessages**](PagedMessages.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getMessages"></a>
|
||||
# **getMessages**
|
||||
> PagedMessages getMessages(limit, since)
|
||||
|
||||
Return all messages.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.MessageApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer limit = 100; // Integer | the maximal amount of messages to return
|
||||
Integer since = 56; // Integer | return all messages with an ID less than this value
|
||||
try {
|
||||
PagedMessages result = apiInstance.getMessages(limit, since);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MessageApi#getMessages");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100]
|
||||
**since** | **Integer**| return all messages with an ID less than this value | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**PagedMessages**](PagedMessages.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="streamMessages"></a>
|
||||
# **streamMessages**
|
||||
> Message streamMessages()
|
||||
|
||||
Websocket, return newly created messages.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.MessageApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
try {
|
||||
Message result = apiInstance.streamMessages();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling MessageApi#streamMessages");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**Message**](Message.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
11
client/docs/PagedMessages.md
Normal file
11
client/docs/PagedMessages.md
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
# PagedMessages
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**messages** | [**List<Message>**](Message.md) | The messages. |
|
||||
**paging** | [**Paging**](Paging.md) | |
|
||||
|
||||
|
||||
|
||||
13
client/docs/Paging.md
Normal file
13
client/docs/Paging.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# Paging
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**limit** | **Long** | The limit of the messages for the current request. |
|
||||
**next** | **String** | The request url for the next page. Empty/Null when no next page is available. | [optional]
|
||||
**since** | **Integer** | The ID of the last message returned in the current request. Use this as alternative to the next link. |
|
||||
**size** | **Long** | The amount of messages that got returned in the current request. |
|
||||
|
||||
|
||||
|
||||
457
client/docs/TokenApi.md
Normal file
457
client/docs/TokenApi.md
Normal file
@@ -0,0 +1,457 @@
|
||||
# TokenApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createApp**](TokenApi.md#createApp) | **POST** /application | Create an application.
|
||||
[**createClient**](TokenApi.md#createClient) | **POST** /client | Create a client.
|
||||
[**deleteApp**](TokenApi.md#deleteApp) | **DELETE** /application/{id} | Delete an application.
|
||||
[**deleteClient**](TokenApi.md#deleteClient) | **DELETE** /client/{id} | Delete a client.
|
||||
[**getApps**](TokenApi.md#getApps) | **GET** /application | Return all applications.
|
||||
[**getClients**](TokenApi.md#getClients) | **GET** /client | Return all clients.
|
||||
[**uploadAppImage**](TokenApi.md#uploadAppImage) | **POST** /application/{id}/image |
|
||||
|
||||
|
||||
<a name="createApp"></a>
|
||||
# **createApp**
|
||||
> Application createApp(body)
|
||||
|
||||
Create an application.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
Application body = new Application(); // Application | the application to add
|
||||
try {
|
||||
Application result = apiInstance.createApp(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#createApp");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Application**](Application.md)| the application to add |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Application**](Application.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="createClient"></a>
|
||||
# **createClient**
|
||||
> Client createClient(body)
|
||||
|
||||
Create a client.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
Client body = new Client(); // Client | the client to add
|
||||
try {
|
||||
Client result = apiInstance.createClient(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#createClient");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Client**](Client.md)| the client to add |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteApp"></a>
|
||||
# **deleteApp**
|
||||
> deleteApp(id)
|
||||
|
||||
Delete an application.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
Integer id = 56; // Integer | the application id
|
||||
try {
|
||||
apiInstance.deleteApp(id);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#deleteApp");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the application id |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteClient"></a>
|
||||
# **deleteClient**
|
||||
> deleteClient(id)
|
||||
|
||||
Delete a client.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
Integer id = 56; // Integer | the client id
|
||||
try {
|
||||
apiInstance.deleteClient(id);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#deleteClient");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the client id |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getApps"></a>
|
||||
# **getApps**
|
||||
> List<Application> getApps()
|
||||
|
||||
Return all applications.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
try {
|
||||
List<Application> result = apiInstance.getApps();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#getApps");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Application>**](Application.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getClients"></a>
|
||||
# **getClients**
|
||||
> List<Client> getClients()
|
||||
|
||||
Return all clients.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
try {
|
||||
List<Client> result = apiInstance.getClients();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#getClients");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Client>**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="uploadAppImage"></a>
|
||||
# **uploadAppImage**
|
||||
> Application uploadAppImage(file, id)
|
||||
|
||||
|
||||
|
||||
Upload an image for an application
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
File file = new File("/path/to/file.txt"); // File | the application image
|
||||
Integer id = 56; // Integer | the application id
|
||||
try {
|
||||
Application result = apiInstance.uploadAppImage(file, id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#uploadAppImage");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**file** | **File**| the application image |
|
||||
**id** | **Integer**| the application id |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Application**](Application.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
12
client/docs/User.md
Normal file
12
client/docs/User.md
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
# User
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**admin** | **Boolean** | If the user is an administrator. | [optional]
|
||||
**id** | **Integer** | The user id. |
|
||||
**name** | **String** | The user name. For login. |
|
||||
|
||||
|
||||
|
||||
455
client/docs/UserApi.md
Normal file
455
client/docs/UserApi.md
Normal file
@@ -0,0 +1,455 @@
|
||||
# UserApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **POST** /user | Create a user.
|
||||
[**currentUser**](UserApi.md#currentUser) | **GET** /current/user | Return the current user.
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{id} | Deletes a user.
|
||||
[**getUser**](UserApi.md#getUser) | **GET** /user/{id} | Get a user.
|
||||
[**getUsers**](UserApi.md#getUsers) | **GET** /user | Return all users.
|
||||
[**updateCurrentUser**](UserApi.md#updateCurrentUser) | **POST** /current/user/password | Update the password of the current user.
|
||||
[**updateUser**](UserApi.md#updateUser) | **POST** /user/{id} | Update a user.
|
||||
|
||||
|
||||
<a name="createUser"></a>
|
||||
# **createUser**
|
||||
> User createUser(body)
|
||||
|
||||
Create a user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
UserWithPass body = new UserWithPass(); // UserWithPass | the user to add
|
||||
try {
|
||||
User result = apiInstance.createUser(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**UserWithPass**](UserWithPass.md)| the user to add |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="currentUser"></a>
|
||||
# **currentUser**
|
||||
> User currentUser()
|
||||
|
||||
Return the current user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
try {
|
||||
User result = apiInstance.currentUser();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#currentUser");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteUser"></a>
|
||||
# **deleteUser**
|
||||
> deleteUser(id)
|
||||
|
||||
Deletes a user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
Integer id = 56; // Integer | the user id
|
||||
try {
|
||||
apiInstance.deleteUser(id);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#deleteUser");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the user id |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getUser"></a>
|
||||
# **getUser**
|
||||
> User getUser(id)
|
||||
|
||||
Get a user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
Integer id = 56; // Integer | the user id
|
||||
try {
|
||||
User result = apiInstance.getUser(id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#getUser");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the user id |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getUsers"></a>
|
||||
# **getUsers**
|
||||
> List<User> getUsers()
|
||||
|
||||
Return all users.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
try {
|
||||
List<User> result = apiInstance.getUsers();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#getUsers");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<User>**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="updateCurrentUser"></a>
|
||||
# **updateCurrentUser**
|
||||
> updateCurrentUser(body)
|
||||
|
||||
Update the password of the current user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
UserPass body = new UserPass(); // UserPass | the user
|
||||
try {
|
||||
apiInstance.updateCurrentUser(body);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateCurrentUser");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**UserPass**](UserPass.md)| the user |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="updateUser"></a>
|
||||
# **updateUser**
|
||||
> User updateUser(id, body)
|
||||
|
||||
Update a user.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.UserApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
Integer id = 56; // Integer | the user id
|
||||
UserWithPass body = new UserWithPass(); // UserWithPass | the updated user
|
||||
try {
|
||||
User result = apiInstance.updateUser(id, body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the user id |
|
||||
**body** | [**UserWithPass**](UserWithPass.md)| the updated user |
|
||||
|
||||
### Return type
|
||||
|
||||
[**User**](User.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
10
client/docs/UserPass.md
Normal file
10
client/docs/UserPass.md
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
# UserPass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**pass** | **String** | The user password. For login. |
|
||||
|
||||
|
||||
|
||||
13
client/docs/UserWithPass.md
Normal file
13
client/docs/UserWithPass.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
# UserWithPass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**admin** | **Boolean** | If the user is an administrator. | [optional]
|
||||
**id** | **Integer** | The user id. |
|
||||
**name** | **String** | The user name. For login. |
|
||||
**pass** | **String** | The user password. For login. |
|
||||
|
||||
|
||||
|
||||
48
client/docs/VersionApi.md
Normal file
48
client/docs/VersionApi.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# VersionApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getVersion**](VersionApi.md#getVersion) | **GET** /version | Get version information.
|
||||
|
||||
|
||||
<a name="getVersion"></a>
|
||||
# **getVersion**
|
||||
> VersionInfo getVersion()
|
||||
|
||||
Get version information.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.api.VersionApi;
|
||||
|
||||
|
||||
VersionApi apiInstance = new VersionApi();
|
||||
try {
|
||||
VersionInfo result = apiInstance.getVersion();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling VersionApi#getVersion");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**VersionInfo**](VersionInfo.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
12
client/docs/VersionInfo.md
Normal file
12
client/docs/VersionInfo.md
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
# VersionInfo
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**buildDate** | **String** | The date on which this binary was built. |
|
||||
**commit** | **String** | The git commit hash on which this binary was built. |
|
||||
**version** | **String** | The current version. |
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user