Update swagger client
This commit is contained in:
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
||||
**description** | **String** | The description of the application. |
|
||||
**id** | **Integer** | The application id. |
|
||||
**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. |
|
||||
**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. |
|
||||
**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. |
|
||||
**message** | **String** | The actual message. |
|
||||
**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*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createApp**](TokenApi.md#createApp) | **POST** application | Create an application.
|
||||
[**createClient**](TokenApi.md#createClient) | **POST** client | Create a client.
|
||||
[**deleteApp**](TokenApi.md#deleteApp) | **DELETE** application/{id} | Delete an application.
|
||||
[**deleteClient**](TokenApi.md#deleteClient) | **DELETE** client/{id} | Delete a client.
|
||||
[**getApps**](TokenApi.md#getApps) | **GET** application | Return all applications.
|
||||
[**getClients**](TokenApi.md#getClients) | **GET** client | Return all clients.
|
||||
[**uploadAppImage**](TokenApi.md#uploadAppImage) | **POST** application/{id}/image |
|
||||
[**disablePlugin**](PluginApi.md#disablePlugin) | **POST** plugin/{id}/disable | Disable a plugin.
|
||||
[**enablePlugin**](PluginApi.md#enablePlugin) | **POST** plugin/{id}/enable | Enable a plugin.
|
||||
[**getPluginConfig**](PluginApi.md#getPluginConfig) | **GET** plugin/{id}/config | Get YAML configuration for Configurer plugin.
|
||||
[**getPluginDisplay**](PluginApi.md#getPluginDisplay) | **GET** plugin/{id}/display | Get display info for a Displayer plugin.
|
||||
[**getPlugins**](PluginApi.md#getPlugins) | **GET** plugin | Return all plugins.
|
||||
[**updatePluginConfig**](PluginApi.md#updatePluginConfig) | **POST** plugin/{id}/config | Update YAML configuration for Configurer plugin.
|
||||
|
||||
|
||||
<a name="createApp"></a>
|
||||
# **createApp**
|
||||
> Application createApp(body)
|
||||
<a name="disablePlugin"></a>
|
||||
# **disablePlugin**
|
||||
> Void disablePlugin(id)
|
||||
|
||||
Create an application.
|
||||
Disable a plugin.
|
||||
|
||||
### Example
|
||||
```java
|
||||
@@ -26,7 +25,7 @@ Create an application.
|
||||
//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;
|
||||
//import com.github.gotify.client.api.PluginApi;
|
||||
|
||||
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)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
Application body = new Application(); // Application | the application to add
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
try {
|
||||
Application result = apiInstance.createApp(body);
|
||||
Void result = apiInstance.disablePlugin(id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#createApp");
|
||||
System.err.println("Exception when calling PluginApi#disablePlugin");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
@@ -62,135 +61,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Application**](Application.md)| the application to add |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Application**](Application.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="createClient"></a>
|
||||
# **createClient**
|
||||
> Client createClient(body)
|
||||
|
||||
Create a client.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
Client body = new Client(); // Client | the client to add
|
||||
try {
|
||||
Client result = apiInstance.createClient(body);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#createClient");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Client**](Client.md)| the client to add |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Client**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteApp"></a>
|
||||
# **deleteApp**
|
||||
> 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 |
|
||||
**id** | **Integer**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -205,11 +76,11 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="deleteClient"></a>
|
||||
# **deleteClient**
|
||||
> Void deleteClient(id)
|
||||
<a name="enablePlugin"></a>
|
||||
# **enablePlugin**
|
||||
> Void enablePlugin(id)
|
||||
|
||||
Delete a client.
|
||||
Enable a plugin.
|
||||
|
||||
### Example
|
||||
```java
|
||||
@@ -218,7 +89,7 @@ Delete a client.
|
||||
//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;
|
||||
//import com.github.gotify.client.api.PluginApi;
|
||||
|
||||
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)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
Integer id = 56; // Integer | the client id
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
try {
|
||||
Void result = apiInstance.deleteClient(id);
|
||||
Void result = apiInstance.enablePlugin(id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#deleteClient");
|
||||
System.err.println("Exception when calling PluginApi#enablePlugin");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
@@ -254,7 +125,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the client id |
|
||||
**id** | **Integer**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -269,11 +140,11 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getApps"></a>
|
||||
# **getApps**
|
||||
> List<Application> getApps()
|
||||
<a name="getPluginConfig"></a>
|
||||
# **getPluginConfig**
|
||||
> Object getPluginConfig(id)
|
||||
|
||||
Return all applications.
|
||||
Get YAML configuration for Configurer plugin.
|
||||
|
||||
### Example
|
||||
```java
|
||||
@@ -282,7 +153,7 @@ Return all applications.
|
||||
//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;
|
||||
//import com.github.gotify.client.api.PluginApi;
|
||||
|
||||
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)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
try {
|
||||
List<Application> result = apiInstance.getApps();
|
||||
Object result = apiInstance.getPluginConfig(id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#getApps");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Application>**](Application.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getClients"></a>
|
||||
# **getClients**
|
||||
> List<Client> getClients()
|
||||
|
||||
Return all clients.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
try {
|
||||
List<Client> result = apiInstance.getClients();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#getClients");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**List<Client>**](Client.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="uploadAppImage"></a>
|
||||
# **uploadAppImage**
|
||||
> Application uploadAppImage(file, id)
|
||||
|
||||
|
||||
|
||||
Upload an image for an application
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiClient;
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.Configuration;
|
||||
//import com.github.gotify.client.auth.*;
|
||||
//import com.github.gotify.client.api.TokenApi;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure HTTP basic authorization: basicAuth
|
||||
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
|
||||
basicAuth.setUsername("YOUR USERNAME");
|
||||
basicAuth.setPassword("YOUR PASSWORD");
|
||||
|
||||
// Configure API key authorization: clientTokenHeader
|
||||
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
|
||||
clientTokenHeader.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenHeader.setApiKeyPrefix("Token");
|
||||
|
||||
// Configure API key authorization: clientTokenQuery
|
||||
ApiKeyAuth clientTokenQuery = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenQuery");
|
||||
clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
TokenApi apiInstance = new TokenApi();
|
||||
File file = new File("/path/to/file.txt"); // File | the application image
|
||||
Integer id = 56; // Integer | the application id
|
||||
try {
|
||||
Application result = apiInstance.uploadAppImage(file, id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling TokenApi#uploadAppImage");
|
||||
System.err.println("Exception when calling PluginApi#getPluginConfig");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
@@ -441,12 +189,11 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**file** | **File**| the application image |
|
||||
**id** | **Integer**| the application id |
|
||||
**id** | **Integer**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Application**](Application.md)
|
||||
**Object**
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -454,6 +201,194 @@ Name | Type | Description | Notes
|
||||
|
||||
### 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
|
||||
|
||||
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]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user