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.
PHP 7.3 and later. Should also work with PHP 8.0 or 8.1 but has not been tested.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/lilt/lilt-connector-sdk-php.git"
}
],
"require": {
"lilt/lilt-connector-sdk-php": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/lilt-connector-sdk/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: BearerAuth
$config = LiltConnectorSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new LiltConnectorSDK\Api\JobsApi(
// 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(),
$config
);
$id = 12345; // int | The Job ID.
$name = sample.txt; // string | The file name.
$srclang = 'en-US'; // string | The source language.
$trglang = array('trglang_example'); // string[] | The target language. Many target languages can be added to a source file.
$due = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The due date for the file.
$body = "/path/to/file.txt"; // \SplFileObject
try {
$apiInstance->servicesApiJobsAddFile($id, $name, $srclang, $trglang, $due, $body);
} catch (Exception $e) {
echo 'Exception when calling JobsApi->servicesApiJobsAddFile: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://connectors-admin.lilt.com/api/v1.0
Class | Method | HTTP request | Description |
---|---|---|---|
JobsApi | servicesApiJobsAddFile | POST /jobs/{id}/files | Add a file to a Job. |
JobsApi | servicesApiJobsCreateJob | POST /jobs | Create 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. |
RegistrationApi | servicesApiRegistrationRegister | POST /register | Register a new connector installation. |
SettingsApi | servicesApiSettingsGetSettings | GET /settings | Retrieve the settings. |
SettingsApi | servicesApiSettingsUpdateSettings | PUT /settings | Update the settings. |
TranslationsApi | servicesApiDeliveriesDownloadDelivery | GET /translations/{id}/download | Download a Translation. |
TranslationsApi | servicesApiDeliveriesGetDeliveriesByJobId | GET /translations | Retrieve a list of Translations. |
TranslationsApi | servicesApiDeliveriesGetDeliveryById | GET /translations/{id} | Retrieve a Translation. |
- JobResponse
- JobResponse1
- JobsResponse
- RegistrationRequest
- RegistrationResponse
- SettingsResponse
- SettingsResponse1
- TranslationResponse
- Type: Bearer authentication
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen