php-sdk
PHP SDK for https://localizer.io, (*1)
This PHP package is automatically generated by the Swagger Codegen project:, (*2)
- API version: 2.0
- Package version: 2.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.5 and later, (*3)
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json:, (*4)
{
"require": {
"localizer-io/php-sdk": "^2.0.0"
}
}
Then run composer install, (*5)
Or run composer require localizer-io/php-sdk, (*6)
Manual Installation
Download the files and include autoload.php:, (*7)
require_once('/path/to/php-sdk/vendor/autoload.php');
Tests
To run the unit tests:, (*8)
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:, (*9)
setApiKey('sig', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Localizer\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sig', 'Bearer');
$api_instance = new Localizer\Client\Api\LanguagesApi();
try {
$result = $api_instance->getLanguages();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LanguagesApi->getLanguages: ', $e->getMessage(), PHP_EOL;
}
?>
Documentation for API Endpoints
All URIs are relative to https://localizer.io/api/2.0, (*10)
| Class |
Method |
HTTP request |
Description |
| LanguagesApi |
getLanguages |
GET /languages |
Languages list |
| ProjectsApi |
createProject |
POST /project |
Create project |
| ProjectsApi |
createSection |
POST /project/{project_id}/section |
Create section |
| ProjectsApi |
deleteProject |
DELETE /project/{project_id} |
Delete project |
| ProjectsApi |
deleteSection |
DELETE /project/{project_id}/section/{section_code} |
Delete section |
| ProjectsApi |
getProject |
GET /project/{project_id} |
Project info |
| ProjectsApi |
getProjects |
GET /projects |
Projects List |
| ProjectsApi |
getSection |
GET /project/{project_id}/section/{section_code} |
Section info |
| ProjectsApi |
getSectionTranslations |
GET /project/{project_id}/section/{section_code}/translations/all |
Translations for section on all languages |
| ProjectsApi |
getSections |
GET /project/{project_id}/sections |
Sections list |
| ProjectsApi |
updateProject |
PUT /project/{project_id} |
Update project |
| ProjectsApi |
updateSection |
PUT /project/{project_id}/section/{section_code} |
Update section |
| ProjectsApi |
uploadSectionTranslations |
POST /project/{project_id}/section/{section_code}/translations |
Upload translations to section |
| ProjectsApi |
upsertSection |
POST /project/{project_id}/section/upsert |
Create or edit section |
Documentation For Models
Documentation For Authorization
api_key
-
Type: API key
-
API key parameter name: sig
-
Location: URL query string
Author
support@localizer.io, (*11)