The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted.
-
For more information, please visit https://docs.dyspatch.io
Automatically generated by the Swagger Codegen
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>io.dyspatch</groupId>
<artifactId>dyspatch-java</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "io.dyspatch:dyspatch-java:2.0.0"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/dyspatch-java-2.0.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import io.dyspatch.client.*;
import io.dyspatch.client.auth.*;
import io.dyspatch.client.model.*;
import io.dyspatch.client.api.LocalizationsApi;
import java.io.File;
import java.util.*;
public class LocalizationsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: Bearer
ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
Bearer.setApiKey("YOUR API KEY");
Bearer.setApiKeyPrefix("Bearer");
LocalizationsApi apiInstance = new LocalizationsApi();
String localizationId = "localizationId_example"; // String | A localization ID
String targetLanguage = "targetLanguage_example"; // String | The type of templating language to compile as. Required only for visual templates.
try {
LocalizationRead result = apiInstance.localizationsLocalizationIdGet(localizationId, targetLanguage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LocalizationsApi#localizationsLocalizationIdGet");
e.printStackTrace();
}
}
}
All URIs are relative to https://api.dyspatch.io/
Class | Method | HTTP request | Description |
---|---|---|---|
LocalizationsApi | localizationsLocalizationIdGet | GET /localizations/{localizationId} | Get Localization Object by ID |
TemplatesApi | templatesGet | GET /templates | List Templates |
TemplatesApi | templatesTemplateIdGet | GET /templates/{templateId} | Get Template by ID |
- APIError
- CompiledRead
- Cursor
- LocalizationMetaRead
- LocalizationRead
- TemplateMetaRead
- TemplateRead
- TemplatesRead
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.