Update swagger client
This commit is contained in:
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|||||||
**description** | **String** | The description of the application. |
|
**description** | **String** | The description of the application. |
|
||||||
**id** | **Integer** | The application id. |
|
**id** | **Integer** | The application id. |
|
||||||
**image** | **String** | The image of the application. |
|
**image** | **String** | The image of the application. |
|
||||||
|
**internal** | **Boolean** | Whether the application is an internal application. Internal applications should not be deleted. |
|
||||||
**name** | **String** | The application name. This is how the application should be displayed to the user. |
|
**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. |
|
**token** | **String** | The application token. Can be used as `appToken`. See Authentication. |
|
||||||
|
|
||||||
|
|||||||
333
client/docs/ApplicationApi.md
Normal file
333
client/docs/ApplicationApi.md
Normal file
@@ -0,0 +1,333 @@
|
|||||||
|
# ApplicationApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**createApp**](ApplicationApi.md#createApp) | **POST** application | Create an application.
|
||||||
|
[**deleteApp**](ApplicationApi.md#deleteApp) | **DELETE** application/{id} | Delete an application.
|
||||||
|
[**getApps**](ApplicationApi.md#getApps) | **GET** application | Return all applications.
|
||||||
|
[**updateApplication**](ApplicationApi.md#updateApplication) | **PUT** application/{id} | Update an application.
|
||||||
|
[**uploadAppImage**](ApplicationApi.md#uploadAppImage) | **POST** application/{id}/image | Upload an image for an application.
|
||||||
|
|
||||||
|
|
||||||
|
<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.ApplicationApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ApplicationApi apiInstance = new ApplicationApi();
|
||||||
|
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 ApplicationApi#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="deleteApp"></a>
|
||||||
|
# **deleteApp**
|
||||||
|
> Void 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.ApplicationApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ApplicationApi apiInstance = new ApplicationApi();
|
||||||
|
Integer id = 56; // Integer | the application id
|
||||||
|
try {
|
||||||
|
Void result = apiInstance.deleteApp(id);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling ApplicationApi#deleteApp");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**id** | **Integer**| the application id |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Void**](.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="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.ApplicationApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ApplicationApi apiInstance = new ApplicationApi();
|
||||||
|
try {
|
||||||
|
List<Application> result = apiInstance.getApps();
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling ApplicationApi#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="updateApplication"></a>
|
||||||
|
# **updateApplication**
|
||||||
|
> Application updateApplication(body, id)
|
||||||
|
|
||||||
|
Update 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.ApplicationApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ApplicationApi apiInstance = new ApplicationApi();
|
||||||
|
Application body = new Application(); // Application | the application to update
|
||||||
|
Integer id = 56; // Integer | the application id
|
||||||
|
try {
|
||||||
|
Application result = apiInstance.updateApplication(body, id);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling ApplicationApi#updateApplication");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | [**Application**](Application.md)| the application to update |
|
||||||
|
**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**: 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.ApplicationApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ApplicationApi apiInstance = new ApplicationApi();
|
||||||
|
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 ApplicationApi#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
|
||||||
|
|
||||||
199
client/docs/ClientApi.md
Normal file
199
client/docs/ClientApi.md
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
# ClientApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**createClient**](ClientApi.md#createClient) | **POST** client | Create a client.
|
||||||
|
[**deleteClient**](ClientApi.md#deleteClient) | **DELETE** client/{id} | Delete a client.
|
||||||
|
[**getClients**](ClientApi.md#getClients) | **GET** client | Return all clients.
|
||||||
|
|
||||||
|
|
||||||
|
<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.ClientApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ClientApi apiInstance = new ClientApi();
|
||||||
|
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 ClientApi#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="deleteClient"></a>
|
||||||
|
# **deleteClient**
|
||||||
|
> Void 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.ClientApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ClientApi apiInstance = new ClientApi();
|
||||||
|
Integer id = 56; // Integer | the client id
|
||||||
|
try {
|
||||||
|
Void result = apiInstance.deleteClient(id);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling ClientApi#deleteClient");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**id** | **Integer**| the client id |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Void**](.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.ClientApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
ClientApi apiInstance = new ClientApi();
|
||||||
|
try {
|
||||||
|
List<Client> result = apiInstance.getClients();
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling ClientApi#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
|
||||||
|
|
||||||
@@ -6,10 +6,11 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**appid** | **Integer** | The application id that send this message. |
|
**appid** | **Integer** | The application id that send this message. |
|
||||||
**date** | [**OffsetDateTime**](OffsetDateTime.md) | The date the message was created. |
|
**date** | [**OffsetDateTime**](OffsetDateTime.md) | The date the message was created. |
|
||||||
|
**extras** | **Map<String, Object>** | The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes. | [optional]
|
||||||
**id** | **Integer** | The message id. |
|
**id** | **Integer** | The message id. |
|
||||||
**message** | **String** | The actual message. |
|
**message** | **String** | The actual message. |
|
||||||
**priority** | **Long** | The priority of the message. | [optional]
|
**priority** | **Long** | The priority of the message. | [optional]
|
||||||
**title** | **String** | The title of the message. |
|
**title** | **String** | The title of the message. | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
# TokenApi
|
# PluginApi
|
||||||
|
|
||||||
All URIs are relative to *http://localhost*
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**createApp**](TokenApi.md#createApp) | **POST** application | Create an application.
|
[**disablePlugin**](PluginApi.md#disablePlugin) | **POST** plugin/{id}/disable | Disable a plugin.
|
||||||
[**createClient**](TokenApi.md#createClient) | **POST** client | Create a client.
|
[**enablePlugin**](PluginApi.md#enablePlugin) | **POST** plugin/{id}/enable | Enable a plugin.
|
||||||
[**deleteApp**](TokenApi.md#deleteApp) | **DELETE** application/{id} | Delete an application.
|
[**getPluginConfig**](PluginApi.md#getPluginConfig) | **GET** plugin/{id}/config | Get YAML configuration for Configurer plugin.
|
||||||
[**deleteClient**](TokenApi.md#deleteClient) | **DELETE** client/{id} | Delete a client.
|
[**getPluginDisplay**](PluginApi.md#getPluginDisplay) | **GET** plugin/{id}/display | Get display info for a Displayer plugin.
|
||||||
[**getApps**](TokenApi.md#getApps) | **GET** application | Return all applications.
|
[**getPlugins**](PluginApi.md#getPlugins) | **GET** plugin | Return all plugins.
|
||||||
[**getClients**](TokenApi.md#getClients) | **GET** client | Return all clients.
|
[**updatePluginConfig**](PluginApi.md#updatePluginConfig) | **POST** plugin/{id}/config | Update YAML configuration for Configurer plugin.
|
||||||
[**uploadAppImage**](TokenApi.md#uploadAppImage) | **POST** application/{id}/image |
|
|
||||||
|
|
||||||
|
|
||||||
<a name="createApp"></a>
|
<a name="disablePlugin"></a>
|
||||||
# **createApp**
|
# **disablePlugin**
|
||||||
> Application createApp(body)
|
> Void disablePlugin(id)
|
||||||
|
|
||||||
Create an application.
|
Disable a plugin.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
@@ -26,7 +25,7 @@ Create an application.
|
|||||||
//import com.github.gotify.client.ApiException;
|
//import com.github.gotify.client.ApiException;
|
||||||
//import com.github.gotify.client.Configuration;
|
//import com.github.gotify.client.Configuration;
|
||||||
//import com.github.gotify.client.auth.*;
|
//import com.github.gotify.client.auth.*;
|
||||||
//import com.github.gotify.client.api.TokenApi;
|
//import com.github.gotify.client.api.PluginApi;
|
||||||
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
@@ -47,13 +46,13 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
|||||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
TokenApi apiInstance = new TokenApi();
|
PluginApi apiInstance = new PluginApi();
|
||||||
Application body = new Application(); // Application | the application to add
|
Integer id = 56; // Integer | the plugin id
|
||||||
try {
|
try {
|
||||||
Application result = apiInstance.createApp(body);
|
Void result = apiInstance.disablePlugin(id);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling TokenApi#createApp");
|
System.err.println("Exception when calling PluginApi#disablePlugin");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -62,135 +61,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Application**](Application.md)| the application to add |
|
**id** | **Integer**| the plugin id |
|
||||||
|
|
||||||
### 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**
|
|
||||||
> Void 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 {
|
|
||||||
Void result = apiInstance.deleteApp(id);
|
|
||||||
System.out.println(result);
|
|
||||||
} 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
|
### Return type
|
||||||
|
|
||||||
@@ -205,11 +76,11 @@ Name | Type | Description | Notes
|
|||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
<a name="deleteClient"></a>
|
<a name="enablePlugin"></a>
|
||||||
# **deleteClient**
|
# **enablePlugin**
|
||||||
> Void deleteClient(id)
|
> Void enablePlugin(id)
|
||||||
|
|
||||||
Delete a client.
|
Enable a plugin.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
@@ -218,7 +89,7 @@ Delete a client.
|
|||||||
//import com.github.gotify.client.ApiException;
|
//import com.github.gotify.client.ApiException;
|
||||||
//import com.github.gotify.client.Configuration;
|
//import com.github.gotify.client.Configuration;
|
||||||
//import com.github.gotify.client.auth.*;
|
//import com.github.gotify.client.auth.*;
|
||||||
//import com.github.gotify.client.api.TokenApi;
|
//import com.github.gotify.client.api.PluginApi;
|
||||||
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
@@ -239,13 +110,13 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
|||||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
TokenApi apiInstance = new TokenApi();
|
PluginApi apiInstance = new PluginApi();
|
||||||
Integer id = 56; // Integer | the client id
|
Integer id = 56; // Integer | the plugin id
|
||||||
try {
|
try {
|
||||||
Void result = apiInstance.deleteClient(id);
|
Void result = apiInstance.enablePlugin(id);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling TokenApi#deleteClient");
|
System.err.println("Exception when calling PluginApi#enablePlugin");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -254,7 +125,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**id** | **Integer**| the client id |
|
**id** | **Integer**| the plugin id |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@@ -269,11 +140,11 @@ Name | Type | Description | Notes
|
|||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
<a name="getApps"></a>
|
<a name="getPluginConfig"></a>
|
||||||
# **getApps**
|
# **getPluginConfig**
|
||||||
> List<Application> getApps()
|
> Object getPluginConfig(id)
|
||||||
|
|
||||||
Return all applications.
|
Get YAML configuration for Configurer plugin.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
@@ -282,7 +153,7 @@ Return all applications.
|
|||||||
//import com.github.gotify.client.ApiException;
|
//import com.github.gotify.client.ApiException;
|
||||||
//import com.github.gotify.client.Configuration;
|
//import com.github.gotify.client.Configuration;
|
||||||
//import com.github.gotify.client.auth.*;
|
//import com.github.gotify.client.auth.*;
|
||||||
//import com.github.gotify.client.api.TokenApi;
|
//import com.github.gotify.client.api.PluginApi;
|
||||||
|
|
||||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
|
||||||
@@ -303,136 +174,13 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
|||||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||||
|
|
||||||
TokenApi apiInstance = new TokenApi();
|
PluginApi apiInstance = new PluginApi();
|
||||||
|
Integer id = 56; // Integer | the plugin id
|
||||||
try {
|
try {
|
||||||
List<Application> result = apiInstance.getApps();
|
Object result = apiInstance.getPluginConfig(id);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling TokenApi#getApps");
|
System.err.println("Exception when calling PluginApi#getPluginConfig");
|
||||||
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();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -441,12 +189,11 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**file** | **File**| the application image |
|
**id** | **Integer**| the plugin id |
|
||||||
**id** | **Integer**| the application id |
|
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**Application**](Application.md)
|
**Object**
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@@ -454,6 +201,194 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: multipart/form-data
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/x-yaml
|
||||||
|
|
||||||
|
<a name="getPluginDisplay"></a>
|
||||||
|
# **getPluginDisplay**
|
||||||
|
> String getPluginDisplay(id)
|
||||||
|
|
||||||
|
Get display info for a Displayer plugin.
|
||||||
|
|
||||||
|
### 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.PluginApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
PluginApi apiInstance = new PluginApi();
|
||||||
|
Integer id = 56; // Integer | the plugin id
|
||||||
|
try {
|
||||||
|
String result = apiInstance.getPluginDisplay(id);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PluginApi#getPluginDisplay");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**id** | **Integer**| the plugin id |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**String**
|
||||||
|
|
||||||
|
### 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="getPlugins"></a>
|
||||||
|
# **getPlugins**
|
||||||
|
> List<PluginConf> getPlugins()
|
||||||
|
|
||||||
|
Return all plugins.
|
||||||
|
|
||||||
|
### 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.PluginApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
PluginApi apiInstance = new PluginApi();
|
||||||
|
try {
|
||||||
|
List<PluginConf> result = apiInstance.getPlugins();
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PluginApi#getPlugins");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**List<PluginConf>**](PluginConf.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="updatePluginConfig"></a>
|
||||||
|
# **updatePluginConfig**
|
||||||
|
> Void updatePluginConfig(id)
|
||||||
|
|
||||||
|
Update YAML configuration for Configurer plugin.
|
||||||
|
|
||||||
|
### 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.PluginApi;
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
PluginApi apiInstance = new PluginApi();
|
||||||
|
Integer id = 56; // Integer | the plugin id
|
||||||
|
try {
|
||||||
|
Void result = apiInstance.updatePluginConfig(id);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling PluginApi#updatePluginConfig");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**id** | **Integer**| the plugin id |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Void**](.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-yaml
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
18
client/docs/PluginConf.md
Normal file
18
client/docs/PluginConf.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
# PluginConf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**author** | **String** | The author of the plugin. | [optional]
|
||||||
|
**capabilities** | **List<String>** | Capabilities the plugin provides |
|
||||||
|
**enabled** | **Boolean** | Whether the plugin instance is enabled. |
|
||||||
|
**id** | **Integer** | The plugin id. |
|
||||||
|
**license** | **String** | The license of the plugin. | [optional]
|
||||||
|
**modulePath** | **String** | The module path of the plugin. |
|
||||||
|
**name** | **String** | The plugin name. |
|
||||||
|
**token** | **String** | The user name. For login. |
|
||||||
|
**website** | **String** | The website of the plugin. | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3
client/src/main/AndroidManifest.xml
Normal file
3
client/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<manifest package="com.github.gotify.client" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<application />
|
||||||
|
</manifest>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
package com.github.gotify.client;
|
package com.github.gotify.client;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class StringUtil {
|
public class StringUtil {
|
||||||
/**
|
/**
|
||||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import okhttp3.RequestBody;
|
|||||||
import okhttp3.ResponseBody;
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
import com.github.gotify.client.model.Application;
|
import com.github.gotify.client.model.Application;
|
||||||
import com.github.gotify.client.model.Client;
|
|
||||||
import com.github.gotify.client.model.Error;
|
import com.github.gotify.client.model.Error;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public interface TokenApi {
|
public interface ApplicationApi {
|
||||||
/**
|
/**
|
||||||
* Create an application.
|
* Create an application.
|
||||||
*
|
*
|
||||||
@@ -33,20 +32,6 @@ public interface TokenApi {
|
|||||||
@retrofit2.http.Body Application body
|
@retrofit2.http.Body Application body
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a client.
|
|
||||||
*
|
|
||||||
* @param body the client to add (required)
|
|
||||||
* @return Call<Client>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@POST("client")
|
|
||||||
Call<Client> createClient(
|
|
||||||
@retrofit2.http.Body Client body
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an application.
|
* Delete an application.
|
||||||
*
|
*
|
||||||
@@ -61,20 +46,6 @@ public interface TokenApi {
|
|||||||
@retrofit2.http.Path("id") Integer id
|
@retrofit2.http.Path("id") Integer id
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete a client.
|
|
||||||
*
|
|
||||||
* @param id the client id (required)
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
@Headers({
|
|
||||||
"Content-Type:application/json"
|
|
||||||
})
|
|
||||||
@DELETE("client/{id}")
|
|
||||||
Call<Void> deleteClient(
|
|
||||||
@retrofit2.http.Path("id") Integer id
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all applications.
|
* Return all applications.
|
||||||
*
|
*
|
||||||
@@ -88,20 +59,23 @@ public interface TokenApi {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all clients.
|
* Update an application.
|
||||||
*
|
*
|
||||||
* @return Call<List<Client>>
|
* @param body the application to update (required)
|
||||||
|
* @param id the application id (required)
|
||||||
|
* @return Call<Application>
|
||||||
*/
|
*/
|
||||||
@Headers({
|
@Headers({
|
||||||
"Content-Type:application/json"
|
"Content-Type:application/json"
|
||||||
})
|
})
|
||||||
@GET("client")
|
@PUT("application/{id}")
|
||||||
Call<List<Client>> getClients();
|
Call<Application> updateApplication(
|
||||||
|
@retrofit2.http.Body Application body, @retrofit2.http.Path("id") Integer id
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Upload an image for an application.
|
||||||
*
|
*
|
||||||
* Upload an image for an application
|
|
||||||
* @param file the application image (required)
|
* @param file the application image (required)
|
||||||
* @param id the application id (required)
|
* @param id the application id (required)
|
||||||
* @return Call<Application>
|
* @return Call<Application>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.github.gotify.client.api;
|
||||||
|
|
||||||
|
import com.github.gotify.client.CollectionFormats.*;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.*;
|
||||||
|
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
|
import com.github.gotify.client.model.Client;
|
||||||
|
import com.github.gotify.client.model.Error;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface ClientApi {
|
||||||
|
/**
|
||||||
|
* Create a client.
|
||||||
|
*
|
||||||
|
* @param body the client to add (required)
|
||||||
|
* @return Call<Client>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@POST("client")
|
||||||
|
Call<Client> createClient(
|
||||||
|
@retrofit2.http.Body Client body
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a client.
|
||||||
|
*
|
||||||
|
* @param id the client id (required)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@DELETE("client/{id}")
|
||||||
|
Call<Void> deleteClient(
|
||||||
|
@retrofit2.http.Path("id") Integer id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all clients.
|
||||||
|
*
|
||||||
|
* @return Call<List<Client>>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@GET("client")
|
||||||
|
Call<List<Client>> getClients();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
102
client/src/main/java/com/github/gotify/client/api/PluginApi.java
Normal file
102
client/src/main/java/com/github/gotify/client/api/PluginApi.java
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
package com.github.gotify.client.api;
|
||||||
|
|
||||||
|
import com.github.gotify.client.CollectionFormats.*;
|
||||||
|
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.http.*;
|
||||||
|
|
||||||
|
import okhttp3.RequestBody;
|
||||||
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
|
import com.github.gotify.client.model.Error;
|
||||||
|
import com.github.gotify.client.model.PluginConf;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface PluginApi {
|
||||||
|
/**
|
||||||
|
* Disable a plugin.
|
||||||
|
*
|
||||||
|
* @param id the plugin id (required)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@POST("plugin/{id}/disable")
|
||||||
|
Call<Void> disablePlugin(
|
||||||
|
@retrofit2.http.Path("id") Integer id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable a plugin.
|
||||||
|
*
|
||||||
|
* @param id the plugin id (required)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@POST("plugin/{id}/enable")
|
||||||
|
Call<Void> enablePlugin(
|
||||||
|
@retrofit2.http.Path("id") Integer id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get YAML configuration for Configurer plugin.
|
||||||
|
*
|
||||||
|
* @param id the plugin id (required)
|
||||||
|
* @return Call<Object>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@GET("plugin/{id}/config")
|
||||||
|
Call<Object> getPluginConfig(
|
||||||
|
@retrofit2.http.Path("id") Integer id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get display info for a Displayer plugin.
|
||||||
|
*
|
||||||
|
* @param id the plugin id (required)
|
||||||
|
* @return Call<String>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@GET("plugin/{id}/display")
|
||||||
|
Call<String> getPluginDisplay(
|
||||||
|
@retrofit2.http.Path("id") Integer id
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return all plugins.
|
||||||
|
*
|
||||||
|
* @return Call<List<PluginConf>>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/json"
|
||||||
|
})
|
||||||
|
@GET("plugin")
|
||||||
|
Call<List<PluginConf>> getPlugins();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update YAML configuration for Configurer plugin.
|
||||||
|
*
|
||||||
|
* @param id the plugin id (required)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
@Headers({
|
||||||
|
"Content-Type:application/x-yaml"
|
||||||
|
})
|
||||||
|
@POST("plugin/{id}/config")
|
||||||
|
Call<Void> updatePluginConfig(
|
||||||
|
@retrofit2.http.Path("id") Integer id
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* The Application holds information about an app which can send notifications.
|
* The Application holds information about an app which can send notifications.
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The Application holds information about an app which can send notifications.")
|
@ApiModel(description = "The Application holds information about an app which can send notifications.")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class Application {
|
public class Application {
|
||||||
@SerializedName("description")
|
@SerializedName("description")
|
||||||
private String description = null;
|
private String description = null;
|
||||||
@@ -38,6 +38,9 @@ public class Application {
|
|||||||
@SerializedName("image")
|
@SerializedName("image")
|
||||||
private String image = null;
|
private String image = null;
|
||||||
|
|
||||||
|
@SerializedName("internal")
|
||||||
|
private Boolean internal = null;
|
||||||
|
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
@@ -75,11 +78,20 @@ public class Application {
|
|||||||
* The image of the application.
|
* The image of the application.
|
||||||
* @return image
|
* @return image
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(example = "https://example.com/image.jpeg", required = true, value = "The image of the application.")
|
@ApiModelProperty(example = "image/image.jpeg", required = true, value = "The image of the application.")
|
||||||
public String getImage() {
|
public String getImage() {
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the application is an internal application. Internal applications should not be deleted.
|
||||||
|
* @return internal
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "false", required = true, value = "Whether the application is an internal application. Internal applications should not be deleted.")
|
||||||
|
public Boolean isInternal() {
|
||||||
|
return internal;
|
||||||
|
}
|
||||||
|
|
||||||
public Application name(String name) {
|
public Application name(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
return this;
|
return this;
|
||||||
@@ -120,13 +132,14 @@ public class Application {
|
|||||||
return Objects.equals(this.description, application.description) &&
|
return Objects.equals(this.description, application.description) &&
|
||||||
Objects.equals(this.id, application.id) &&
|
Objects.equals(this.id, application.id) &&
|
||||||
Objects.equals(this.image, application.image) &&
|
Objects.equals(this.image, application.image) &&
|
||||||
|
Objects.equals(this.internal, application.internal) &&
|
||||||
Objects.equals(this.name, application.name) &&
|
Objects.equals(this.name, application.name) &&
|
||||||
Objects.equals(this.token, application.token);
|
Objects.equals(this.token, application.token);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(description, id, image, name, token);
|
return Objects.hash(description, id, image, internal, name, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -138,6 +151,7 @@ public class Application {
|
|||||||
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
sb.append(" description: ").append(toIndentedString(description)).append("\n");
|
||||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
sb.append(" image: ").append(toIndentedString(image)).append("\n");
|
sb.append(" image: ").append(toIndentedString(image)).append("\n");
|
||||||
|
sb.append(" internal: ").append(toIndentedString(internal)).append("\n");
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
sb.append(" token: ").append(toIndentedString(token)).append("\n");
|
sb.append(" token: ").append(toIndentedString(token)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* The Client holds information about a device which can receive notifications (and other stuff).
|
* The Client holds information about a device which can receive notifications (and other stuff).
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The Client holds information about a device which can receive notifications (and other stuff).")
|
@ApiModel(description = "The Client holds information about a device which can receive notifications (and other stuff).")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class Client {
|
public class Client {
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Integer id = null;
|
private Integer id = null;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* The Error contains error relevant information.
|
* The Error contains error relevant information.
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The Error contains error relevant information.")
|
@ApiModel(description = "The Error contains error relevant information.")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class Error {
|
public class Error {
|
||||||
@SerializedName("error")
|
@SerializedName("error")
|
||||||
private String error = null;
|
private String error = null;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -22,13 +22,16 @@ import com.google.gson.stream.JsonWriter;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import org.threeten.bp.OffsetDateTime;
|
import org.threeten.bp.OffsetDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Message holds information about a message which was sent by an Application.
|
* The MessageExternal holds information about a message which was sent by an Application.
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The Message holds information about a message which was sent by an Application.")
|
@ApiModel(description = "The MessageExternal holds information about a message which was sent by an Application.")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class Message {
|
public class Message {
|
||||||
@SerializedName("appid")
|
@SerializedName("appid")
|
||||||
private Integer appid = null;
|
private Integer appid = null;
|
||||||
@@ -36,6 +39,9 @@ public class Message {
|
|||||||
@SerializedName("date")
|
@SerializedName("date")
|
||||||
private OffsetDateTime date = null;
|
private OffsetDateTime date = null;
|
||||||
|
|
||||||
|
@SerializedName("extras")
|
||||||
|
private Map<String, Object> extras = null;
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Integer id = null;
|
private Integer id = null;
|
||||||
|
|
||||||
@@ -66,6 +72,32 @@ public class Message {
|
|||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Message extras(Map<String, Object> extras) {
|
||||||
|
this.extras = extras;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Message putExtrasItem(String key, Object extrasItem) {
|
||||||
|
if (this.extras == null) {
|
||||||
|
this.extras = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
this.extras.put(key, extrasItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: &lt;top-namespace&gt;::[&lt;sub-namespace&gt;::]&lt;action&gt; These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.
|
||||||
|
* @return extras
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "{\"home::appliances::lighting::on\":{\"brightness\":15},\"home::appliances::thermostat::change_temperature\":{\"temperature\":23}}", value = "The extra data sent along the message. The extra fields are stored in a key-value scheme. Only accepted in CreateMessage requests with application/json content-type. The keys should be in the following format: <top-namespace>::[<sub-namespace>::]<action> These namespaces are reserved and might be used in the official clients: gotify android ios web server client. Do not use them for other purposes.")
|
||||||
|
public Map<String, Object> getExtras() {
|
||||||
|
return extras;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtras(Map<String, Object> extras) {
|
||||||
|
this.extras = extras;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The message id.
|
* The message id.
|
||||||
* @return id
|
* @return id
|
||||||
@@ -120,7 +152,7 @@ public class Message {
|
|||||||
* The title of the message.
|
* The title of the message.
|
||||||
* @return title
|
* @return title
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(example = "Backup", required = true, value = "The title of the message.")
|
@ApiModelProperty(example = "Backup", value = "The title of the message.")
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
@@ -141,6 +173,7 @@ public class Message {
|
|||||||
Message message = (Message) o;
|
Message message = (Message) o;
|
||||||
return Objects.equals(this.appid, message.appid) &&
|
return Objects.equals(this.appid, message.appid) &&
|
||||||
Objects.equals(this.date, message.date) &&
|
Objects.equals(this.date, message.date) &&
|
||||||
|
Objects.equals(this.extras, message.extras) &&
|
||||||
Objects.equals(this.id, message.id) &&
|
Objects.equals(this.id, message.id) &&
|
||||||
Objects.equals(this.message, message.message) &&
|
Objects.equals(this.message, message.message) &&
|
||||||
Objects.equals(this.priority, message.priority) &&
|
Objects.equals(this.priority, message.priority) &&
|
||||||
@@ -149,7 +182,7 @@ public class Message {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(appid, date, id, message, priority, title);
|
return Objects.hash(appid, date, extras, id, message, priority, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -160,6 +193,7 @@ public class Message {
|
|||||||
|
|
||||||
sb.append(" appid: ").append(toIndentedString(appid)).append("\n");
|
sb.append(" appid: ").append(toIndentedString(appid)).append("\n");
|
||||||
sb.append(" date: ").append(toIndentedString(date)).append("\n");
|
sb.append(" date: ").append(toIndentedString(date)).append("\n");
|
||||||
|
sb.append(" extras: ").append(toIndentedString(extras)).append("\n");
|
||||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
sb.append(" message: ").append(toIndentedString(message)).append("\n");
|
||||||
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
|
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -31,7 +31,7 @@ import java.util.List;
|
|||||||
* Wrapper for the paging and the messages
|
* Wrapper for the paging and the messages
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "Wrapper for the paging and the messages")
|
@ApiModel(description = "Wrapper for the paging and the messages")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class PagedMessages {
|
public class PagedMessages {
|
||||||
@SerializedName("messages")
|
@SerializedName("messages")
|
||||||
private List<Message> messages = new ArrayList<Message>();
|
private List<Message> messages = new ArrayList<Message>();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* The Paging holds holds information about the limit and making requests to the next page.
|
* The Paging holds holds information about the limit and making requests to the next page.
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The Paging holds holds information about the limit and making requests to the next page.")
|
@ApiModel(description = "The Paging holds holds information about the limit and making requests to the next page.")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class Paging {
|
public class Paging {
|
||||||
@SerializedName("limit")
|
@SerializedName("limit")
|
||||||
private Long limit = null;
|
private Long limit = null;
|
||||||
|
|||||||
@@ -0,0 +1,231 @@
|
|||||||
|
/*
|
||||||
|
* Gotify REST-API.
|
||||||
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.6
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package com.github.gotify.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.google.gson.TypeAdapter;
|
||||||
|
import com.google.gson.annotations.JsonAdapter;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.google.gson.stream.JsonReader;
|
||||||
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds information about a plugin instance for one user.
|
||||||
|
*/
|
||||||
|
@ApiModel(description = "Holds information about a plugin instance for one user.")
|
||||||
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
|
public class PluginConf {
|
||||||
|
@SerializedName("author")
|
||||||
|
private String author = null;
|
||||||
|
|
||||||
|
@SerializedName("capabilities")
|
||||||
|
private List<String> capabilities = new ArrayList<String>();
|
||||||
|
|
||||||
|
@SerializedName("enabled")
|
||||||
|
private Boolean enabled = null;
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
private Integer id = null;
|
||||||
|
|
||||||
|
@SerializedName("license")
|
||||||
|
private String license = null;
|
||||||
|
|
||||||
|
@SerializedName("modulePath")
|
||||||
|
private String modulePath = null;
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name = null;
|
||||||
|
|
||||||
|
@SerializedName("token")
|
||||||
|
private String token = null;
|
||||||
|
|
||||||
|
@SerializedName("website")
|
||||||
|
private String website = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The author of the plugin.
|
||||||
|
* @return author
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "jmattheis", value = "The author of the plugin.")
|
||||||
|
public String getAuthor() {
|
||||||
|
return author;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PluginConf capabilities(List<String> capabilities) {
|
||||||
|
this.capabilities = capabilities;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PluginConf addCapabilitiesItem(String capabilitiesItem) {
|
||||||
|
this.capabilities.add(capabilitiesItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Capabilities the plugin provides
|
||||||
|
* @return capabilities
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "[\"webhook\",\"display\"]", required = true, value = "Capabilities the plugin provides")
|
||||||
|
public List<String> getCapabilities() {
|
||||||
|
return capabilities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCapabilities(List<String> capabilities) {
|
||||||
|
this.capabilities = capabilities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PluginConf enabled(Boolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the plugin instance is enabled.
|
||||||
|
* @return enabled
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "true", required = true, value = "Whether the plugin instance is enabled.")
|
||||||
|
public Boolean isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnabled(Boolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The plugin id.
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "25", required = true, value = "The plugin id.")
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The license of the plugin.
|
||||||
|
* @return license
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "MIT", value = "The license of the plugin.")
|
||||||
|
public String getLicense() {
|
||||||
|
return license;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The module path of the plugin.
|
||||||
|
* @return modulePath
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "github.com/gotify/server/plugin/example/echo", required = true, value = "The module path of the plugin.")
|
||||||
|
public String getModulePath() {
|
||||||
|
return modulePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The plugin name.
|
||||||
|
* @return name
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "RSS poller", required = true, value = "The plugin name.")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PluginConf token(String token) {
|
||||||
|
this.token = token;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The user name. For login.
|
||||||
|
* @return token
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "P1234", required = true, value = "The user name. For login.")
|
||||||
|
public String getToken() {
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToken(String token) {
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The website of the plugin.
|
||||||
|
* @return website
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(example = "gotify.net", value = "The website of the plugin.")
|
||||||
|
public String getWebsite() {
|
||||||
|
return website;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
PluginConf pluginConf = (PluginConf) o;
|
||||||
|
return Objects.equals(this.author, pluginConf.author) &&
|
||||||
|
Objects.equals(this.capabilities, pluginConf.capabilities) &&
|
||||||
|
Objects.equals(this.enabled, pluginConf.enabled) &&
|
||||||
|
Objects.equals(this.id, pluginConf.id) &&
|
||||||
|
Objects.equals(this.license, pluginConf.license) &&
|
||||||
|
Objects.equals(this.modulePath, pluginConf.modulePath) &&
|
||||||
|
Objects.equals(this.name, pluginConf.name) &&
|
||||||
|
Objects.equals(this.token, pluginConf.token) &&
|
||||||
|
Objects.equals(this.website, pluginConf.website);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(author, capabilities, enabled, id, license, modulePath, name, token, website);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class PluginConf {\n");
|
||||||
|
|
||||||
|
sb.append(" author: ").append(toIndentedString(author)).append("\n");
|
||||||
|
sb.append(" capabilities: ").append(toIndentedString(capabilities)).append("\n");
|
||||||
|
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" license: ").append(toIndentedString(license)).append("\n");
|
||||||
|
sb.append(" modulePath: ").append(toIndentedString(modulePath)).append("\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" token: ").append(toIndentedString(token)).append("\n");
|
||||||
|
sb.append(" website: ").append(toIndentedString(website)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* The User holds information about permission and other stuff.
|
* The User holds information about permission and other stuff.
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The User holds information about permission and other stuff.")
|
@ApiModel(description = "The User holds information about permission and other stuff.")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class User {
|
public class User {
|
||||||
@SerializedName("admin")
|
@SerializedName("admin")
|
||||||
private Boolean admin = null;
|
private Boolean admin = null;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* The Password for updating the user.
|
* The Password for updating the user.
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The Password for updating the user.")
|
@ApiModel(description = "The Password for updating the user.")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class UserPass {
|
public class UserPass {
|
||||||
@SerializedName("pass")
|
@SerializedName("pass")
|
||||||
private String pass = null;
|
private String pass = null;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* The UserWithPass holds information about the credentials and other stuff.
|
* The UserWithPass holds information about the credentials and other stuff.
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "The UserWithPass holds information about the credentials and other stuff.")
|
@ApiModel(description = "The UserWithPass holds information about the credentials and other stuff.")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class UserWithPass {
|
public class UserWithPass {
|
||||||
@SerializedName("admin")
|
@SerializedName("admin")
|
||||||
private Boolean admin = null;
|
private Boolean admin = null;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Gotify REST-API.
|
* Gotify REST-API.
|
||||||
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
* This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.4
|
* OpenAPI spec version: 1.0.6
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by the swagger code generator program.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
@@ -27,7 +27,7 @@ import java.io.IOException;
|
|||||||
* VersionInfo Model
|
* VersionInfo Model
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "VersionInfo Model")
|
@ApiModel(description = "VersionInfo Model")
|
||||||
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-12T21:00:23.670+01:00")
|
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-17T19:42:51.206+01:00")
|
||||||
public class VersionInfo {
|
public class VersionInfo {
|
||||||
@SerializedName("buildDate")
|
@SerializedName("buildDate")
|
||||||
private String buildDate = null;
|
private String buildDate = null;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.github.gotify.client.api;
|
|||||||
|
|
||||||
import com.github.gotify.client.ApiClient;
|
import com.github.gotify.client.ApiClient;
|
||||||
import com.github.gotify.client.model.Application;
|
import com.github.gotify.client.model.Application;
|
||||||
import com.github.gotify.client.model.Client;
|
|
||||||
import com.github.gotify.client.model.Error;
|
import com.github.gotify.client.model.Error;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@@ -14,15 +13,15 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API tests for TokenApi
|
* API tests for ApplicationApi
|
||||||
*/
|
*/
|
||||||
public class TokenApiTest {
|
public class ApplicationApiTest {
|
||||||
|
|
||||||
private TokenApi api;
|
private ApplicationApi api;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() {
|
public void setup() {
|
||||||
api = new ApiClient().createService(TokenApi.class);
|
api = new ApiClient().createService(ApplicationApi.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,18 +36,6 @@ public class TokenApiTest {
|
|||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Create a client.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void createClientTest() {
|
|
||||||
Client body = null;
|
|
||||||
// Client response = api.createClient(body);
|
|
||||||
|
|
||||||
// TODO: test validations
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Delete an application.
|
* Delete an application.
|
||||||
*
|
*
|
||||||
@@ -61,18 +48,6 @@ public class TokenApiTest {
|
|||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Delete a client.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void deleteClientTest() {
|
|
||||||
Integer id = null;
|
|
||||||
// Void response = api.deleteClient(id);
|
|
||||||
|
|
||||||
// TODO: test validations
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Return all applications.
|
* Return all applications.
|
||||||
*
|
*
|
||||||
@@ -85,20 +60,22 @@ public class TokenApiTest {
|
|||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return all clients.
|
* Update an application.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void getClientsTest() {
|
public void updateApplicationTest() {
|
||||||
// List<Client> response = api.getClients();
|
Application body = null;
|
||||||
|
Integer id = null;
|
||||||
|
// Application response = api.updateApplication(body, id);
|
||||||
|
|
||||||
// TODO: test validations
|
// TODO: test validations
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* Upload an image for an application.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Upload an image for an application
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void uploadAppImageTest() {
|
public void uploadAppImageTest() {
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.github.gotify.client.api;
|
||||||
|
|
||||||
|
import com.github.gotify.client.ApiClient;
|
||||||
|
import com.github.gotify.client.model.Client;
|
||||||
|
import com.github.gotify.client.model.Error;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for ClientApi
|
||||||
|
*/
|
||||||
|
public class ClientApiTest {
|
||||||
|
|
||||||
|
private ClientApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(ClientApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a client.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void createClientTest() {
|
||||||
|
Client body = null;
|
||||||
|
// Client response = api.createClient(body);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Delete a client.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void deleteClientTest() {
|
||||||
|
Integer id = null;
|
||||||
|
// Void response = api.deleteClient(id);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return all clients.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getClientsTest() {
|
||||||
|
// List<Client> response = api.getClients();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.github.gotify.client.api;
|
||||||
|
|
||||||
|
import com.github.gotify.client.ApiClient;
|
||||||
|
import com.github.gotify.client.model.Error;
|
||||||
|
import com.github.gotify.client.model.PluginConf;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API tests for PluginApi
|
||||||
|
*/
|
||||||
|
public class PluginApiTest {
|
||||||
|
|
||||||
|
private PluginApi api;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setup() {
|
||||||
|
api = new ApiClient().createService(PluginApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable a plugin.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void disablePluginTest() {
|
||||||
|
Integer id = null;
|
||||||
|
// Void response = api.disablePlugin(id);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Enable a plugin.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void enablePluginTest() {
|
||||||
|
Integer id = null;
|
||||||
|
// Void response = api.enablePlugin(id);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get YAML configuration for Configurer plugin.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPluginConfigTest() {
|
||||||
|
Integer id = null;
|
||||||
|
// Object response = api.getPluginConfig(id);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get display info for a Displayer plugin.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPluginDisplayTest() {
|
||||||
|
Integer id = null;
|
||||||
|
// String response = api.getPluginDisplay(id);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return all plugins.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void getPluginsTest() {
|
||||||
|
// List<PluginConf> response = api.getPlugins();
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Update YAML configuration for Configurer plugin.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void updatePluginConfigTest() {
|
||||||
|
Integer id = null;
|
||||||
|
// Void response = api.updatePluginConfig(id);
|
||||||
|
|
||||||
|
// TODO: test validations
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user