PHP code example of milqmedia / poeditor-api-client

1. Go to this page and download the library: Download milqmedia/poeditor-api-client 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/ */

    

milqmedia / poeditor-api-client example snippets



use Uj\Poed\Api\Client;

$apiClient = new Client("YOUR API ACCESS TOKEN");

// list all projects
// returns Uj\Poed\Entity\Project[]
$apiClient->getProjects();

// return a specific project
// returns Uj\Poed\Entity\Project
$project = $apiClient->getProject($projectID);

// add a language to the project
$project->addLanguage('en');

// deletes the given language
$project->deleteLanguage('en');

// list all terms
// returns \Uj\Poed\Entity\Term[]
$project->getTerms();

// list all definitions
// returns \Uj\Poed\Entity\Definition[]
$project->getDefinitions($languageCode);