diff --git a/README.md b/README.md
index c2b8b301..fb4be412 100644
--- a/README.md
+++ b/README.md
@@ -63,9 +63,10 @@ $ ./gradlew build
## Update client
* Run `./gradlew generateSwaggerCode`
-* Discard changes to `client/build.gradle` (newer versions of dependencies)
-* Fix compile error in `client/src/main/java/com/github/gotify/client/auth/OAuthOkHttpClient.java` (caused by an updated dependency)
* Delete `client/settings.gradle` (client is a gradle sub project and must not have a settings.gradle)
+* Delete `repositories` block from `client/build.gradle`
+* Delete `implementation "com.sun.xml.ws:jaxws-rt:x.x.x“` from `client/build.gradle`
+* Insert missing bracket in `retryingIntercept` method of class `src/main/java/com/github/gotify/client/auth/OAuth`
* Commit changes
## Versioning
diff --git a/app/build.gradle b/app/build.gradle
index 57f4dc0e..b7a286e3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -89,11 +89,14 @@ dependencies {
implementation "org.tinylog:tinylog-api-kotlin:$tinylog_version"
implementation "org.tinylog:tinylog-impl:$tinylog_version"
+
+ implementation 'com.google.code.gson:gson:2.11.0'
+ implementation 'com.squareup.retrofit2:retrofit:2.11.0'
+ implementation 'org.threeten:threetenbp:1.7.0'
}
configurations {
configureEach {
- exclude group: 'org.json', module: 'json'
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
}
}
diff --git a/app/src/main/kotlin/com/github/gotify/login/LoginActivity.kt b/app/src/main/kotlin/com/github/gotify/login/LoginActivity.kt
index b9eaa3c3..e874c49c 100644
--- a/app/src/main/kotlin/com/github/gotify/login/LoginActivity.kt
+++ b/app/src/main/kotlin/com/github/gotify/login/LoginActivity.kt
@@ -25,6 +25,7 @@ import com.github.gotify.client.ApiClient
import com.github.gotify.client.api.ClientApi
import com.github.gotify.client.api.UserApi
import com.github.gotify.client.model.Client
+import com.github.gotify.client.model.ClientParams
import com.github.gotify.client.model.VersionInfo
import com.github.gotify.databinding.ActivityLoginBinding
import com.github.gotify.databinding.ClientNameDialogBinding
@@ -291,7 +292,7 @@ internal class LoginActivity : AppCompatActivity() {
nameProvider: TextInputEditText
): DialogInterface.OnClickListener {
return DialogInterface.OnClickListener { _, _ ->
- val newClient = Client().name(nameProvider.text.toString())
+ val newClient = ClientParams().name(nameProvider.text.toString())
client.createService(ClientApi::class.java)
.createClient(newClient)
.enqueue(
diff --git a/build.gradle b/build.gradle
index 99cf0f69..1b5c47b0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,12 +1,7 @@
plugins {
id 'com.android.application' version '8.5.0' apply false
id 'org.jetbrains.kotlin.android' version '2.0.0' apply false
- id 'org.hidetake.swagger.generator' version '2.14.0'
-}
-
-ext {
- gotifyVersion = 'master'
- specLocation = "$layout.buildDirectory/gotify.spec.json"
+ id 'org.hidetake.swagger.generator' version '2.19.2'
}
tasks.register('clean', Delete) {
@@ -14,8 +9,8 @@ tasks.register('clean', Delete) {
}
static def download(String url, String filename ) {
- new URL( url ).openConnection().with { conn ->
- new File( filename ).withOutputStream { out ->
+ new URI(url).toURL().openConnection().with { conn ->
+ new File(filename).withOutputStream { out ->
conn.inputStream.with { inp ->
out << inp
inp.close()
@@ -25,16 +20,19 @@ static def download(String url, String filename ) {
}
tasks.register('downloadSpec') {
- inputs.property 'version', gotifyVersion
+ def gotifyVersion = 'master'
+ def url = "https://raw.githubusercontent.com/gotify/server/$gotifyVersion/docs/spec.json"
+ def buildDir = project.layout.buildDirectory.get()
+ def specLocation = buildDir.file('gotify.spec.json').asFile.absolutePath
doFirst {
- layout.buildDirectory.mkdirs()
- download("https://raw.githubusercontent.com/gotify/server/${gotifyVersion}/docs/spec.json", specLocation)
+ buildDir.asFile.mkdirs()
+ download(url, specLocation)
}
}
swaggerSources {
gotify {
- inputFile = specLocation as File
+ inputFile = "$projectDir/build/gotify.spec.json" as File
code {
configFile = "$projectDir/swagger.config.json" as File
language = 'java'
@@ -44,7 +42,7 @@ swaggerSources {
}
dependencies {
- swaggerCodegen 'io.swagger:swagger-codegen-cli:2.3.1'
+ swaggerCodegen 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.63'
}
generateSwaggerCode.dependsOn downloadSpec
\ No newline at end of file
diff --git a/client/.swagger-codegen/VERSION b/client/.swagger-codegen/VERSION
index a6254504..eefcac2b 100644
--- a/client/.swagger-codegen/VERSION
+++ b/client/.swagger-codegen/VERSION
@@ -1 +1 @@
-2.3.1
\ No newline at end of file
+3.0.63
\ No newline at end of file
diff --git a/client/README.md b/client/README.md
index 4a53c014..f280fa71 100644
--- a/client/README.md
+++ b/client/README.md
@@ -36,4 +36,3 @@ After the client library is installed/deployed, you can use it in your Maven pro
-
diff --git a/client/build.gradle b/client/build.gradle
index 939a9258..78265313 100644
--- a/client/build.gradle
+++ b/client/build.gradle
@@ -1,32 +1,59 @@
-apply plugin: 'idea'
-apply plugin: 'eclipse'
-
-group = 'io.swagger'
-version = '1.0.0'
-
-apply plugin: 'java-library'
-
-sourceCompatibility = JavaVersion.VERSION_1_7
-targetCompatibility = JavaVersion.VERSION_1_7
+plugins {
+ id 'java'
+ id 'maven-publish'
+}
ext {
oltu_version = "1.0.2"
- retrofit_version = "2.5.0"
- swagger_annotations_version = "1.5.15"
- junit_version = "4.13"
- threetenbp_version = "1.4.4"
- json_fire_version = "1.8.4"
+ retrofit_version = "2.7.1"
+ swagger_annotations_version = "2.0.0"
+ junit_version = "4.12"
+ threetenbp_version = "1.4.1"
+ json_fire_version = "1.8.3"
}
dependencies {
- api "com.squareup.retrofit2:retrofit:$retrofit_version"
- api "com.squareup.retrofit2:converter-scalars:$retrofit_version"
- api "com.squareup.retrofit2:converter-gson:$retrofit_version"
- api "io.swagger:swagger-annotations:$swagger_annotations_version"
- implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version") {
+ implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
+ implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
+ implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
+ implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version"
+ implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"){
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
+ exclude group: 'org.json', module: 'json'
}
- api "io.gsonfire:gson-fire:$json_fire_version"
- api "org.threeten:threetenbp:$threetenbp_version"
+ implementation "org.json:json:20180130"
+ implementation "io.gsonfire:gson-fire:$json_fire_version"
+ implementation "org.threeten:threetenbp:$threetenbp_version"
+
testImplementation "junit:junit:$junit_version"
}
+
+group = 'io.swagger'
+version = '1.0.0'
+description = 'Swagger Java'
+
+java.sourceCompatibility = 11
+java.targetCompatibility = 11
+
+tasks.register('testsJar', Jar) {
+ archiveClassifier = 'tests'
+ from(sourceSets.test.output)
+}
+
+java {
+ withSourcesJar()
+ withJavadocJar()
+}
+
+publishing {
+ publications {
+ maven(MavenPublication) {
+ from(components.java)
+ artifact(testsJar)
+ }
+ }
+}
+
+tasks.withType(JavaCompile) {
+ options.encoding = 'UTF-8'
+}
diff --git a/client/build.sbt b/client/build.sbt
index d0d4e265..29ea0f49 100644
--- a/client/build.sbt
+++ b/client/build.sbt
@@ -12,8 +12,8 @@ lazy val root = (project in file(".")).
"com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile",
"com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile",
"com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile",
- "io.swagger" % "swagger-annotations" % "1.5.15" % "compile",
- "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
+ "io.swagger.core.v3" % "swagger-annotations" % "2.0.0" % "compile",
+ "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2" % "compile",
"org.threeten" % "threetenbp" % "1.3.5" % "compile",
"io.gsonfire" % "gson-fire" % "1.8.0" % "compile",
"junit" % "junit" % "4.12" % "test",
diff --git a/client/docs/Application.md b/client/docs/Application.md
index 00abef6a..9a05079d 100644
--- a/client/docs/Application.md
+++ b/client/docs/Application.md
@@ -1,15 +1,13 @@
-
# Application
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**defaultPriority** | **Long** | The default priority of messages sent by this application. Defaults to 0. | [optional]
**description** | **String** | The description of the application. |
**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. |
+**lastUsed** | [**OffsetDateTime**](OffsetDateTime.md) | The last time the application token was used. | [optional]
**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
index 4ac61b0f..ab81e2f8 100644
--- a/client/docs/ApplicationApi.md
+++ b/client/docs/ApplicationApi.md
@@ -1,16 +1,16 @@
# ApplicationApi
-All URIs are relative to *http://localhost*
+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.
+[**removeAppImage**](ApplicationApi.md#removeAppImage) | **DELETE** application/{id}/image | Deletes an image of an application.
[**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)
@@ -27,12 +27,17 @@ Create an application.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -46,7 +51,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
//clientTokenQuery.setApiKeyPrefix("Token");
ApplicationApi apiInstance = new ApplicationApi();
-Application body = new Application(); // Application | the application to add
+ApplicationParams body = new ApplicationParams(); // ApplicationParams | the application to add
try {
Application result = apiInstance.createApp(body);
System.out.println(result);
@@ -60,7 +65,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Application**](Application.md)| the application to add |
+ **body** | [**ApplicationParams**](ApplicationParams.md)| the application to add |
### Return type
@@ -68,7 +73,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
@@ -91,12 +96,17 @@ Delete an application.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -132,11 +142,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -155,12 +165,17 @@ Return all applications.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -192,11 +207,80 @@ This endpoint does not need any parameter.
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+# **removeAppImage**
+> Void removeAppImage(id)
+
+Deletes an image of 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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
+// 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();
+Long id = 789L; // Long | the application id
+try {
+ Void result = apiInstance.removeAppImage(id);
+ System.out.println(result);
+} catch (ApiException e) {
+ System.err.println("Exception when calling ApplicationApi#removeAppImage");
+ e.printStackTrace();
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **id** | **Long**| the application id |
+
+### Return type
+
+[**Void**](.md)
+
+### Authorization
+
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -215,12 +299,17 @@ Update an application.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -234,7 +323,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
//clientTokenQuery.setApiKeyPrefix("Token");
ApplicationApi apiInstance = new ApplicationApi();
-Application body = new Application(); // Application | the application to update
+ApplicationParams body = new ApplicationParams(); // ApplicationParams | the application to update
Long id = 789L; // Long | the application id
try {
Application result = apiInstance.updateApplication(body, id);
@@ -249,7 +338,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Application**](Application.md)| the application to update |
+ **body** | [**ApplicationParams**](ApplicationParams.md)| the application to update |
**id** | **Long**| the application id |
### Return type
@@ -258,7 +347,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
@@ -281,12 +370,17 @@ Upload an image for an application.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -300,7 +394,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
//clientTokenQuery.setApiKeyPrefix("Token");
ApplicationApi apiInstance = new ApplicationApi();
-File file = new File("/path/to/file.txt"); // File | the application image
+File file = new File("file_example"); // File |
Long id = 789L; // Long | the application id
try {
Application result = apiInstance.uploadAppImage(file, id);
@@ -315,7 +409,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **file** | **File**| the application image |
+ **file** | **File**| |
**id** | **Long**| the application id |
### Return type
@@ -324,7 +418,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
diff --git a/client/docs/ApplicationParams.md b/client/docs/ApplicationParams.md
new file mode 100644
index 00000000..683a9036
--- /dev/null
+++ b/client/docs/ApplicationParams.md
@@ -0,0 +1,8 @@
+# ApplicationParams
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**defaultPriority** | **Long** | The default priority of messages sent by this application. Defaults to 0. | [optional]
+**description** | **String** | The description of the application. | [optional]
+**name** | **String** | The application name. This is how the application should be displayed to the user. |
diff --git a/client/docs/Client.md b/client/docs/Client.md
index 3de1e6c5..b6b4f9cd 100644
--- a/client/docs/Client.md
+++ b/client/docs/Client.md
@@ -1,12 +1,9 @@
-
# Client
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | The client id. |
+**lastUsed** | [**OffsetDateTime**](OffsetDateTime.md) | The last time the client token was used. | [optional]
**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. |
-
-
-
diff --git a/client/docs/ClientApi.md b/client/docs/ClientApi.md
index aee74ad9..e1628a1e 100644
--- a/client/docs/ClientApi.md
+++ b/client/docs/ClientApi.md
@@ -1,6 +1,6 @@
# ClientApi
-All URIs are relative to *http://localhost*
+All URIs are relative to *http://localhost/*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -9,7 +9,6 @@ Method | HTTP request | Description
[**getClients**](ClientApi.md#getClients) | **GET** client | Return all clients.
[**updateClient**](ClientApi.md#updateClient) | **PUT** client/{id} | Update a client.
-
# **createClient**
> Client createClient(body)
@@ -26,12 +25,17 @@ Create a client.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -45,7 +49,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
//clientTokenQuery.setApiKeyPrefix("Token");
ClientApi apiInstance = new ClientApi();
-Client body = new Client(); // Client | the client to add
+ClientParams body = new ClientParams(); // ClientParams | the client to add
try {
Client result = apiInstance.createClient(body);
System.out.println(result);
@@ -59,7 +63,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| the client to add |
+ **body** | [**ClientParams**](ClientParams.md)| the client to add |
### Return type
@@ -67,7 +71,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
@@ -90,12 +94,17 @@ Delete a client.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -131,11 +140,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -154,12 +163,17 @@ Return all clients.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -191,11 +205,11 @@ This endpoint does not need any parameter.
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -214,12 +228,17 @@ Update a client.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -233,7 +252,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
//clientTokenQuery.setApiKeyPrefix("Token");
ClientApi apiInstance = new ClientApi();
-Client body = new Client(); // Client | the client to update
+ClientParams body = new ClientParams(); // ClientParams | the client to update
Long id = 789L; // Long | the client id
try {
Client result = apiInstance.updateClient(body, id);
@@ -248,7 +267,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**Client**](Client.md)| the client to update |
+ **body** | [**ClientParams**](ClientParams.md)| the client to update |
**id** | **Long**| the client id |
### Return type
@@ -257,7 +276,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
diff --git a/client/docs/ClientParams.md b/client/docs/ClientParams.md
new file mode 100644
index 00000000..cb1370fe
--- /dev/null
+++ b/client/docs/ClientParams.md
@@ -0,0 +1,6 @@
+# ClientParams
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | The client name |
diff --git a/client/docs/UserWithPass.md b/client/docs/CreateUserExternal.md
similarity index 63%
rename from client/docs/UserWithPass.md
rename to client/docs/CreateUserExternal.md
index 2a249128..22fa5fee 100644
--- a/client/docs/UserWithPass.md
+++ b/client/docs/CreateUserExternal.md
@@ -1,13 +1,8 @@
-
-# UserWithPass
+# CreateUserExternal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**admin** | **Boolean** | If the user is an administrator. | [optional]
-**id** | **Long** | The user id. |
+**admin** | **Boolean** | If the user is an administrator. |
**name** | **String** | The user name. For login. |
**pass** | **String** | The user password. For login. |
-
-
-
diff --git a/client/docs/Error.md b/client/docs/Error.md
index c711a483..8dc3bb2d 100644
--- a/client/docs/Error.md
+++ b/client/docs/Error.md
@@ -1,4 +1,3 @@
-
# Error
## Properties
@@ -7,6 +6,3 @@ Name | Type | Description | Notes
**error** | **String** | The general error message |
**errorCode** | **Long** | The http error code. |
**errorDescription** | **String** | The http error code. |
-
-
-
diff --git a/client/docs/Health.md b/client/docs/Health.md
index e6181a29..a6b7c8af 100644
--- a/client/docs/Health.md
+++ b/client/docs/Health.md
@@ -1,4 +1,3 @@
-
# Health
## Properties
@@ -6,6 +5,3 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**database** | **String** | The health of the database connection. |
**health** | **String** | The health of the overall application. |
-
-
-
diff --git a/client/docs/HealthApi.md b/client/docs/HealthApi.md
index 0fbd9e56..4e28101d 100644
--- a/client/docs/HealthApi.md
+++ b/client/docs/HealthApi.md
@@ -1,12 +1,11 @@
# HealthApi
-All URIs are relative to *http://localhost*
+All URIs are relative to *http://localhost/*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getHealth**](HealthApi.md#getHealth) | **GET** health | Get health information.
-
# **getHealth**
> Health getHealth()
@@ -43,6 +42,6 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
diff --git a/client/docs/IdImageBody.md b/client/docs/IdImageBody.md
new file mode 100644
index 00000000..813a4b4e
--- /dev/null
+++ b/client/docs/IdImageBody.md
@@ -0,0 +1,6 @@
+# IdImageBody
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | [**File**](File.md) | the application image |
diff --git a/client/docs/Message.md b/client/docs/Message.md
index 64caad4d..0822a334 100644
--- a/client/docs/Message.md
+++ b/client/docs/Message.md
@@ -1,4 +1,3 @@
-
# Message
## Properties
@@ -9,8 +8,5 @@ Name | Type | Description | Notes
**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** | **Long** | The message id. |
**message** | **String** | The message. Markdown (excluding html) is allowed. |
-**priority** | **Long** | The priority of the message. | [optional]
+**priority** | **Long** | The priority of the message. If unset, then the default priority of the application will be used. | [optional]
**title** | **String** | The title of the message. | [optional]
-
-
-
diff --git a/client/docs/MessageApi.md b/client/docs/MessageApi.md
index 5f19cb47..9b42a212 100644
--- a/client/docs/MessageApi.md
+++ b/client/docs/MessageApi.md
@@ -1,6 +1,6 @@
# MessageApi
-All URIs are relative to *http://localhost*
+All URIs are relative to *http://localhost/*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -12,7 +12,6 @@ Method | HTTP request | Description
[**getMessages**](MessageApi.md#getMessages) | **GET** message | Return all messages.
[**streamMessages**](MessageApi.md#streamMessages) | **GET** stream | Websocket, return newly created messages.
-
# **createMessage**
> Message createMessage(body)
@@ -32,6 +31,12 @@ __NOTE__: This API ONLY accepts an application token as authentication.
ApiClient defaultClient = Configuration.getDefaultApiClient();
+// Configure API key authorization: appTokenAuthorizationHeader
+ApiKeyAuth appTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("appTokenAuthorizationHeader");
+appTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//appTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: appTokenHeader
ApiKeyAuth appTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("appTokenHeader");
appTokenHeader.setApiKey("YOUR API KEY");
@@ -67,7 +72,7 @@ Name | Type | Description | Notes
### Authorization
-[appTokenHeader](../README.md#appTokenHeader), [appTokenQuery](../README.md#appTokenQuery)
+[appTokenAuthorizationHeader](../README.md#appTokenAuthorizationHeader)[appTokenHeader](../README.md#appTokenHeader)[appTokenQuery](../README.md#appTokenQuery)
### HTTP request headers
@@ -90,12 +95,17 @@ Delete all messages from a specific application.
//import com.github.gotify.client.api.MessageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -131,11 +141,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -154,12 +164,17 @@ Deletes a message with an id.
//import com.github.gotify.client.api.MessageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -195,11 +210,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -218,12 +233,17 @@ Delete all messages.
//import com.github.gotify.client.api.MessageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -255,11 +275,11 @@ This endpoint does not need any parameter.
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -278,12 +298,17 @@ Return all messages from a specific application.
//import com.github.gotify.client.api.MessageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -314,8 +339,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **Long**| the application id |
- **limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100]
- **since** | **Long**| return all messages with an ID less than this value | [optional]
+ **limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100] [enum: 1, 200]
+ **since** | **Long**| return all messages with an ID less than this value | [optional] [enum: 0]
### Return type
@@ -323,11 +348,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -346,12 +371,17 @@ Return all messages.
//import com.github.gotify.client.api.MessageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -380,8 +410,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100]
- **since** | **Long**| return all messages with an ID less than this value | [optional]
+ **limit** | **Integer**| the maximal amount of messages to return | [optional] [default to 100] [enum: 1, 200]
+ **since** | **Long**| return all messages with an ID less than this value | [optional] [enum: 0]
### Return type
@@ -389,11 +419,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -412,12 +442,17 @@ Websocket, return newly created messages.
//import com.github.gotify.client.api.MessageApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -449,10 +484,10 @@ This endpoint does not need any parameter.
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
diff --git a/client/docs/PagedMessages.md b/client/docs/PagedMessages.md
index f8457cee..f3ddffcb 100644
--- a/client/docs/PagedMessages.md
+++ b/client/docs/PagedMessages.md
@@ -1,4 +1,3 @@
-
# PagedMessages
## Properties
@@ -6,6 +5,3 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**messages** | [**List<Message>**](Message.md) | The messages. |
**paging** | [**Paging**](Paging.md) | |
-
-
-
diff --git a/client/docs/Paging.md b/client/docs/Paging.md
index ef1a360a..12fbfd31 100644
--- a/client/docs/Paging.md
+++ b/client/docs/Paging.md
@@ -1,4 +1,3 @@
-
# Paging
## Properties
@@ -8,6 +7,3 @@ Name | Type | Description | Notes
**next** | **String** | The request url for the next page. Empty/Null when no next page is available. | [optional]
**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. |
-
-
-
diff --git a/client/docs/PluginApi.md b/client/docs/PluginApi.md
index f52d2351..7b7d870f 100644
--- a/client/docs/PluginApi.md
+++ b/client/docs/PluginApi.md
@@ -1,6 +1,6 @@
# PluginApi
-All URIs are relative to *http://localhost*
+All URIs are relative to *http://localhost/*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -11,7 +11,6 @@ Method | HTTP request | Description
[**getPlugins**](PluginApi.md#getPlugins) | **GET** plugin | Return all plugins.
[**updatePluginConfig**](PluginApi.md#updatePluginConfig) | **POST** plugin/{id}/config | Update YAML configuration for Configurer plugin.
-
# **disablePlugin**
> Void disablePlugin(id)
@@ -28,12 +27,17 @@ Disable a plugin.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -69,11 +73,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -92,12 +96,17 @@ Enable a plugin.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -133,11 +142,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -156,12 +165,17 @@ Get YAML configuration for Configurer plugin.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -197,11 +211,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/x-yaml
@@ -220,12 +234,17 @@ Get display info for a Displayer plugin.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -261,11 +280,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -284,12 +303,17 @@ Return all plugins.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -321,11 +345,11 @@ This endpoint does not need any parameter.
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -344,12 +368,17 @@ Update YAML configuration for Configurer plugin.
//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: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -385,10 +414,10 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/x-yaml
+ - **Content-Type**: Not defined
- **Accept**: application/json
diff --git a/client/docs/PluginConf.md b/client/docs/PluginConf.md
index daecd726..64a8c1e2 100644
--- a/client/docs/PluginConf.md
+++ b/client/docs/PluginConf.md
@@ -1,4 +1,3 @@
-
# PluginConf
## Properties
@@ -13,6 +12,3 @@ Name | Type | Description | Notes
**name** | **String** | The plugin name. |
**token** | **String** | The user name. For login. |
**website** | **String** | The website of the plugin. | [optional]
-
-
-
diff --git a/client/docs/UpdateUserExternal.md b/client/docs/UpdateUserExternal.md
new file mode 100644
index 00000000..a88d819f
--- /dev/null
+++ b/client/docs/UpdateUserExternal.md
@@ -0,0 +1,8 @@
+# UpdateUserExternal
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**admin** | **Boolean** | If the user is an administrator. |
+**name** | **String** | The user name. For login. |
+**pass** | **String** | The user password. For login. Empty for using old password | [optional]
diff --git a/client/docs/User.md b/client/docs/User.md
index 34b372cc..3a299613 100644
--- a/client/docs/User.md
+++ b/client/docs/User.md
@@ -1,12 +1,8 @@
-
# User
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**admin** | **Boolean** | If the user is an administrator. | [optional]
+**admin** | **Boolean** | If the user is an administrator. |
**id** | **Long** | The user id. |
**name** | **String** | The user name. For login. |
-
-
-
diff --git a/client/docs/UserApi.md b/client/docs/UserApi.md
index 2305bba1..9c7ec0a7 100644
--- a/client/docs/UserApi.md
+++ b/client/docs/UserApi.md
@@ -1,6 +1,6 @@
# UserApi
-All URIs are relative to *http://localhost*
+All URIs are relative to *http://localhost/*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -12,13 +12,14 @@ Method | HTTP request | Description
[**updateCurrentUser**](UserApi.md#updateCurrentUser) | **POST** current/user/password | Update the password of the current user.
[**updateUser**](UserApi.md#updateUser) | **POST** user/{id} | Update a user.
-
# **createUser**
> User createUser(body)
Create a user.
+With enabled registration: non admin users can be created without authentication. With disabled registrations: users can only be created by admin users.
+
### Example
```java
// Import classes:
@@ -29,12 +30,17 @@ Create a user.
//import com.github.gotify.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -48,7 +54,7 @@ clientTokenQuery.setApiKey("YOUR API KEY");
//clientTokenQuery.setApiKeyPrefix("Token");
UserApi apiInstance = new UserApi();
-UserWithPass body = new UserWithPass(); // UserWithPass | the user to add
+CreateUserExternal body = new CreateUserExternal(); // CreateUserExternal | the user to add
try {
User result = apiInstance.createUser(body);
System.out.println(result);
@@ -62,7 +68,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **body** | [**UserWithPass**](UserWithPass.md)| the user to add |
+ **body** | [**CreateUserExternal**](CreateUserExternal.md)| the user to add |
### Return type
@@ -70,7 +76,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
@@ -93,12 +99,17 @@ Return the current user.
//import com.github.gotify.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -130,11 +141,11 @@ This endpoint does not need any parameter.
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -153,12 +164,17 @@ Deletes a user.
//import com.github.gotify.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -194,11 +210,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -217,12 +233,17 @@ Get a user.
//import com.github.gotify.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -258,11 +279,11 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -281,12 +302,17 @@ Return all users.
//import com.github.gotify.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -318,11 +344,11 @@ This endpoint does not need any parameter.
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
@@ -341,12 +367,17 @@ Update the password of the current user.
//import com.github.gotify.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -382,7 +413,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
@@ -391,7 +422,7 @@ Name | Type | Description | Notes
# **updateUser**
-> User updateUser(id, body)
+> User updateUser(body, id)
Update a user.
@@ -405,12 +436,17 @@ Update a user.
//import com.github.gotify.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
-
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
+// Configure API key authorization: clientTokenAuthorizationHeader
+ApiKeyAuth clientTokenAuthorizationHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenAuthorizationHeader");
+clientTokenAuthorizationHeader.setApiKey("YOUR API KEY");
+// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+//clientTokenAuthorizationHeader.setApiKeyPrefix("Token");
+
// Configure API key authorization: clientTokenHeader
ApiKeyAuth clientTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("clientTokenHeader");
clientTokenHeader.setApiKey("YOUR API KEY");
@@ -424,10 +460,10 @@ clientTokenQuery.setApiKey("YOUR API KEY");
//clientTokenQuery.setApiKeyPrefix("Token");
UserApi apiInstance = new UserApi();
+UpdateUserExternal body = new UpdateUserExternal(); // UpdateUserExternal | the updated user
Long id = 789L; // Long | the user id
-UserWithPass body = new UserWithPass(); // UserWithPass | the updated user
try {
- User result = apiInstance.updateUser(id, body);
+ User result = apiInstance.updateUser(body, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
@@ -439,8 +475,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
+ **body** | [**UpdateUserExternal**](UpdateUserExternal.md)| the updated user |
**id** | **Long**| the user id |
- **body** | [**UserWithPass**](UserWithPass.md)| the updated user |
### Return type
@@ -448,7 +484,7 @@ Name | Type | Description | Notes
### Authorization
-[basicAuth](../README.md#basicAuth), [clientTokenHeader](../README.md#clientTokenHeader), [clientTokenQuery](../README.md#clientTokenQuery)
+[basicAuth](../README.md#basicAuth)[clientTokenAuthorizationHeader](../README.md#clientTokenAuthorizationHeader)[clientTokenHeader](../README.md#clientTokenHeader)[clientTokenQuery](../README.md#clientTokenQuery)
### HTTP request headers
diff --git a/client/docs/UserPass.md b/client/docs/UserPass.md
index 56eac5fe..1c396acc 100644
--- a/client/docs/UserPass.md
+++ b/client/docs/UserPass.md
@@ -1,10 +1,6 @@
-
# UserPass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pass** | **String** | The user password. For login. |
-
-
-
diff --git a/client/docs/VersionApi.md b/client/docs/VersionApi.md
index 0e175832..9fd3b8d7 100644
--- a/client/docs/VersionApi.md
+++ b/client/docs/VersionApi.md
@@ -1,12 +1,11 @@
# VersionApi
-All URIs are relative to *http://localhost*
+All URIs are relative to *http://localhost/*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getVersion**](VersionApi.md#getVersion) | **GET** version | Get version information.
-
# **getVersion**
> VersionInfo getVersion()
@@ -43,6 +42,6 @@ No authorization required
### HTTP request headers
- - **Content-Type**: application/json
+ - **Content-Type**: Not defined
- **Accept**: application/json
diff --git a/client/docs/VersionInfo.md b/client/docs/VersionInfo.md
index 0ac7561c..19e205ac 100644
--- a/client/docs/VersionInfo.md
+++ b/client/docs/VersionInfo.md
@@ -1,4 +1,3 @@
-
# VersionInfo
## Properties
@@ -7,6 +6,3 @@ Name | Type | Description | Notes
**buildDate** | **String** | The date on which this binary was built. |
**commit** | **String** | The git commit hash on which this binary was built. |
**version** | **String** | The current version. |
-
-
-
diff --git a/client/git_push.sh b/client/git_push.sh
index ae01b182..ed374619 100644
--- a/client/git_push.sh
+++ b/client/git_push.sh
@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
diff --git a/client/gradle/wrapper/gradle-wrapper.jar b/client/gradle/wrapper/gradle-wrapper.jar
index 2c6137b8..d64cd491 100644
Binary files a/client/gradle/wrapper/gradle-wrapper.jar and b/client/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/client/gradle/wrapper/gradle-wrapper.properties b/client/gradle/wrapper/gradle-wrapper.properties
index b7a36473..1af9e093 100644
--- a/client/gradle/wrapper/gradle-wrapper.properties
+++ b/client/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Tue May 17 23:08:05 CST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
diff --git a/client/pom.xml b/client/pom.xml
index 448b58d0..ca79f7bc 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -1,249 +1,244 @@
- 4.0.0
- io.swagger
- swagger-java-client
- jar
- swagger-java-client
- 1.0.0
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+ io.swagger
+ swagger-java-client
+ jar
+ swagger-java-client
+ 1.0.0
+ https://github.com/swagger-api/swagger-codegen
+ Swagger Java
+
+ scm:git:git@github.com:swagger-api/swagger-codegen.git
+ scm:git:git@github.com:swagger-api/swagger-codegen.git
https://github.com/swagger-api/swagger-codegen
- Swagger Java
-
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- scm:git:git@github.com:swagger-api/swagger-codegen.git
- https://github.com/swagger-api/swagger-codegen
-
+
+
+ 2.2.0
+
-
-
- Unlicense
- https://github.com/gotify/server/blob/master/LICENSE
- repo
-
-
+
+
+ Unlicense
+ https://github.com/gotify/server/blob/master/LICENSE
+ repo
+
+
-
-
- Swagger
- apiteam@swagger.io
- Swagger
- http://swagger.io
-
-
+
+
+ Swagger
+ apiteam@swagger.io
+ Swagger
+ http://swagger.io
+
+
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- 3.0.0-M1
-
-
- enforce-maven
-
- enforce
-
-
-
-
- 2.2.0
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 2.12
-
-
-
- loggerPath
- conf/log4j.properties
-
-
- -Xms512m -Xmx1500m
- methods
- pertest
-
-
-
- maven-dependency-plugin
-
-
- package
-
- copy-dependencies
-
-
- ${project.build.directory}/lib
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.2
-
-
-
- jar
- test-jar
-
-
-
-
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.12
+
+
+
+ loggerPath
+ conf/log4j.properties
+
+
+ -Xms512m -Xmx1500m
+ methods
+ pertest
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/lib
+
+
+
+
-
- org.codehaus.mojo
- build-helper-maven-plugin
- 1.10
-
-
- add_sources
- generate-sources
-
- add-source
-
-
-
-
-
-
-
-
- add_test_sources
- generate-test-sources
-
- add-test-source
-
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.4
-
-
- attach-javadocs
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.2.1
-
-
- attach-sources
-
- jar-no-fork
-
-
-
-
-
-
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 2.2
+
+
+
+ jar
+ test-jar
+
+
+
+
+
+
-
-
- sign-artifacts
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 1.5
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
-
-
-
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.10
+
+
+ add_sources
+ generate-sources
+
+ add-source
+
+
+
+
+
+
+
+
+ add_test_sources
+ generate-test-sources
+
+ add-test-source
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
-
-
- io.swagger
- swagger-annotations
- ${swagger-core-version}
-
-
- com.squareup.retrofit2
- converter-gson
- ${retrofit-version}
-
-
- com.squareup.retrofit2
- retrofit
- ${retrofit-version}
-
-
- com.squareup.retrofit2
- converter-scalars
- ${retrofit-version}
-
-
- org.apache.oltu.oauth2
- org.apache.oltu.oauth2.client
- ${oltu-version}
-
-
- io.gsonfire
- gson-fire
- ${gson-fire-version}
-
+
+
+ sign-artifacts
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.5
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+
+
+
+ jdk11
+
+ [11,)
+
+
- org.threeten
- threetenbp
- ${threetenbp-version}
+ com.sun.xml.ws
+ jaxws-rt
+ 2.3.3
+ pom
+
+
+
+
+
+ io.swagger.core.v3
+ swagger-annotations
+ ${swagger-core-version}
+
+
+ com.squareup.retrofit2
+ converter-gson
+ ${retrofit-version}
+
+
+ com.squareup.retrofit2
+ retrofit
+ ${retrofit-version}
+
+
+ com.squareup.retrofit2
+ converter-scalars
+ ${retrofit-version}
+
+
+ org.apache.oltu.oauth2
+ org.apache.oltu.oauth2.client
+ ${oltu-version}
+
+
+ io.gsonfire
+ gson-fire
+ ${gson-fire-version}
+
+
+ org.threeten
+ threetenbp
+ ${threetenbp-version}
+
+
-
-
- junit
- junit
- ${junit-version}
- test
-
-
-
- UTF-8
- 1.7
- ${java.version}
- ${java.version}
- 1.8.0
- 1.5.15
- 2.3.0
- 1.3.5
- 1.0.1
- 4.12
-
+
+
+ junit
+ junit
+ ${junit-version}
+ test
+
+
+
+ UTF-8
+ 11
+ ${java.version}
+ ${java.version}
+ 1.8.0
+ 2.0.0
+ 2.3.0
+ 1.3.5
+ 1.0.2
+ 4.13.1
+
diff --git a/client/src/main/java/com/github/gotify/client/ApiClient.java b/client/src/main/java/com/github/gotify/client/ApiClient.java
index f8466e0a..8f7e13cf 100644
--- a/client/src/main/java/com/github/gotify/client/ApiClient.java
+++ b/client/src/main/java/com/github/gotify/client/ApiClient.java
@@ -43,13 +43,17 @@ public ApiClient() {
public ApiClient(String[] authNames) {
this();
for(String authName : authNames) {
- Interceptor auth;
- if ("appTokenHeader".equals(authName)) {
+ Interceptor auth = null;
+ if ("appTokenAuthorizationHeader".equals(authName)) {
+ auth = new ApiKeyAuth("header", "Authorization");
+ } else if ("appTokenHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "X-Gotify-Key");
} else if ("appTokenQuery".equals(authName)) {
auth = new ApiKeyAuth("query", "token");
} else if ("basicAuth".equals(authName)) {
auth = new HttpBasicAuth();
+ } else if ("clientTokenAuthorizationHeader".equals(authName)) {
+ auth = new ApiKeyAuth("header", "Authorization");
} else if ("clientTokenHeader".equals(authName)) {
auth = new ApiKeyAuth("header", "X-Gotify-Key");
} else if ("clientTokenQuery".equals(authName)) {
@@ -112,7 +116,7 @@ public void createDefaultAdapter() {
json = new JSON();
okBuilder = new OkHttpClient.Builder();
- String baseUrl = "http://localhost";
+ String baseUrl = "http://localhost/";
if (!baseUrl.endsWith("/"))
baseUrl = baseUrl + "/";
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 fdd1edbf..40dc7d07 100644
--- a/client/src/main/java/com/github/gotify/client/JSON.java
+++ b/client/src/main/java/com/github/gotify/client/JSON.java
@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
- * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
+ * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). 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: 2.0.1
+ * OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,7 +10,6 @@
* Do not edit the class manually.
*/
-
package com.github.gotify.client;
import com.google.gson.Gson;
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 fcb0212b..4e134639 100644
--- a/client/src/main/java/com/github/gotify/client/StringUtil.java
+++ b/client/src/main/java/com/github/gotify/client/StringUtil.java
@@ -1,8 +1,8 @@
/*
* Gotify REST-API.
- * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be either transmitted through a header named `X-Gotify-Key` or a query parameter named `token`. There is also the possibility to authenticate through basic auth, this should only be used for creating a clientToken. \\--- Found a bug or have some questions? [Create an issue on GitHub](https://github.com/gotify/server/issues)
+ * This is the documentation of the Gotify REST-API. # Authentication In Gotify there are two token types: __clientToken__: a client is something that receives message and manages stuff like creating new tokens or delete messages. (f.ex this token should be used for an android app) __appToken__: an application is something that sends messages (f.ex. this token should be used for a shell script) The token can be transmitted in a header named `X-Gotify-Key`, in a query parameter named `token` or through a header named `Authorization` with the value prefixed with `Bearer` (Ex. `Bearer randomtoken`). 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: 2.0.1
+ * OpenAPI spec version: 2.0.2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-
package com.github.gotify.client;
+
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/ApplicationApi.java b/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java
index 2a7de1c6..1e983e04 100644
--- a/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java
+++ b/client/src/main/java/com/github/gotify/client/api/ApplicationApi.java
@@ -9,6 +9,7 @@
import okhttp3.ResponseBody;
import com.github.gotify.client.model.Application;
+import com.github.gotify.client.model.ApplicationParams;
import com.github.gotify.client.model.Error;
import java.io.File;
@@ -29,7 +30,7 @@ public interface ApplicationApi {
})
@POST("application")
Call createApp(
- @retrofit2.http.Body Application body
+ @retrofit2.http.Body ApplicationParams body
);
/**
@@ -38,9 +39,6 @@ Call createApp(
* @param id the application id (required)
* @return Call<Void>
*/
- @Headers({
- "Content-Type:application/json"
- })
@DELETE("application/{id}")
Call deleteApp(
@retrofit2.http.Path("id") Long id
@@ -51,13 +49,21 @@ Call deleteApp(
*
* @return Call<List<Application>>
*/
- @Headers({
- "Content-Type:application/json"
- })
@GET("application")
Call> getApps();
+ /**
+ * Deletes an image of an application.
+ *
+ * @param id the application id (required)
+ * @return Call<Void>
+ */
+ @DELETE("application/{id}/image")
+ Call removeAppImage(
+ @retrofit2.http.Path("id") Long id
+ );
+
/**
* Update an application.
*
@@ -70,13 +76,13 @@ Call deleteApp(
})
@PUT("application/{id}")
Call updateApplication(
- @retrofit2.http.Body Application body, @retrofit2.http.Path("id") Long id
+ @retrofit2.http.Body ApplicationParams body, @retrofit2.http.Path("id") Long id
);
/**
* Upload an image for an application.
*
- * @param file the application image (required)
+ * @param file (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
index 3da8dda5..66b12cb4 100644
--- a/client/src/main/java/com/github/gotify/client/api/ClientApi.java
+++ b/client/src/main/java/com/github/gotify/client/api/ClientApi.java
@@ -9,6 +9,7 @@
import okhttp3.ResponseBody;
import com.github.gotify.client.model.Client;
+import com.github.gotify.client.model.ClientParams;
import com.github.gotify.client.model.Error;
import java.util.ArrayList;
@@ -28,7 +29,7 @@ public interface ClientApi {
})
@POST("client")
Call createClient(
- @retrofit2.http.Body Client body
+ @retrofit2.http.Body ClientParams body
);
/**
@@ -37,9 +38,6 @@ Call createClient(
* @param id the client id (required)
* @return Call<Void>
*/
- @Headers({
- "Content-Type:application/json"
- })
@DELETE("client/{id}")
Call deleteClient(
@retrofit2.http.Path("id") Long id
@@ -50,9 +48,6 @@ Call deleteClient(
*
* @return Call<List<Client>>
*/
- @Headers({
- "Content-Type:application/json"
- })
@GET("client")
Call> getClients();
@@ -69,7 +64,7 @@ Call deleteClient(
})
@PUT("client/{id}")
Call updateClient(
- @retrofit2.http.Body Client body, @retrofit2.http.Path("id") Long id
+ @retrofit2.http.Body ClientParams body, @retrofit2.http.Path("id") Long id
);
}
diff --git a/client/src/main/java/com/github/gotify/client/api/HealthApi.java b/client/src/main/java/com/github/gotify/client/api/HealthApi.java
index 38a37a98..8757825f 100644
--- a/client/src/main/java/com/github/gotify/client/api/HealthApi.java
+++ b/client/src/main/java/com/github/gotify/client/api/HealthApi.java
@@ -21,9 +21,6 @@ public interface HealthApi {
*
* @return Call<Health>
*/
- @Headers({
- "Content-Type:application/json"
- })
@GET("health")
Call getHealth();
diff --git a/client/src/main/java/com/github/gotify/client/api/MessageApi.java b/client/src/main/java/com/github/gotify/client/api/MessageApi.java
index 8e54861e..ba567347 100644
--- a/client/src/main/java/com/github/gotify/client/api/MessageApi.java
+++ b/client/src/main/java/com/github/gotify/client/api/MessageApi.java
@@ -38,9 +38,6 @@ Call createMessage(
* @param id the application id (required)
* @return Call<Void>
*/
- @Headers({
- "Content-Type:application/json"
- })
@DELETE("application/{id}/message")
Call deleteAppMessages(
@retrofit2.http.Path("id") Long id
@@ -52,9 +49,6 @@ Call deleteAppMessages(
* @param id the message id (required)
* @return Call<Void>
*/
- @Headers({
- "Content-Type:application/json"
- })
@DELETE("message/{id}")
Call deleteMessage(
@retrofit2.http.Path("id") Long id
@@ -65,9 +59,6 @@ Call deleteMessage(
*
* @return Call<Void>
*/
- @Headers({
- "Content-Type:application/json"
- })
@DELETE("message")
Call deleteMessages();
@@ -80,9 +71,6 @@ Call deleteMessage(
* @param since return all messages with an ID less than this value (optional)
* @return Call<PagedMessages>
*/
- @Headers({
- "Content-Type:application/json"
- })
@GET("application/{id}/message")
Call getAppMessages(
@retrofit2.http.Path("id") Long id, @retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Long since
@@ -95,9 +83,6 @@ Call getAppMessages(
* @param since return all messages with an ID less than this value (optional)
* @return Call<PagedMessages>
*/
- @Headers({
- "Content-Type:application/json"
- })
@GET("message")
Call getMessages(
@retrofit2.http.Query("limit") Integer limit, @retrofit2.http.Query("since") Long since
@@ -108,9 +93,6 @@ Call getMessages(
*
* @return Call<Message>
*/
- @Headers({
- "Content-Type:application/json"
- })
@GET("stream")
Call streamMessages();
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
index ed549089..94717de5 100644
--- a/client/src/main/java/com/github/gotify/client/api/PluginApi.java
+++ b/client/src/main/java/com/github/gotify/client/api/PluginApi.java
@@ -23,9 +23,6 @@ public interface PluginApi {
* @param id the plugin id (required)
* @return Call<Void>
*/
- @Headers({
- "Content-Type:application/json"
- })
@POST("plugin/{id}/disable")
Call disablePlugin(
@retrofit2.http.Path("id") Long id
@@ -37,9 +34,6 @@ Call disablePlugin(
* @param id the plugin id (required)
* @return Call<Void>
*/
- @Headers({
- "Content-Type:application/json"
- })
@POST("plugin/{id}/enable")
Call enablePlugin(
@retrofit2.http.Path("id") Long id
@@ -51,9 +45,6 @@ Call enablePlugin(
* @param id the plugin id (required)
* @return Call<Object>
*/
- @Headers({
- "Content-Type:application/json"
- })
@GET("plugin/{id}/config")
Call