| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
gotify-java-client is sync client of Gotify which written in Java.gotify-java-client can be used in Java or Android application.
You don't need to build from source to use gotify-java-client (binaries in release page), but if you want to try out the latest and greatest, gotify-java-client can be easily built with the maven. You also need JDK 1.8.
gotify-java-client requires Java 8 or + to run.
$ git clone https://github.com/ctlove0523/gotify-java-client.git
$ cd gotify-java-client
$ mvn clean packageIf you want to publish the artifacts to your local Maven repository use:
$ mvn clean installAdd gotify-java-client to your project dependencies like this:
<dependency>
<groupId>io.github.ctlove0523.gotify</groupId>
<artifactId>gotify-java-client</artifactId>
<version>{version}</version>
</dependency>New to Gotify? Check this Gotify and the Gotify API. Here is a very simple example about get applications from gotify server.
Credential credential=new BasicCredential.Builder()
.userName("admin")
.password("admin")
.build();
GotifyClientConfig config=new GotifyClientConfig.Builder()
.endpoint("http://localhost")
.credential(credential)
.build();
GotifyClient gotifyClient=GotifyClient.build(config);
MessageClient messageClient = gotifyClient.getMessageClient();
messageClient.registerMessageHandler(message -> System.out.println(message.getMessage()));All public method return one Resutl<T,E> object,when method success isSuccessful()method return true otherwise return false and get use error() to get server error response. Usual usage like below:
Result<List<Application>, GotifyResponseError> result = appClient.getApplications();
if (result.isSuccessful()) {
// do something
} else {
// process error/IOException
}Having trouble with gotify-java-client? We'd like to help!
gotify-java-client uses GitHub’s integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:
gotify-java-client is Open Source Software released under the MIT License.
| Back | FazBrowse Home | New Git URL |