PHP code example of lingualeo / wti-api

1. Go to this page and download the library: Download lingualeo/wti-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lingualeo / wti-api example snippets


$apiKey = 'YOUR_API_KEY';
$api = new WtiApi($apiKey);

// Add translator to project with proofreader rights
// https://webtranslateit.com/en/docs/api/user/#create-user
$api->addUser('[email protected]', 'ru', true);

// Add manager to project with proofreader rights
// https://webtranslateit.com/en/docs/api/user/#create-user
$api->addUser('[email protected]', 'ru', true, 'manager');


// Search strings by key in file
// https://webtranslateit.com/en/docs/api/string/#list-string
$strings = $api->getStringsByKey('someKey', 'FILE_ID');

// Get Top Translators
// https://webtranslateit.com/en/docs/api/stats/#top-translators
$topTranslators = $api->getTopTranslators();