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
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
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 8.1 and later.
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_settings_validate_request = new \LiltConnectorSDK\Model\ServicesApiSettingsValidateRequest(); // \LiltConnectorSDK\Model\ServicesApiSettingsValidateRequest try { $apiInstance->servicesApiCreditTransactionCreateCreditTransaction($services_api_settings_validate_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. |
| DomainsApi | servicesApiDomainsGetDomains | GET /domains | Retrieve a list of Connector Domains. |
| DomainsApi | servicesApiDomainsGetDomainsLanguages | GET /domains/languages | Retrieve the domains languages. |
| JobsApi | servicesApiJobsAddFile | POST /jobs/{id}/files | Add a file to a Job. |
| JobsApi | servicesApiJobsCompareFileProcessing | POST /jobs/compare-files | Compare Source and Target Files After Preprocessing |
| 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 | servicesApiJobsPreviewFileProcessing | POST /jobs/preview-file | Preview File |
| 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. |
| LanguagesApi | servicesApiLanguagesGetLanguages | GET /languages | Retrieve supported language and locale codes. |
| LogsApi | servicesApiLogsCreateLogEntry | POST /logs | Create a log entry for monitoring and debugging. |
| 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. |
| SettingsApi | servicesApiSettingsValidate | POST /settings/validate | Validate Connector Configuration |
| 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. |
Models
- ConnectorConfigurationValidationResponse
- DomainsResponseInner
- ErrorResponse
- JobResponse
- JobsResponse
- LanguagesResponse
- NewJobOptions
- NewJobOptionsTargetModelsInner
- NewOrganizationOptions
- OrganizationResponse
- PreviewTranslationResponseInner
- ServicesApiJobsPreviewFileProcessing400Response
- ServicesApiLogsCreateLogEntryRequest
- ServicesApiSettingsValidateRequest
- SettingsLanguagesResponseInner
- SettingsResponse
- SettingsResponseTargetMemoriesValue
- TranslationResponse
- TranslationsResponse
- UpdateDeliveryOptions
- UpdateJobOptions
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- Generator version:
7.16.0-SNAPSHOT
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen