Java client API

The Targomo-java library allows you to use the Targomo services directly from a Java app. We do not provide an extensions library for Targomo-java, unlike Targomo-js for which we provide a Targomo-js-extensions library. This is because generally JavaScript/TypeScript are languages which are more likely to be used in a front-end solution compared to Java.

Installing

You can use Targomo-java by adding it as a dependency to your Maven configuration:

<dependency>
    <groupId>com.targomo</groupId>
    <artifactId>java-client</artifactId>
    <version>0.1.9</version>
</dependency>

Find the latest version of Targomo-java here: com.targomo/java-client

You also need to add a JAX-RS implementation of your choice. In our code examples we use Jersey. We require the following dependencies in our Maven configuration:

<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-client</artifactId>
    <version>2.28</version>
</dependency>
<dependency>
    <groupId>org.glassfish.jersey.inject</groupId>
    <artifactId>jersey-hk2</artifactId>
    <version>2.28</version>
</dependency>
<dependency>
    <groupId>javax.activation</groupId>
    <artifactId>activation</artifactId>
    <version>1.1</version>
</dependency>