Simple calculator API hosted on APIMATIC
Install the SDK by adding the following dependency in your project's pom.xml file:
<dependency>
<groupId>io.sdks</groupId>
<artifactId>sdks-java-sdk</artifactId>
<version>8.8.14</version>
</dependency>You can also view the package at: https://central.sonatype.com/artifact/io.sdks/sdks-java-sdk/8.8.14
The generated code and the server can be tested using automatically generated test cases. JUnit is used as the testing framework and test runner.
In Eclipse, for running the tests do the following:
- Select the project ApimaticCalculatorLib from the package explorer.
- Select
Run -> Run as -> JUnit Testor useAlt + Shift + Xfollowed byTto run the Tests.
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
|---|---|---|
environment |
Environment |
The API environment. Default: Environment.PRODUCTION |
httpClientConfig |
Consumer<HttpClientConfiguration.Builder> |
Set up Http Client Configuration instance. |
The API client can be initialized as follows:
ApimaticCalculatorClient client = new ApimaticCalculatorClient.Builder()
.httpClientConfig(configBuilder -> configBuilder
.timeout(0))
.environment(Environment.PRODUCTION)
.build();