All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
bitbucketSyncExport | POST /bitbucket_syncs/{id}/export | Export from Phrase Strings to Bitbucket |
bitbucketSyncImport | POST /bitbucket_syncs/{id}/import | Import to Phrase Strings from Bitbucket |
bitbucketSyncsList | GET /bitbucket_syncs | List Bitbucket syncs |
\Phrase\Model\BitbucketSyncExportResponse bitbucketSyncExport($id, $bitbucket_sync_export_parameters, $x_phrase_app_otp)
Export from Phrase Strings to Bitbucket
Export translations from Phrase Strings to Bitbucket according to the .phraseapp.yml file within the Bitbucket Repository.
Note: Export is done asynchronously and may take several seconds depending on the project size.
<?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\BitbucketSyncApi(
// 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
);
$id = 'id_example'; // string | ID
$bitbucket_sync_export_parameters = new \Phrase\Model\BitbucketSyncExportParameters(); // \Phrase\Model\BitbucketSyncExportParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$result = $apiInstance->bitbucketSyncExport($id, $bitbucket_sync_export_parameters, $x_phrase_app_otp);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BitbucketSyncApi->bitbucketSyncExport: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | ID | |
bitbucket_sync_export_parameters | \Phrase\Model\BitbucketSyncExportParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
\Phrase\Model\BitbucketSyncExportResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bitbucketSyncImport($id, $bitbucket_sync_import_parameters, $x_phrase_app_otp)
Import to Phrase Strings from Bitbucket
Import translations from Bitbucket to Phrase Strings according to the .phraseapp.yml file within the Bitbucket repository.
Note: Import is done asynchronously and may take several seconds depending on the project size.
<?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\BitbucketSyncApi(
// 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
);
$id = 'id_example'; // string | ID
$bitbucket_sync_import_parameters = new \Phrase\Model\BitbucketSyncImportParameters(); // \Phrase\Model\BitbucketSyncImportParameters |
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional)
try {
$apiInstance->bitbucketSyncImport($id, $bitbucket_sync_import_parameters, $x_phrase_app_otp);
} catch (Exception $e) {
echo 'Exception when calling BitbucketSyncApi->bitbucketSyncImport: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | ID | |
bitbucket_sync_import_parameters | \Phrase\Model\BitbucketSyncImportParameters | ||
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Phrase\Model\BitbucketSync[] bitbucketSyncsList($x_phrase_app_otp, $account_id)
List Bitbucket syncs
List all Bitbucket repositories for which synchronisation with Phrase Strings is activated.
<?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\BitbucketSyncApi(
// 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)
$account_id = abcd1234; // string | Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.
try {
$result = $apiInstance->bitbucketSyncsList($x_phrase_app_otp, $account_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BitbucketSyncApi->bitbucketSyncsList: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
x_phrase_app_otp | string | Two-Factor-Authentication token (optional) | [optional] |
account_id | string | Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]