-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a4fea9
commit 6b9976b
Showing
59 changed files
with
2,534 additions
and
2,401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,97 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>io.github.ctlove0523.gotify</groupId> | ||
<artifactId>gotify-java-client</artifactId> | ||
<version>0.0.2-SNAPSHOT</version> | ||
<groupId>io.github.ctlove0523.gotify</groupId> | ||
<artifactId>gotify-java-client</artifactId> | ||
<version>0.0.2</version> | ||
|
||
<properties> | ||
<java.version>1.8</java.version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.16</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>okhttp</artifactId> | ||
<version>4.6.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>2.12.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.12.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.java-websocket</groupId> | ||
<artifactId>Java-WebSocket</artifactId> | ||
<version>1.5.1</version> | ||
</dependency> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.16</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>okhttp</artifactId> | ||
<version>4.6.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>2.12.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.12.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.java-websocket</groupId> | ||
<artifactId>Java-WebSocket</artifactId> | ||
<version>1.5.1</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>mockwebserver</artifactId> | ||
<version>4.6.0</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>mockwebserver</artifactId> | ||
<version>4.6.0</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.2.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.2.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.10.3</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
<configuration> | ||
<additionalparam>-Xdoclint:none</additionalparam> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.10.3</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
<configuration> | ||
<additionalparam>-Xdoclint:none</additionalparam> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,62 @@ | ||
package io.github.ctlove0523.gotify; | ||
|
||
import java.util.List; | ||
|
||
import io.github.ctlove0523.gotify.app.Application; | ||
import io.github.ctlove0523.gotify.app.CreateApplicationRequest; | ||
import io.github.ctlove0523.gotify.app.UpdateApplicationRequest; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* client talk to gotify server to manage applications. | ||
* | ||
* @author chentong | ||
*/ | ||
public interface AppClient extends CloseableClient { | ||
|
||
/** | ||
* query all applications | ||
* | ||
* @return return a {@link Result} object,if success {@link Result#result()} return a list of | ||
* {@link Application} otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<List<Application>, ResponseError> getApplications(); | ||
|
||
/** | ||
* Create an application. | ||
* | ||
* @param createApplicationRequest {@link CreateApplicationRequest} | ||
* @return return a {@link Result} object,if success {@link Result#result()} return the created | ||
* {@link Application} otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Application, ResponseError> createApplication(CreateApplicationRequest createApplicationRequest); | ||
|
||
/** | ||
* Update an application | ||
* | ||
* @param id the id of an application | ||
* @param updateApplicationRequest {@link UpdateApplicationRequest} | ||
* @return return a {@link Result} object,if success {@link Result#result()} return the updated | ||
* {@link Application} otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Application, ResponseError> updateApplication(int id, UpdateApplicationRequest updateApplicationRequest); | ||
|
||
/** | ||
* Delete an application | ||
* @param id the id of an application | ||
* @return return a {@link Result} object,if success {@link Result#result()} return true | ||
* otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Boolean, ResponseError> deleteApplication(int id); | ||
|
||
/** | ||
* Upload an image for an application. | ||
* | ||
* @param id the id of an application | ||
* @param image the image for uploaded | ||
* @return return a {@link Result} object,if success {@link Result#result()} return the new | ||
* {@link Application} with new image,otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Application, ResponseError> uploadApplicationImage(int id, byte[] image); | ||
/** | ||
* query all applications | ||
* | ||
* @return return a {@link Result} object,if success {@link Result#result()} return a list of | ||
* {@link Application} otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<List<Application>, ResponseError> getApplications(); | ||
|
||
/** | ||
* Create an application. | ||
* | ||
* @param createApplicationRequest {@link CreateApplicationRequest} | ||
* @return return a {@link Result} object,if success {@link Result#result()} return the created | ||
* {@link Application} otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Application, ResponseError> createApplication(CreateApplicationRequest createApplicationRequest); | ||
|
||
/** | ||
* Update an application | ||
* | ||
* @param id the id of an application | ||
* @param updateApplicationRequest {@link UpdateApplicationRequest} | ||
* @return return a {@link Result} object,if success {@link Result#result()} return the updated | ||
* {@link Application} otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Application, ResponseError> updateApplication(int id, UpdateApplicationRequest updateApplicationRequest); | ||
|
||
/** | ||
* Delete an application | ||
* | ||
* @param id the id of an application | ||
* @return return a {@link Result} object,if success {@link Result#result()} return true | ||
* otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Boolean, ResponseError> deleteApplication(int id); | ||
|
||
/** | ||
* Upload an image for an application. | ||
* | ||
* @param id the id of an application | ||
* @param image the image for uploaded | ||
* @return return a {@link Result} object,if success {@link Result#result()} return the new | ||
* {@link Application} with new image,otherwise {@link Result#error()} return a {@link ResponseError} | ||
*/ | ||
Result<Application, ResponseError> uploadApplicationImage(int id, byte[] image); | ||
|
||
} |
Oops, something went wrong.