Embloy's Java SDK for interacting with your Embloy integration.
Add Embloy-Java SDK:
/* For Gradle, add the following dependency to your build.gradle and replace with the version number you want to use from: - https://mvnrepository.com/artifact/com.embloy/sdk or - https://github.com/embloy/embloy-java/releases/latest*/implementation"com.embloy:sdk:0.1.14"/* For Gradle with Kotlin, add the following dependency to your build.gradle.kts and replace with the version number you want to use from: - https://mvnrepository.com/artifact/com.embloy/sdk or - https://github.com/embloy/embloy-java/releases/latest*/implementation("com.embloy:sdk:0.1.14")<!-- For Maven, add the following dependency to your POM and replace with the version number you want to use from: - https://mvnrepository.com/artifact/com.embloy/sdk or - https://github.com/embloy/embloy-java/releases/latest-->
<dependency>
<groupId>com.embloy</groupId>
<artifactId>sdk</artifactId>
<version>0.1.14</version>
</dependency>Integrate it in your service:
importembloy.EmbloyClient;
importembloy.EmbloySession;
publicclassExampleClass {
publicstaticvoidexampleEndpoint() {
// Replace these values with your actual client token and session dataStringclientToken = "your-client-token";
EmbloySessionsession = newEmbloySession(EmbloySession.EmbloyRequestMode.JOB_MODE, "your-job-slug", "your-success-url", "your-cancel-url");
EmbloyClientembloyClient = newEmbloyClient(clientToken, session);
try {
StringapplyUrl = embloyClient.makeRequest();
System.out.println("Redirect URL: " + applyUrl);
} catch (Exceptione) {
System.err.println("Error: " + e.getMessage());
}
}
}Build package from source (Reference)
javac src/main/java/embloy/EmbloyClient.java src/main/java/embloy/EmbloySession.java
mvn clean install # you'll be prompted to insert your gpg key passphrase
mvn release:clean release:prepare release:perform
mvn clean deploy # or alternatively mvn clean deploy -P release:::note
Make sure to have set up correct credentials in your settings.xml file (Reference)
<settings>
<profiles>
<profile>
<id>central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase>passphrase</gpg.passphrase>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>central</id>
<username>token_id</username>
<password>token_secret</password>
</server>
</servers>
</settings>:::
© Carlo Bortolan, Jan Hummel
Carlo Bortolan · GitHub @carlobortolan · contact via bortolanoffice@embloy.com
Jan Hummel · GitHub @github4touchdouble · contact via hummeloffice@embloy.com