Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/embloy/embloy-java

Embloy's Java SDK for interacting with your Embloy integration.
https://github.com/embloy/embloy-java

java-11 maven sdk sdk-java

Last synced: 25 days ago
JSON representation

Embloy's Java SDK for interacting with your Embloy integration.

Awesome Lists containing this project

README

        

# [Embloy Java](https://search.maven.org/artifact/com.embloy/sdk) · [![GitHub license](https://img.shields.io/badge/license-AGPL3.0-blue.svg)](https://github.com/Embloy/Embloy-Java/blob/main/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/com.embloy/sdk.svg?style=flat)](https://search.maven.org/artifact/com.embloy/sdk) [![Issues](https://img.shields.io/github/issues/Embloy/Embloy-Java)](https://github.com/Embloy/Embloy-Java/issues) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Embloy/Embloy-Java/pulls)

Embloy's Java SDK for interacting with your Embloy integration.

## Usage

Add Embloy-Java SDK:

```Java title="build.gradle"
/*
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"
```

```Java title="build.gradle.kts"
/*
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")
```

```XML title="pom.xml"

com.embloy
sdk
0.1.14

```

Integrate it in your service:

```Java title="main.java"
import embloy.EmbloyClient;
import embloy.EmbloySession;

public class ExampleClass {
public static void exampleEndpoint() {
// Replace these values with your actual client token and session data
String clientToken = "your-client-token";

EmbloySession session = new EmbloySession(EmbloySession.EmbloyRequestMode.JOB_MODE, "your-job-slug", "your-success-url", "your-cancel-url");

EmbloyClient embloyClient = new EmbloyClient(clientToken, session);

try {
String applyUrl = embloyClient.makeRequest();
System.out.println("Redirect URL: " + applyUrl);
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
}
```

## Build package from source ([Reference](https://central.sonatype.org/publish-ea/publish-ea-guide/))

```Bash
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](https://central.sonatype.org/publish/generate-portal-token/#050))

```xml



central

true


gpg2
passphrase





central
token_id
token_secret

```
:::

© Carlo Bortolan, Jan Hummel

> Carlo Bortolan  · 
> GitHub [@carlobortolan](https://github.com/carlobortolan)  · 
> contact via [[email protected]](mailto:[email protected])
>
> Jan Hummel  · 
> GitHub [@github4touchdouble](https://github.com/github4touchdouble)  · 
> contact via [[email protected]](mailto:[email protected])