Skip to content

Commit

Permalink
Deploying from phrase/openapi@6fcab5d4
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrase committed Jun 25, 2024
1 parent 9224741 commit 7fe8ac3
Show file tree
Hide file tree
Showing 17 changed files with 3,707 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ docs/Api/JobsApi.md
docs/Api/KeysApi.md
docs/Api/KeysFigmaAttachmentsApi.md
docs/Api/LinkedKeysApi.md
docs/Api/LocaleDownloadsApi.md
docs/Api/LocalesApi.md
docs/Api/MembersApi.md
docs/Api/NotificationGroupsApi.md
Expand Down Expand Up @@ -168,6 +169,10 @@ docs/Model/KeysUntagParameters.md
docs/Model/Locale.md
docs/Model/LocaleCreateParameters.md
docs/Model/LocaleDetails.md
docs/Model/LocaleDownload.md
docs/Model/LocaleDownloadCreateParameters.md
docs/Model/LocaleDownloadParams.md
docs/Model/LocaleDownloadResult.md
docs/Model/LocalePreview.md
docs/Model/LocalePreview1.md
docs/Model/LocaleReport.md
Expand Down Expand Up @@ -309,6 +314,7 @@ lib/Api/JobsApi.php
lib/Api/KeysApi.php
lib/Api/KeysFigmaAttachmentsApi.php
lib/Api/LinkedKeysApi.php
lib/Api/LocaleDownloadsApi.php
lib/Api/LocalesApi.php
lib/Api/MembersApi.php
lib/Api/NotificationGroupsApi.php
Expand Down Expand Up @@ -448,6 +454,10 @@ lib/Model/KeysUntagParameters.php
lib/Model/Locale.php
lib/Model/LocaleCreateParameters.php
lib/Model/LocaleDetails.php
lib/Model/LocaleDownload.php
lib/Model/LocaleDownloadCreateParameters.php
lib/Model/LocaleDownloadParams.php
lib/Model/LocaleDownloadResult.php
lib/Model/LocalePreview.php
lib/Model/LocalePreview1.php
lib/Model/LocaleReport.php
Expand Down Expand Up @@ -590,6 +600,7 @@ test/Api/JobTemplatesApiTest.php
test/Api/JobsApiTest.php
test/Api/KeysFigmaAttachmentsApiTest.php
test/Api/LinkedKeysApiTest.php
test/Api/LocaleDownloadsApiTest.php
test/Api/MembersApiTest.php
test/Api/NotificationGroupsApiTest.php
test/Api/NotificationsApiTest.php
Expand Down Expand Up @@ -723,6 +734,10 @@ test/Model/KeysTagParametersTest.php
test/Model/KeysUntagParametersTest.php
test/Model/LocaleCreateParametersTest.php
test/Model/LocaleDetailsTest.php
test/Model/LocaleDownloadCreateParametersTest.php
test/Model/LocaleDownloadParamsTest.php
test/Model/LocaleDownloadResultTest.php
test/Model/LocaleDownloadTest.php
test/Model/LocalePreview1Test.php
test/Model/LocalePreviewTest.php
test/Model/LocaleReportTest.php
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ Class | Method | HTTP request | Description
*LinkedKeysApi* | [**keyLinksCreate**](docs/Api/LinkedKeysApi.md#keylinkscreate) | **POST** /projects/{project_id}/keys/{id}/key_links | Link child keys to a parent key
*LinkedKeysApi* | [**keyLinksDestroy**](docs/Api/LinkedKeysApi.md#keylinksdestroy) | **DELETE** /projects/{project_id}/keys/{id}/key_links/{child_key_id} | Unlink a child key from a parent key
*LinkedKeysApi* | [**keyLinksIndex**](docs/Api/LinkedKeysApi.md#keylinksindex) | **GET** /projects/{project_id}/keys/{id}/key_links | List child keys of a parent key
*LocaleDownloadsApi* | [**localeDownloadCreate**](docs/Api/LocaleDownloadsApi.md#localedownloadcreate) | **POST** /projects/{project_id}/locales/{locale_id}/downloads | Initiate async download of a locale
*LocaleDownloadsApi* | [**localeDownloadShow**](docs/Api/LocaleDownloadsApi.md#localedownloadshow) | **GET** /projects/{project_id}/locales/{locale_id}/downloads/{id} | Show status of an async locale download
*LocalesApi* | [**accountLocales**](docs/Api/LocalesApi.md#accountlocales) | **GET** /accounts/{id}/locales | List locales used in account
*LocalesApi* | [**localeCreate**](docs/Api/LocalesApi.md#localecreate) | **POST** /projects/{project_id}/locales | Create a locale
*LocalesApi* | [**localeDelete**](docs/Api/LocalesApi.md#localedelete) | **DELETE** /projects/{project_id}/locales/{id} | Delete a locale
Expand Down Expand Up @@ -536,6 +538,10 @@ Class | Method | HTTP request | Description
- [Locale](docs/Model/Locale.md)
- [LocaleCreateParameters](docs/Model/LocaleCreateParameters.md)
- [LocaleDetails](docs/Model/LocaleDetails.md)
- [LocaleDownload](docs/Model/LocaleDownload.md)
- [LocaleDownloadCreateParameters](docs/Model/LocaleDownloadCreateParameters.md)
- [LocaleDownloadParams](docs/Model/LocaleDownloadParams.md)
- [LocaleDownloadResult](docs/Model/LocaleDownloadResult.md)
- [LocalePreview](docs/Model/LocalePreview.md)
- [LocalePreview1](docs/Model/LocalePreview1.md)
- [LocaleReport](docs/Model/LocaleReport.md)
Expand Down
148 changes: 148 additions & 0 deletions docs/Api/LocaleDownloadsApi.md
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 &lt;a href&#x3D;\&quot;#overview--conditional-get-requests--http-caching\&quot;&gt;Conditional GET requests / HTTP Caching&lt;/a&gt; (optional) | [optional]
**if_none_match** | **string**| ETag condition, see &lt;a href&#x3D;\&quot;#overview--conditional-get-requests--http-caching\&quot;&gt;Conditional GET requests / HTTP Caching&lt;/a&gt; (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 &lt;a href&#x3D;\&quot;#overview--conditional-get-requests--http-caching\&quot;&gt;Conditional GET requests / HTTP Caching&lt;/a&gt; (optional) | [optional]
**if_none_match** | **string**| ETag condition, see &lt;a href&#x3D;\&quot;#overview--conditional-get-requests--http-caching\&quot;&gt;Conditional GET requests / HTTP Caching&lt;/a&gt; (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)

17 changes: 17 additions & 0 deletions docs/Model/LocaleDownload.md
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 &#x60;processing&#x60;, &#x60;completed&#x60;, and &#x60;error&#x60;. | [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)


24 changes: 24 additions & 0 deletions docs/Model/LocaleDownloadCreateParameters.md
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 &lt;a href&#x3D;\&quot;https://support.phrase.com/hc/en-us/sections/6111343326364\&quot;&gt;format guide&lt;/a&gt; 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 &lt;a href&#x3D;\&quot;https://support.phrase.com/hc/en-us/sections/6111343326364\&quot;&gt;format guide&lt;/a&gt; for a list of options available for each format. Specify format options like this: &lt;code&gt;...&amp;format_options[foo]&#x3D;bar&lt;/code&gt; | [optional]
**encoding** | **string** | Enforces a specific encoding on the file contents. Valid options are \&quot;UTF-8\&quot;, \&quot;UTF-16\&quot; and \&quot;ISO-8859-1\&quot;. | [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 &lt;code&gt;true&lt;/code&gt;. | [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 &lt;code&gt;tag&lt;/code&gt; 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)


17 changes: 17 additions & 0 deletions docs/Model/LocaleDownloadParams.md
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)


11 changes: 11 additions & 0 deletions docs/Model/LocaleDownloadResult.md
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)


Loading

0 comments on commit 7fe8ac3

Please sign in to comment.