Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.85 KB

FormatsApi.md

File metadata and controls

68 lines (44 loc) · 1.85 KB

Phrase\FormatsApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
formatsList GET /formats List formats

formatsList

\Phrase\Model\Format[] formatsList($x_phrase_app_otp)

List formats

Get a handy list of all localization file formats supported in Phrase.

Example

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

$config = Phrase\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
$config = Phrase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'token');

$apiInstance = new Phrase\Api\FormatsApi(
    // 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(),
    $config
);
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)

try {
    $result = $apiInstance->formatsList($x_phrase_app_otp);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FormatsApi->formatsList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
x_phrase_app_otp string Two-Factor-Authentication token (optional) [optional]

Return type

\Phrase\Model\Format[]

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]