Skip to content

Repository files navigation

Dyspatch API Client

Introduction

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

Installation

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

Getting Started

Please follow the installation instruction and execute the following Java code:

importio.dyspatch.client.*;
importio.dyspatch.client.auth.*;
importio.dyspatch.client.model.*;
importio.dyspatch.client.api.TemplatesApi;
publicclassMain {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: BearerApiKeyAuthBearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
Bearer.setApiKey("DYSPATCH_API_KEY");
Bearer.setApiKeyPrefix("Bearer");
TemplatesApiapiInstance = newTemplatesApi();
Stringaccept = "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 (ApiExceptione) {
System.err.println("Exception when calling TemplatesApi#templatesGet");
e.printStackTrace();
}
}
}

Documentation for API Endpoints

All URIs are relative to https://api.dyspatch.io

ClassMethodHTTP requestDescription
LocalizationsApilocalizationsLocalizationIdGetGET /localizations/{localizationId}Get Localization Object by ID
TemplatesApitemplatesGetGET /templatesList Templates
TemplatesApitemplatesTemplateIdGetGET /templates/{templateId}Get Template by ID

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

support@dyspatch.io

About

An OpenAPI generated Dyspatch client in Java

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages