docs/LocalesApi.md in phrase-2.0.0 vs docs/LocalesApi.md in phrase-2.1.0

- old
+ new

@@ -2,19 +2,83 @@ All URIs are relative to *https://api.phrase.com/v2* Method | HTTP request | Description ------------- | ------------- | ------------- +[**account_locales**](LocalesApi.md#account_locales) | **GET** /accounts/{account_id}/locales | List locales used in account [**locale_create**](LocalesApi.md#locale_create) | **POST** /projects/{project_id}/locales | Create a locale [**locale_delete**](LocalesApi.md#locale_delete) | **DELETE** /projects/{project_id}/locales/{id} | Delete a locale [**locale_download**](LocalesApi.md#locale_download) | **GET** /projects/{project_id}/locales/{id}/download | Download a locale [**locale_show**](LocalesApi.md#locale_show) | **GET** /projects/{project_id}/locales/{id} | Get a single locale [**locale_update**](LocalesApi.md#locale_update) | **PATCH** /projects/{project_id}/locales/{id} | Update a locale [**locales_list**](LocalesApi.md#locales_list) | **GET** /projects/{project_id}/locales | List locales +## account_locales + +> Array&lt;LocalePreview1&gt; account_locales(opts) + +List locales used in account + +List all locales unique by locale code used across all projects within an account. + +### Example + +```ruby +# load the gem +require 'phrase' +# setup authorization +Phrase.configure do |config| + # Configure HTTP basic authorization: Basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure API key authorization: Token + config.api_key['Authorization'] = 'YOUR API KEY' + config.api_key_prefix['Authorization'] = 'token' +end + +api_instance = Phrase::LocalesApi.new +opts = { + x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional) + page: 1, # Integer | Page number + per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default +} + +begin + #List locales used in account + result = api_instance.account_locales(opts) + pp result +rescue Phrase::ApiError => e + puts "Exception when calling LocalesApi->account_locales: #{e}" +end +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] + **page** | **Integer**| Page number | [optional] + **per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional] + +### Return type + +Response<([**Array&lt;LocalePreview1&gt;**](LocalePreview1.md))> + +### Authorization + +[Basic](../README.md#Basic), [Token](../README.md#Token) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## locale_create > LocaleDetails locale_create(project_id, locale_create_parameters, opts) Create a locale @@ -168,11 +232,11 @@ project_id = 'project_id_example' # String | Project ID id = 'id_example' # String | ID opts = { x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional) branch: 'my-feature-branch', # String | specify the branch to use - file_format: 'yml', # String | File format name. See the format guide for all supported file formats. + file_format: 'yml', # String | File format name. See the <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">format guide</a> for all supported file formats. tags: 'feature1,feature2', # String | Limit results to keys tagged with a list of comma separated tag names. tag: 'feature', # String | Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead include_empty_translations: true, # Boolean | Indicates whether keys without translations should be included in the output as well. exclude_empty_zero_forms: true, # Boolean | Indicates whether zero forms should be included when empty in pluralized keys. include_translated_keys: true, # Boolean | Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys. @@ -202,11 +266,11 @@ ------------- | ------------- | ------------- | ------------- **project_id** | **String**| Project ID | **id** | **String**| ID | **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] **branch** | **String**| specify the branch to use | [optional] - **file_format** | **String**| File format name. See the format guide for all supported file formats. | [optional] + **file_format** | **String**| File format name. See the &lt;a href&#x3D;\&quot;https://help.phrase.com/help/supported-platforms-and-formats\&quot;&gt;format guide&lt;/a&gt; for all supported file formats. | [optional] **tags** | **String**| Limit results to keys tagged with a list of comma separated tag names. | [optional] **tag** | **String**| Limit download to tagged keys. This parameter is deprecated. Please use the \&quot;tags\&quot; parameter instead | [optional] **include_empty_translations** | **Boolean**| Indicates whether keys without translations should be included in the output as well. | [optional] **exclude_empty_zero_forms** | **Boolean**| Indicates whether zero forms should be included when empty in pluralized keys. | [optional] **include_translated_keys** | **Boolean**| Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys. | [optional] @@ -391,10 +455,11 @@ project_id = 'project_id_example' # String | Project ID opts = { x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional) page: 1, # Integer | Page number per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default + sort_by: 'sort_by_example', # String | Sort locales. Valid options are \"name_asc\", \"name_desc\", \"default_asc\", \"default_desc\". branch: 'my-feature-branch' # String | specify the branch to use } begin #List locales @@ -412,9 +477,10 @@ ------------- | ------------- | ------------- | ------------- **project_id** | **String**| Project ID | **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional] **page** | **Integer**| Page number | [optional] **per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional] + **sort_by** | **String**| Sort locales. Valid options are \&quot;name_asc\&quot;, \&quot;name_desc\&quot;, \&quot;default_asc\&quot;, \&quot;default_desc\&quot;. | [optional] **branch** | **String**| specify the branch to use | [optional] ### Return type Response<([**Array&lt;Locale&gt;**](Locale.md))>