localizer-io/php-sdk

2.0.2 2017-04-09 11:06 UTC

This package is not auto-updated.

Last update: 2025-09-13 23:38:07 UTC


README

PHP SDK for https://localizer.io

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Package version: 2.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "require": {
    "localizer-io/php-sdk": "^2.0.0"
  }
}

Then run composer install

Or run composer require localizer-io/php-sdk

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/php-sdk/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Localizer\Client\Configuration::getDefaultConfiguration()->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

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