Clarizen/rocket-chat-rest-client


Java REST client API for Rocket.Chat

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.Clarizen:rocket-chat-rest-client:1.0'
	}
	dependencies {
		implementation("com.github.Clarizen:rocket-chat-rest-client:1.0")
	}
	<dependency>
	    <groupId>com.github.Clarizen</groupId>
	    <artifactId>rocket-chat-rest-client</artifactId>
	    <version>1.0</version>
	</dependency>

                            
    libraryDependencies += "com.github.Clarizen" % "rocket-chat-rest-client" % "1.0"
        
        

                            
    :dependencies [[com.github.Clarizen/rocket-chat-rest-client "1.0"]]
        
        

Readme


rocket-chat-rest-client

Lightweight Java client for Rocket.Chat's REST API using Unirest and Jackson.

Build Status Codacy Badge

Notes

  • Requires Rocket.Chat v0.49.2 due to massive changes from Rocket.Chat, also v0.48 rewrote the REST API, see the pull request #5140 for details
  • This api is still a work in progress, feel free to submit pull requests to add functionality
  • Server url doesn't require api/ anymore, but it can still be provided
  • None of the results are cached, every time a method is called it goes out and gets it
  • The method calls are sync and blocking
  • Maven is configured to startup Rocket.Chat v.0.48-develop via docker therefore docker must be installed.

JavaDoc

The JavaDoc is generated per build: https://ci.craftyn.com/job/rocket-chat-rest-client/javadoc/

Maven

<repositories>
    <repository>
        <id>repo-snapshots</id>
        <url>https://repo.craftyn.com/repository/snapshots/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.github.baloise</groupId>
        <artifactId>rocket-chat-rest-client</artifactId>
        <version>0.1.2-SNAPSHOT</version>
    </dependency>
</dependencies>

Compiling

The maven build needs Docker for integration testing. Please install it for your platform before running and also make sure your user has permission to use the docker command (Linux, add your user to the docker group).

mvn clean install

To keep the docker containers running:

mvn -Ddocker.keepRunning clean install