AimMatic SDKs are easiest and best supported way for most developers to use AimMatic APIs.
Natural Voice SDK is a client library to help developers quickly deploy applications with programmatic connections to Natural Voice APIs.
This SDK requires an API Key and Secret Key to establish a secure connection to placeNext.
Create AimMatic Key Pair in the AimMatic Dev Console. Login at https://account.aimmatic.com and navigate to My Apps.
To run the SDK you will need Java 1.8+.
The recommended way to use the AimMatic SDK for Java in your project is to consume it from Maven.
Using the SDK Maven modules
<dependency>
<groupId>com.aimmatic</groupId>
<artifactId>aimmatic</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
Using the SDK Gradle modules
compile 'com.aimmatic:aimmatic:1.0'
In this update, API Key and Key Pair can be provided in 3 ways.
- provide at runtime using class
RuntimeCredentialsProvider
RuntimeCredentialsProvider.setAimMaticCredentials(...);
- provide via environment variable using variable
AIMMATIC_API_KEY
andAIMMATIC_SECRET_KEY
- provide via System properties using properties
aimmatic.apiKey
andaimmatic.secretKey
The Authentication will lookup from option 1 to option 3. If it finds the credentials then the provider will
use for subsequent request unless invoke Signature.resetLastUsedCredentialsProvider()
which will lookup
again from option 1 to option 3.
We generate our model objects from the swagger file located in: src/main/resources/aimmatic.yml using the Maven swagger-codegen tool as defined in pom.xml.
Pre-requirement:
- Maven command line installed
- A platform that supports Linux Shell Script, on Windows using power shell or Windows 10 linux integration
To generate the model source code execute this command ./gen.sh
Due to limitations in OpenAPI and Swagger Generated code, we do override a few generated files, please see below:
- Point.java or Polygon.java (see OAI/OpenAPI-Specification#1313)
- Confugration.java as we need to enable custom verification as well as an issue going (see swagger-api/swagger-codegen#5187)
Tests are found for all APIs in the test folder. Please edit BaseTest.java as needed since it contains the API server, key settings and other parameters that need tweaking.