-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying from phrase/openapi@6fcab5d4
- Loading branch information
Phrase
committed
Jun 25, 2024
1 parent
9224741
commit 7fe8ac3
Showing
17 changed files
with
3,707 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# Phrase\LocaleDownloadsApi | ||
|
||
All URIs are relative to *https://api.phrase.com/v2* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
[**localeDownloadCreate**](LocaleDownloadsApi.md#localeDownloadCreate) | **POST** /projects/{project_id}/locales/{locale_id}/downloads | Initiate async download of a locale | ||
[**localeDownloadShow**](LocaleDownloadsApi.md#localeDownloadShow) | **GET** /projects/{project_id}/locales/{locale_id}/downloads/{id} | Show status of an async locale download | ||
|
||
|
||
|
||
## localeDownloadCreate | ||
|
||
> \Phrase\Model\LocaleDownload localeDownloadCreate($project_id, $locale_id, $locale_download_create_parameters, $x_phrase_app_otp, $if_modified_since, $if_none_match) | ||
Initiate async download of a locale | ||
|
||
Prepare a locale for download in a specific file format. | ||
|
||
### Example | ||
|
||
```php | ||
<?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\LocaleDownloadsApi( | ||
// 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 | ||
); | ||
$project_id = 'project_id_example'; // string | Project ID | ||
$locale_id = 'locale_id_example'; // string | Locale ID | ||
$locale_download_create_parameters = new \Phrase\Model\LocaleDownloadCreateParameters(); // \Phrase\Model\LocaleDownloadCreateParameters | | ||
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional) | ||
$if_modified_since = 'if_modified_since_example'; // string | Last modified condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | ||
$if_none_match = 'if_none_match_example'; // string | ETag condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | ||
|
||
try { | ||
$result = $apiInstance->localeDownloadCreate($project_id, $locale_id, $locale_download_create_parameters, $x_phrase_app_otp, $if_modified_since, $if_none_match); | ||
print_r($result); | ||
} catch (Exception $e) { | ||
echo 'Exception when calling LocaleDownloadsApi->localeDownloadCreate: ', $e->getMessage(), PHP_EOL; | ||
} | ||
?> | ||
``` | ||
|
||
### Parameters | ||
|
||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**project_id** | **string**| Project ID | | ||
**locale_id** | **string**| Locale ID | | ||
**locale_download_create_parameters** | [**\Phrase\Model\LocaleDownloadCreateParameters**](../Model/LocaleDownloadCreateParameters.md)| | | ||
**x_phrase_app_otp** | **string**| Two-Factor-Authentication token (optional) | [optional] | ||
**if_modified_since** | **string**| Last modified condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | [optional] | ||
**if_none_match** | **string**| ETag condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | [optional] | ||
|
||
### Return type | ||
|
||
[**\Phrase\Model\LocaleDownload**](../Model/LocaleDownload.md) | ||
|
||
### Authorization | ||
|
||
[Basic](../../README.md#Basic), [Token](../../README.md#Token) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: application/json | ||
- **Accept**: application/json | ||
|
||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) | ||
[[Back to Model list]](../../README.md#documentation-for-models) | ||
[[Back to README]](../../README.md) | ||
|
||
|
||
## localeDownloadShow | ||
|
||
> \Phrase\Model\LocaleDownload localeDownloadShow($project_id, $locale_id, $id, $x_phrase_app_otp, $if_modified_since, $if_none_match) | ||
Show status of an async locale download | ||
|
||
Show status of already started async locale download. If the download is finished, the download link will be returned. | ||
|
||
### Example | ||
|
||
```php | ||
<?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\LocaleDownloadsApi( | ||
// 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 | ||
); | ||
$project_id = 'project_id_example'; // string | Project ID | ||
$locale_id = 'locale_id_example'; // string | Locale ID | ||
$id = 'id_example'; // string | ID | ||
$x_phrase_app_otp = 'x_phrase_app_otp_example'; // string | Two-Factor-Authentication token (optional) | ||
$if_modified_since = 'if_modified_since_example'; // string | Last modified condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | ||
$if_none_match = 'if_none_match_example'; // string | ETag condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | ||
|
||
try { | ||
$result = $apiInstance->localeDownloadShow($project_id, $locale_id, $id, $x_phrase_app_otp, $if_modified_since, $if_none_match); | ||
print_r($result); | ||
} catch (Exception $e) { | ||
echo 'Exception when calling LocaleDownloadsApi->localeDownloadShow: ', $e->getMessage(), PHP_EOL; | ||
} | ||
?> | ||
``` | ||
|
||
### Parameters | ||
|
||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**project_id** | **string**| Project ID | | ||
**locale_id** | **string**| Locale ID | | ||
**id** | **string**| ID | | ||
**x_phrase_app_otp** | **string**| Two-Factor-Authentication token (optional) | [optional] | ||
**if_modified_since** | **string**| Last modified condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | [optional] | ||
**if_none_match** | **string**| ETag condition, see <a href=\"#overview--conditional-get-requests--http-caching\">Conditional GET requests / HTTP Caching</a> (optional) | [optional] | ||
|
||
### Return type | ||
|
||
[**\Phrase\Model\LocaleDownload**](../Model/LocaleDownload.md) | ||
|
||
### Authorization | ||
|
||
[Basic](../../README.md#Basic), [Token](../../README.md#Token) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: application/json | ||
|
||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) | ||
[[Back to Model list]](../../README.md#documentation-for-models) | ||
[[Back to README]](../../README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# # LocaleDownload | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | **string** | | [optional] | ||
**status** | **string** | The status of the download request. Possible values are `processing`, `completed`, and `error`. | [optional] | ||
**result** | [**\Phrase\Model\LocaleDownloadResult**](LocaleDownloadResult.md) | | [optional] | ||
**params** | [**\Phrase\Model\LocaleDownloadParams**](LocaleDownloadParams.md) | | [optional] | ||
**error** | **string** | | [optional] | ||
**created_at** | **\DateTime** | | [optional] | ||
**completed_at** | **\DateTime** | | [optional] | ||
|
||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# # LocaleDownloadCreateParameters | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**file_format** | **string** | File format name. See the <a href=\"https://support.phrase.com/hc/en-us/sections/6111343326364\">format guide</a> for all supported file formats. | | ||
**branch** | **string** | specify the branch to use | [optional] | ||
**tags** | **string** | Limit results to keys tagged with a list of comma separated tag names. | [optional] | ||
**include_empty_translations** | **bool** | Indicates whether keys without translations should be included in the output as well. | [optional] | ||
**exclude_empty_zero_forms** | **bool** | Indicates whether zero forms should be included when empty in pluralized keys. | [optional] | ||
**include_translated_keys** | **bool** | Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys. | [optional] | ||
**keep_notranslate_tags** | **bool** | Indicates whether [NOTRANSLATE] tags should be kept. | [optional] | ||
**format_options** | **object** | Additional formatting and render options. See the <a href=\"https://support.phrase.com/hc/en-us/sections/6111343326364\">format guide</a> for a list of options available for each format. Specify format options like this: <code>...&format_options[foo]=bar</code> | [optional] | ||
**encoding** | **string** | Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\". | [optional] | ||
**include_unverified_translations** | **bool** | if set to false unverified translations are excluded | [optional] | ||
**use_last_reviewed_version** | **bool** | If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project. | [optional] | ||
**fallback_locale_id** | **string** | If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>. | [optional] | ||
**source_locale_id** | **string** | Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a <code>tag</code> parameter indicating a specific job. | [optional] | ||
**custom_metadata_filters** | **object** | Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download. | [optional] | ||
|
||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# # LocaleDownloadParams | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**file_format** | **string** | | [optional] | ||
**locale_id** | **string** | | [optional] | ||
**tags** | **string** | | [optional] | ||
**branch** | **string** | | [optional] | ||
**include_empty_translations** | **bool** | | [optional] | ||
**include_translated_keys** | **bool** | | [optional] | ||
**include_unverified_translations** | **bool** | | [optional] | ||
|
||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# # LocaleDownloadResult | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**url** | **string** | The URL to the download file. This URL is valid for 15 minutes. | [optional] | ||
|
||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) | ||
|
||
|
Oops, something went wrong.