diff --git a/client/docs/Application.md b/client/docs/Application.md
index bf05b27..dc6909f 100644
--- a/client/docs/Application.md
+++ b/client/docs/Application.md
@@ -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. |
diff --git a/client/docs/ApplicationApi.md b/client/docs/ApplicationApi.md
new file mode 100644
index 0000000..d094ccb
--- /dev/null
+++ b/client/docs/ApplicationApi.md
@@ -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.
+
+
+
+# **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
+
+
+# **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
+
+
+# **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 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
+
+
+# **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
+
+
+# **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
+
diff --git a/client/docs/ClientApi.md b/client/docs/ClientApi.md
new file mode 100644
index 0000000..2d1f8c7
--- /dev/null
+++ b/client/docs/ClientApi.md
@@ -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.
+
+
+
+# **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
+
+
+# **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
+
+
+# **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 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
+
diff --git a/client/docs/Message.md b/client/docs/Message.md
index 38becf7..e5baed9 100644
--- a/client/docs/Message.md
+++ b/client/docs/Message.md
@@ -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: <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. | [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]
diff --git a/client/docs/TokenApi.md b/client/docs/PluginApi.md
similarity index 65%
rename from client/docs/TokenApi.md
rename to client/docs/PluginApi.md
index afb55ea..0aa3544 100644
--- a/client/docs/TokenApi.md
+++ b/client/docs/PluginApi.md
@@ -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.
-
-# **createApp**
-> Application createApp(body)
+
+# **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
-
-
-# **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
-
-
-# **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
-
-# **deleteClient**
-> Void deleteClient(id)
+
+# **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
-
-# **getApps**
-> List<Application> getApps()
+
+# **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 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
-
-
-# **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 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
-
-
-# **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
+
+
+# **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
+
+
+# **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 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
+
+
+# **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
diff --git a/client/docs/PluginConf.md b/client/docs/PluginConf.md
new file mode 100644
index 0000000..0a78fb1
--- /dev/null
+++ b/client/docs/PluginConf.md
@@ -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]
+
+
+
diff --git a/client/src/main/AndroidManifest.xml b/client/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..3212fe4
--- /dev/null
+++ b/client/src/main/AndroidManifest.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/client/src/main/java/com/github/gotify/client/JSON.java b/client/src/main/java/com/github/gotify/client/JSON.java
index 8c9c770..918b320 100644
--- a/client/src/main/java/com/github/gotify/client/JSON.java
+++ b/client/src/main/java/com/github/gotify/client/JSON.java
@@ -2,7 +2,7 @@
* 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.4
+ * OpenAPI spec version: 1.0.6
*
*
* NOTE: This class is auto generated by the swagger code generator program.
diff --git a/client/src/main/java/com/github/gotify/client/StringUtil.java b/client/src/main/java/com/github/gotify/client/StringUtil.java
index 30f0cc5..c042ca5 100644
--- a/client/src/main/java/com/github/gotify/client/StringUtil.java
+++ b/client/src/main/java/com/github/gotify/client/StringUtil.java
@@ -2,7 +2,7 @@
* 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.4
+ * OpenAPI spec version: 1.0.6
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -13,7 +13,7 @@
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 {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/client/src/main/java/com/github/gotify/client/api/TokenApi.java b/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java
similarity index 68%
rename from client/src/main/java/com/github/gotify/client/api/TokenApi.java
rename to client/src/main/java/com/github/gotify/client/api/ApplicationApi.java
index 144ae51..375e6ff 100644
--- a/client/src/main/java/com/github/gotify/client/api/TokenApi.java
+++ b/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java
@@ -9,7 +9,6 @@ import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import com.github.gotify.client.model.Application;
-import com.github.gotify.client.model.Client;
import com.github.gotify.client.model.Error;
import java.io.File;
@@ -18,7 +17,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public interface TokenApi {
+public interface ApplicationApi {
/**
* Create an application.
*
@@ -33,20 +32,6 @@ public interface TokenApi {
@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 createClient(
- @retrofit2.http.Body Client body
- );
-
/**
* Delete an application.
*
@@ -61,20 +46,6 @@ public interface TokenApi {
@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 deleteClient(
- @retrofit2.http.Path("id") Integer id
- );
-
/**
* 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({
"Content-Type:application/json"
})
- @GET("client")
- Call> getClients();
-
+ @PUT("application/{id}")
+ Call 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 id the application id (required)
* @return Call<Application>
diff --git a/client/src/main/java/com/github/gotify/client/api/ClientApi.java b/client/src/main/java/com/github/gotify/client/api/ClientApi.java
new file mode 100644
index 0000000..71cb1b6
--- /dev/null
+++ b/client/src/main/java/com/github/gotify/client/api/ClientApi.java
@@ -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 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 deleteClient(
+ @retrofit2.http.Path("id") Integer id
+ );
+
+ /**
+ * Return all clients.
+ *
+ * @return Call<List<Client>>
+ */
+ @Headers({
+ "Content-Type:application/json"
+ })
+ @GET("client")
+ Call> getClients();
+
+
+}
diff --git a/client/src/main/java/com/github/gotify/client/api/PluginApi.java b/client/src/main/java/com/github/gotify/client/api/PluginApi.java
new file mode 100644
index 0000000..b144706
--- /dev/null
+++ b/client/src/main/java/com/github/gotify/client/api/PluginApi.java
@@ -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 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 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