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. See our Implementation Guide for more details on how to implement Dyspatch.
This Java package is automatically generated by the Swagger Codegen project:
- API version: 2018.08
- Package version: 1.0.0
For more information, please visit https://docs.dyspatch.io
via maven (preferred) Add the following to your pom.xml:
<!-- in the repositories section -->
<repository>
<id>repo</id>
<url>https://github.com/get-dyspatch/dyspatch-mvn/raw/master/releases</url>
</repository>
<!-- in the dependencies section -->
<dependency>
<groupId>io.dyspatch</groupId>
<artifactId>dyspatch-java</artifactId>
<version>1.0.0</version>
</dependency>
via wget:
$ wget https://github.com/sendwithus/sendwithus-mvn-repo/raw/master/releases/com/sendwithus/java-client/2.1.1/java-client-2.1.1.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.TemplatesApi;
public class Main {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: Bearer
ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
Bearer.setApiKey("DYSPATCH_API_KEY");
Bearer.setApiKeyPrefix("Bearer");
TemplatesApi apiInstance = new TemplatesApi();
String accept = "application/vnd.dyspatch.2018.08+json"; // String | A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
try {
ApiResponse<TemplatesRead> result = apiInstance.templatesGetWithHttpInfo(accept, "");
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesGet");
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.