Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

OneHourTranslation API Library for Java

One Hour Translation™ provides translation, proofreading and transcription services worldwide. The following API library allows customers to submit and monitor jobs automatically and remotely.

Preconditions and Dependencies

Authentication

  1. Register as a customer on One Hour Translation.
  2. Request your API Keys here.

Dependencies

  1. JDK 1.7 or higher
  2. Apache HttpComponents Client library (http://hc.apache.org/)
  3. Google Gson library (https://github.com/google/gson)

Starters' Guide

Configuration

The API Library must be instantiated and configured before calling any API method.

OHTAPI api = new OHTAPI("<secret key here>", "<public key here>", false); // or <true> for using OHT Sandbox environment

Running Methods

Once initialized, you are ready to call API methods. For example, requesting account details:

AccountDetails acc = api.getAccountDetails();

Complete Example

OHTAPI api = new OHTAPI("<secret key here>", "<public key here>", true);
try {
    // get account details
    AccountDetails acc = api.getAccountDetails();
    System.out.printf("Account id=%d, name=%s\n", acc.getAccountId(), acc.getAccountUsername());
} catch (OHTException ex) {
    ex.printStackTrace();
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages