Skip to content

lilt/lilt-connector-sdk-java

Repository files navigation

openapi-java-client

Lilt Connector Plugin API

  • API version: 1.0
    • Build date: 2025-01-05T09:10:14.232589379Z[Etc/UTC]
    • Generator version: 7.6.0-SNAPSHOT

This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects.

  • Read more about the concepts and workflows in the user guide.
  • Test the API interactively via Swagger UI.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

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.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-java-client</artifactId>
  <version>1.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'openapi-java-client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'openapi-java-client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "org.openapitools:openapi-java-client:1.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/openapi-java-client-1.0.jar
  • target/lib/*.jar

Getting Started

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

// Import classes:
import LiltConnectorSDK.ApiClient;
import LiltConnectorSDK.ApiException;
import LiltConnectorSDK.Configuration;
import LiltConnectorSDK.models.*;
import org.openapitools.client.api.CreditTransactionsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0");

    CreditTransactionsApi apiInstance = new CreditTransactionsApi(defaultClient);
    ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest = new ServicesApiCreditTransactionCreateCreditTransactionRequest(); // ServicesApiCreditTransactionCreateCreditTransactionRequest | 
    try {
      apiInstance.servicesApiCreditTransactionCreateCreditTransaction(servicesApiCreditTransactionCreateCreditTransactionRequest);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreditTransactionsApi#servicesApiCreditTransactionCreateCreditTransaction");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://connectors-admin.lilt.com/api/v1.0

Class Method HTTP request Description
CreditTransactionsApi servicesApiCreditTransactionCreateCreditTransaction POST /credit-transaction Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration.
JobsApi servicesApiJobsAddFile POST /jobs/{id}/files Add a file to a Job.
JobsApi servicesApiJobsCreateJob POST /jobs Create a Connector Job.
JobsApi servicesApiJobsDeleteJobById DELETE /jobs/{id} Delete a Connector Job.
JobsApi servicesApiJobsGetJobById GET /jobs/{id} Retrieve a Connector Job.
JobsApi servicesApiJobsGetJobTranslations GET /jobs/translations Retrieve a list of Translations with their Job information.
JobsApi servicesApiJobsGetJobs GET /jobs Retrieve a list of Connector Jobs.
JobsApi servicesApiJobsStartJob POST /jobs/{id}/start Start a Job.
JobsApi servicesApiJobsSyncJob POST /jobs/{id}/sync Start a Sync.
JobsApi servicesApiJobsUpdateJob PUT /jobs/{id} Update a Connector Job.
OrganizationApi servicesApiOrganizationGetOrganizationRecord GET /organization Get information about the organization based on lilt_token
RegistrationApi servicesApiRegistrationRegisterCreditsBasedOrganization POST /register Register a new Connectors Organization
SettingsApi servicesApiSettingsGetSettings GET /settings Retrieve the settings.
SettingsApi servicesApiSettingsUpdateSettings PUT /settings Update the settings.
TranslationsApi servicesApiDeliveriesCompleteDelivery POST /translations/{id}/complete Complete a Translation.
TranslationsApi servicesApiDeliveriesDownloadDelivery GET /translations/{id}/download Download a Translation.
TranslationsApi servicesApiDeliveriesDownloadDeliverySource GET /translations/{id}/source Download a Translation Source.
TranslationsApi servicesApiDeliveriesGetDeliveriesByJobId GET /translations Retrieve a list of Translations.
TranslationsApi servicesApiDeliveriesGetDeliveryById GET /translations/{id} Retrieve a Translation.
TranslationsApi servicesApiDeliveriesPreviewDelivery GET /translations/{id}/preview Get a Translation's source to target mapping.
TranslationsApi servicesApiDeliveriesUpdateDelivery PUT /translations/{id} Update a Translation.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: HTTP Bearer Token authentication

Recommendation

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

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages