docs/KeysApi.md in phrase-1.0.1 vs docs/KeysApi.md in phrase-1.0.2
- old
+ new
@@ -16,11 +16,11 @@
## key_create
-> key_create(project_id, key_create_parameters, opts)
+> TranslationKeyDetails key_create(project_id, key_create_parameters, opts)
Create a key
Create a new key.
@@ -35,12 +35,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
key_create_parameters = Phrase::KeyCreateParameters.new # KeyCreateParameters |
@@ -48,11 +47,12 @@
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
}
begin
#Create a key
- api_instance.key_create(project_id, key_create_parameters, opts)
+ result = api_instance.key_create(project_id, key_create_parameters, opts)
+ pp result
rescue Phrase::ApiError => e
puts "Exception when calling KeysApi->key_create: #{e}"
end
```
@@ -65,20 +65,20 @@
**key_create_parameters** | [**KeyCreateParameters**](KeyCreateParameters.md)| |
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
### Return type
-Response<(nil (empty response body))>
+Response<([**TranslationKeyDetails**](TranslationKeyDetails.md))>
### Authorization
[Basic](../README.md#Basic), [Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json
-- **Accept**: Not defined
+- **Accept**: application/json
## key_delete
> key_delete(project_id, id, opts)
@@ -98,12 +98,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
@@ -163,12 +162,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
@@ -229,12 +227,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
id = 'id_example' # String | ID
@@ -295,20 +292,19 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project 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
- q: 'mykey* translated:true', # String | q_description_placeholder
+ q: 'mykey* translated:true', # String | Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
locale_id: 'abcd1234abcd1234abcd1234abcd1234' # String | Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
}
begin
#Delete collection of keys
@@ -325,11 +321,11 @@
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **String**| Project ID |
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
**branch** | **String**| specify the branch to use | [optional]
- **q** | **String**| q_description_placeholder | [optional]
+ **q** | **String**| Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>. | [optional]
**locale_id** | **String**| Locale used to determine the translation state of a key when filtering for untranslated or translated keys. | [optional]
### Return type
Response<([**AffectedResources**](AffectedResources.md))>
@@ -363,12 +359,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
opts = {
@@ -376,11 +371,11 @@
page: 1, # Integer | Page number
per_page: 10, # Integer | allows you to specify a page size up to 100 items, 10 by default
branch: 'my-feature-branch', # String | specify the branch to use
sort: 'updated_at', # String | Sort by field. Can be one of: name, created_at, updated_at.
order: 'desc', # String | Order direction. Can be one of: asc, desc.
- q: 'mykey* translated:true', # String | q_description_placeholder
+ q: 'mykey* translated:true', # String | Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
locale_id: 'abcd1234abcd1234abcd1234abcd1234' # String | Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
}
begin
#List keys
@@ -401,11 +396,11 @@
**page** | **Integer**| Page number | [optional]
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 10 by default | [optional]
**branch** | **String**| specify the branch to use | [optional]
**sort** | **String**| Sort by field. Can be one of: name, created_at, updated_at. | [optional]
**order** | **String**| Order direction. Can be one of: asc, desc. | [optional]
- **q** | **String**| q_description_placeholder | [optional]
+ **q** | **String**| Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>. | [optional]
**locale_id** | **String**| Locale used to determine the translation state of a key when filtering for untranslated or translated keys. | [optional]
### Return type
Response<([**Array<TranslationKey>**](TranslationKey.md))>
@@ -439,12 +434,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
keys_search_parameters = Phrase::KeysSearchParameters.new # KeysSearchParameters |
@@ -507,12 +501,11 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
keys_tag_parameters = Phrase::KeysTagParameters.new # KeysTagParameters |
@@ -571,11 +564,10 @@
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
- #config.api_key_prefix['Authorization'] = 'Bearer'
+ config.api_key_prefix['Authorization'] = 'token'
end
api_instance = Phrase::KeysApi.new
project_id = 'project_id_example' # String | Project ID
keys_untag_parameters = Phrase::KeysUntagParameters.new # KeysUntagParameters |