Update client
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**description** | **String** | The description of the application. |
|
||||
**id** | **Integer** | The application id. |
|
||||
**id** | **Long** | 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. |
|
||||
|
||||
@@ -110,7 +110,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
ApplicationApi apiInstance = new ApplicationApi();
|
||||
Integer id = 56; // Integer | the application id
|
||||
Long id = 789L; // Long | the application id
|
||||
try {
|
||||
Void result = apiInstance.deleteApp(id);
|
||||
System.out.println(result);
|
||||
@@ -124,7 +124,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the application id |
|
||||
**id** | **Long**| the application id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -235,7 +235,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
|
||||
ApplicationApi apiInstance = new ApplicationApi();
|
||||
Application body = new Application(); // Application | the application to update
|
||||
Integer id = 56; // Integer | the application id
|
||||
Long id = 789L; // Long | the application id
|
||||
try {
|
||||
Application result = apiInstance.updateApplication(body, id);
|
||||
System.out.println(result);
|
||||
@@ -250,7 +250,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Application**](Application.md)| the application to update |
|
||||
**id** | **Integer**| the application id |
|
||||
**id** | **Long**| the application id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -301,7 +301,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
|
||||
ApplicationApi apiInstance = new ApplicationApi();
|
||||
File file = new File("/path/to/file.txt"); // File | the application image
|
||||
Integer id = 56; // Integer | the application id
|
||||
Long id = 789L; // Long | the application id
|
||||
try {
|
||||
Application result = apiInstance.uploadAppImage(file, id);
|
||||
System.out.println(result);
|
||||
@@ -316,7 +316,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**file** | **File**| the application image |
|
||||
**id** | **Integer**| the application id |
|
||||
**id** | **Long**| the application id |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Integer** | The client id. |
|
||||
**id** | **Long** | The client id. |
|
||||
**name** | **String** | The client name. This is how the client should be displayed to the user. |
|
||||
**token** | **String** | The client token. Can be used as `clientToken`. See Authentication. |
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ 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.
|
||||
[**updateClient**](ClientApi.md#updateClient) | **PUT** client/{id} | Update a client.
|
||||
|
||||
|
||||
<a name="createClient"></a>
|
||||
@@ -108,7 +109,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
ClientApi apiInstance = new ClientApi();
|
||||
Integer id = 56; // Integer | the client id
|
||||
Long id = 789L; // Long | the client id
|
||||
try {
|
||||
Void result = apiInstance.deleteClient(id);
|
||||
System.out.println(result);
|
||||
@@ -122,7 +123,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the client id |
|
||||
**id** | **Long**| the client id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -197,3 +198,69 @@ This endpoint does not need any parameter.
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="updateClient"></a>
|
||||
# **updateClient**
|
||||
> Client updateClient(body, id)
|
||||
|
||||
Update 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 update
|
||||
Long id = 789L; // Long | the client id
|
||||
try {
|
||||
Client result = apiInstance.updateClient(body, id);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling ClientApi#updateClient");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Client**](Client.md)| the client to update |
|
||||
**id** | **Long**| the client id |
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
11
client/docs/Health.md
Normal file
11
client/docs/Health.md
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
# Health
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**database** | **String** | The health of the database connection. |
|
||||
**health** | **String** | The health of the overall application. |
|
||||
|
||||
|
||||
|
||||
48
client/docs/HealthApi.md
Normal file
48
client/docs/HealthApi.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# HealthApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**getHealth**](HealthApi.md#getHealth) | **GET** health | Get health information.
|
||||
|
||||
|
||||
<a name="getHealth"></a>
|
||||
# **getHealth**
|
||||
> Health getHealth()
|
||||
|
||||
Get health information.
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import com.github.gotify.client.ApiException;
|
||||
//import com.github.gotify.client.api.HealthApi;
|
||||
|
||||
|
||||
HealthApi apiInstance = new HealthApi();
|
||||
try {
|
||||
Health result = apiInstance.getHealth();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling HealthApi#getHealth");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**Health**](Health.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**appid** | **Integer** | The application id that send this message. |
|
||||
**appid** | **Long** | 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. |
|
||||
**id** | **Long** | The message id. |
|
||||
**message** | **String** | The message. Markdown (excluding html) is allowed. |
|
||||
**priority** | **Long** | The priority of the message. | [optional]
|
||||
**title** | **String** | The title of the message. | [optional]
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer id = 56; // Integer | the application id
|
||||
Long id = 789L; // Long | the application id
|
||||
try {
|
||||
Void result = apiInstance.deleteAppMessages(id);
|
||||
System.out.println(result);
|
||||
@@ -123,7 +123,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the application id |
|
||||
**id** | **Long**| the application id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -173,7 +173,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer id = 56; // Integer | the message id
|
||||
Long id = 789L; // Long | the message id
|
||||
try {
|
||||
Void result = apiInstance.deleteMessage(id);
|
||||
System.out.println(result);
|
||||
@@ -187,7 +187,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the message id |
|
||||
**id** | **Long**| the message id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -297,9 +297,9 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer id = 56; // Integer | the application id
|
||||
Long id = 789L; // Long | the application id
|
||||
Integer limit = 100; // Integer | the maximal amount of messages to return
|
||||
Integer since = 56; // Integer | return all messages with an ID less than this value
|
||||
Long since = 789L; // Long | return all messages with an ID less than this value
|
||||
try {
|
||||
PagedMessages result = apiInstance.getAppMessages(id, limit, since);
|
||||
System.out.println(result);
|
||||
@@ -313,9 +313,9 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the application id |
|
||||
**id** | **Long**| the application id |
|
||||
**limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100]
|
||||
**since** | **Integer**| return all messages with an ID less than this value | [optional]
|
||||
**since** | **Long**| return all messages with an ID less than this value | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -366,7 +366,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
|
||||
MessageApi apiInstance = new MessageApi();
|
||||
Integer limit = 100; // Integer | the maximal amount of messages to return
|
||||
Integer since = 56; // Integer | return all messages with an ID less than this value
|
||||
Long since = 789L; // Long | return all messages with an ID less than this value
|
||||
try {
|
||||
PagedMessages result = apiInstance.getMessages(limit, since);
|
||||
System.out.println(result);
|
||||
@@ -381,7 +381,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100]
|
||||
**since** | **Integer**| return all messages with an ID less than this value | [optional]
|
||||
**since** | **Long**| return all messages with an ID less than this value | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**limit** | **Long** | The limit of the messages for the current request. |
|
||||
**next** | **String** | The request url for the next page. Empty/Null when no next page is available. | [optional]
|
||||
**since** | **Integer** | The ID of the last message returned in the current request. Use this as alternative to the next link. |
|
||||
**since** | **Long** | The ID of the last message returned in the current request. Use this as alternative to the next link. |
|
||||
**size** | **Long** | The amount of messages that got returned in the current request. |
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
Long id = 789L; // Long | the plugin id
|
||||
try {
|
||||
Void result = apiInstance.disablePlugin(id);
|
||||
System.out.println(result);
|
||||
@@ -61,7 +61,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the plugin id |
|
||||
**id** | **Long**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -111,7 +111,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
Long id = 789L; // Long | the plugin id
|
||||
try {
|
||||
Void result = apiInstance.enablePlugin(id);
|
||||
System.out.println(result);
|
||||
@@ -125,7 +125,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the plugin id |
|
||||
**id** | **Long**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -175,7 +175,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
Long id = 789L; // Long | the plugin id
|
||||
try {
|
||||
Object result = apiInstance.getPluginConfig(id);
|
||||
System.out.println(result);
|
||||
@@ -189,7 +189,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the plugin id |
|
||||
**id** | **Long**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -239,7 +239,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
Long id = 789L; // Long | the plugin id
|
||||
try {
|
||||
String result = apiInstance.getPluginDisplay(id);
|
||||
System.out.println(result);
|
||||
@@ -253,7 +253,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the plugin id |
|
||||
**id** | **Long**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -363,7 +363,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
PluginApi apiInstance = new PluginApi();
|
||||
Integer id = 56; // Integer | the plugin id
|
||||
Long id = 789L; // Long | the plugin id
|
||||
try {
|
||||
Void result = apiInstance.updatePluginConfig(id);
|
||||
System.out.println(result);
|
||||
@@ -377,7 +377,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the plugin id |
|
||||
**id** | **Long**| the plugin id |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ 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. |
|
||||
**id** | **Long** | The plugin id. |
|
||||
**license** | **String** | The license of the plugin. | [optional]
|
||||
**modulePath** | **String** | The module path of the plugin. |
|
||||
**name** | **String** | The plugin name. |
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**admin** | **Boolean** | If the user is an administrator. | [optional]
|
||||
**id** | **Integer** | The user id. |
|
||||
**id** | **Long** | The user id. |
|
||||
**name** | **String** | The user name. For login. |
|
||||
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
Integer id = 56; // Integer | the user id
|
||||
Long id = 789L; // Long | the user id
|
||||
try {
|
||||
Void result = apiInstance.deleteUser(id);
|
||||
System.out.println(result);
|
||||
@@ -186,7 +186,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the user id |
|
||||
**id** | **Long**| the user id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -236,7 +236,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
Integer id = 56; // Integer | the user id
|
||||
Long id = 789L; // Long | the user id
|
||||
try {
|
||||
User result = apiInstance.getUser(id);
|
||||
System.out.println(result);
|
||||
@@ -250,7 +250,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the user id |
|
||||
**id** | **Long**| the user id |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -424,7 +424,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
|
||||
//clientTokenQuery.setApiKeyPrefix("Token");
|
||||
|
||||
UserApi apiInstance = new UserApi();
|
||||
Integer id = 56; // Integer | the user id
|
||||
Long id = 789L; // Long | the user id
|
||||
UserWithPass body = new UserWithPass(); // UserWithPass | the updated user
|
||||
try {
|
||||
User result = apiInstance.updateUser(id, body);
|
||||
@@ -439,7 +439,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **Integer**| the user id |
|
||||
**id** | **Long**| the user id |
|
||||
**body** | [**UserWithPass**](UserWithPass.md)| the updated user |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**admin** | **Boolean** | If the user is an administrator. | [optional]
|
||||
**id** | **Integer** | The user id. |
|
||||
**id** | **Long** | The user id. |
|
||||
**name** | **String** | The user name. For login. |
|
||||
**pass** | **String** | The user password. For login. |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user