lilt/lilt-connector-sdk-php

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 abo

1.0.0 2023-09-18 17:56 UTC

This package is auto-updated.

Last update: 2024-04-30 00:27:24 UTC


README

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.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/lilt-connector-sdk-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new LiltConnectorSDK\Api\CreditTransactionsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$services_api_credit_transaction_create_credit_transaction_request = new \LiltConnectorSDK\Model\ServicesApiCreditTransactionCreateCreditTransactionRequest(); // \LiltConnectorSDK\Model\ServicesApiCreditTransactionCreateCreditTransactionRequest

try {
    $apiInstance->servicesApiCreditTransactionCreateCreditTransaction($services_api_credit_transaction_create_credit_transaction_request);
} catch (Exception $e) {
    echo 'Exception when calling CreditTransactionsApi->servicesApiCreditTransactionCreateCreditTransaction: ', $e->getMessage(), PHP_EOL;
}

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 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 servicesApiDeliveriesUpdateDelivery PUT /translations/{id} Update a Translation.

Models

Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen