phrase 2.22.2 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +11 -3
- data/docs/CustomMetadataApi.md +2 -0
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyLink.md +29 -0
- data/docs/KeyLinksBatchDestroyParameters.md +17 -0
- data/docs/KeyLinksCreateParameters.md +17 -0
- data/docs/KeyLinksIndex400Response.md +17 -0
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/LinkedKeysApi.md +270 -0
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/lib/phrase/api/custom_metadata_api.rb +3 -0
- data/lib/phrase/api/linked_keys_api.rb +323 -0
- data/lib/phrase/models/key_link.rb +290 -0
- data/lib/phrase/models/key_links_batch_destroy_parameters.rb +204 -0
- data/lib/phrase/models/key_links_create_parameters.rb +204 -0
- data/lib/phrase/models/key_links_index400_response.rb +196 -0
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +5 -0
- data/spec/api/custom_metadata_api_spec.rb +1 -0
- data/spec/api/linked_keys_api_spec.rb +83 -0
- data/spec/models/key_link_spec.rb +65 -0
- data/spec/models/key_links_batch_destroy_parameters_spec.rb +29 -0
- data/spec/models/key_links_create_parameters_spec.rb +29 -0
- data/spec/models/key_links_index400_response_spec.rb +29 -0
- metadata +239 -219
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 582ba53291883b020549a82fce6657cca1fb45b5bee1fab80005fe56d8866a11
|
4
|
+
data.tar.gz: cf1605ad717045fa0747aaeab826389cdcb2997691e807808b81cc820d1afd69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 183270d16369039bae7e2cefd09908eea7355728e993d66657abc6fa9c6020a710900cd19abf8957fa372a41bac68be3c6484821c87acfa500420947df97f86b
|
7
|
+
data.tar.gz: 3f41891e25ee2a2cfe7b7ecfe8ed4faf3565aac0a271a8ba81b627df66750cb4e15945b61869ff3d200f053bf3ec6661452910fe3a6f713835271f24b5247888
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.24.0](https://github.com/phrase/openapi/compare/ruby-v2.23.0...ruby-v2.24.0) (2024-04-10)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **API:** add Linked Keys endpoints ([#555](https://github.com/phrase/openapi/issues/555)) ([4935dac](https://github.com/phrase/openapi/commit/4935dac58c787eaade2f1f65ce649f466b5e3a60))
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* (API) Add mandatory params to linked keys endpoints ([#564](https://github.com/phrase/openapi/issues/564)) ([08d9846](https://github.com/phrase/openapi/commit/08d9846bc224d349e2ade9abf28d733afb1e8be3))
|
14
|
+
|
15
|
+
## [2.23.0](https://github.com/phrase/openapi/compare/ruby-v2.22.2...ruby-v2.23.0) (2024-02-07)
|
16
|
+
|
17
|
+
|
18
|
+
### Features
|
19
|
+
|
20
|
+
* add query param for properties ([#542](https://github.com/phrase/openapi/issues/542)) ([b4e12d0](https://github.com/phrase/openapi/commit/b4e12d04fd2916351f9201e1e6de504143ecc9aa))
|
21
|
+
|
3
22
|
## [2.22.2](https://github.com/phrase/openapi/compare/ruby-v2.22.1...ruby-v2.22.2) (2024-02-05)
|
4
23
|
|
5
24
|
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase Strings is a translation management platform for software projects. You c
|
|
7
7
|
## This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 2.
|
10
|
+
- Package version: 2.24.0
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://developers.phrase.com/api/](https://developers.phrase.com/api/)
|
13
13
|
|
@@ -56,10 +56,10 @@ gem build phrase.gemspec
|
|
56
56
|
Then install the gem locally:
|
57
57
|
|
58
58
|
```shell
|
59
|
-
gem install ./phrase-2.
|
59
|
+
gem install ./phrase-2.24.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-2.
|
62
|
+
(for development, run `gem install --dev ./phrase-2.24.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -267,6 +267,10 @@ Class | Method | HTTP request | Description
|
|
267
267
|
*Phrase::KeysApi* | [**keys_untag**](docs/KeysApi.md#keys_untag) | **PATCH** /projects/{project_id}/keys/untag | Remove tags from collection of keys
|
268
268
|
*Phrase::KeysFigmaAttachmentsApi* | [**figma_attachment_attach_to_key**](docs/KeysFigmaAttachmentsApi.md#figma_attachment_attach_to_key) | **POST** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys | Attach the Figma attachment to a key
|
269
269
|
*Phrase::KeysFigmaAttachmentsApi* | [**figma_attachment_detach_from_key**](docs/KeysFigmaAttachmentsApi.md#figma_attachment_detach_from_key) | **DELETE** /projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id} | Detach the Figma attachment from a key
|
270
|
+
*Phrase::LinkedKeysApi* | [**key_links_batch_destroy**](docs/LinkedKeysApi.md#key_links_batch_destroy) | **DELETE** /projects/{project_id}/keys/{id}/key_links | Batch unlink child keys from a parent key
|
271
|
+
*Phrase::LinkedKeysApi* | [**key_links_create**](docs/LinkedKeysApi.md#key_links_create) | **POST** /projects/{project_id}/keys/{id}/key_links | Link child keys to a parent key
|
272
|
+
*Phrase::LinkedKeysApi* | [**key_links_destroy**](docs/LinkedKeysApi.md#key_links_destroy) | **DELETE** /projects/{project_id}/keys/{id}/key_links/{child_key_id} | Unlink a child key from a parent key
|
273
|
+
*Phrase::LinkedKeysApi* | [**key_links_index**](docs/LinkedKeysApi.md#key_links_index) | **GET** /projects/{project_id}/keys/{id}/key_links | Retrieve all child keys linked to a specific parent key
|
270
274
|
*Phrase::LocalesApi* | [**account_locales**](docs/LocalesApi.md#account_locales) | **GET** /accounts/{id}/locales | List locales used in account
|
271
275
|
*Phrase::LocalesApi* | [**locale_create**](docs/LocalesApi.md#locale_create) | **POST** /projects/{project_id}/locales | Create a locale
|
272
276
|
*Phrase::LocalesApi* | [**locale_delete**](docs/LocalesApi.md#locale_delete) | **DELETE** /projects/{project_id}/locales/{id} | Delete a locale
|
@@ -489,6 +493,10 @@ Class | Method | HTTP request | Description
|
|
489
493
|
- [Phrase::JobTemplateUpdateParameters](docs/JobTemplateUpdateParameters.md)
|
490
494
|
- [Phrase::JobUpdateParameters](docs/JobUpdateParameters.md)
|
491
495
|
- [Phrase::KeyCreateParameters](docs/KeyCreateParameters.md)
|
496
|
+
- [Phrase::KeyLink](docs/KeyLink.md)
|
497
|
+
- [Phrase::KeyLinksBatchDestroyParameters](docs/KeyLinksBatchDestroyParameters.md)
|
498
|
+
- [Phrase::KeyLinksCreateParameters](docs/KeyLinksCreateParameters.md)
|
499
|
+
- [Phrase::KeyLinksIndex400Response](docs/KeyLinksIndex400Response.md)
|
492
500
|
- [Phrase::KeyPreview](docs/KeyPreview.md)
|
493
501
|
- [Phrase::KeyUpdateParameters](docs/KeyUpdateParameters.md)
|
494
502
|
- [Phrase::KeysExcludeParameters](docs/KeysExcludeParameters.md)
|
data/docs/CustomMetadataApi.md
CHANGED
@@ -106,6 +106,7 @@ opts = {
|
|
106
106
|
project_id: 'abcd1234cdef1234abcd1234cdef1234', # String | id of project that the properties belong to
|
107
107
|
page: 1, # Integer | Page number
|
108
108
|
per_page: 25, # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
109
|
+
q: 'character_name', # String | query to find a property by name
|
109
110
|
sort: 'updated_at', # String | Sort criteria. Can be one of: name, data_type, created_at.
|
110
111
|
order: 'desc' # String | Order direction. Can be one of: asc, desc.
|
111
112
|
}
|
@@ -130,6 +131,7 @@ Name | Type | Description | Notes
|
|
130
131
|
**project_id** | **String**| id of project that the properties belong to | [optional]
|
131
132
|
**page** | **Integer**| Page number | [optional]
|
132
133
|
**per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
|
134
|
+
**q** | **String**| query to find a property by name | [optional]
|
133
135
|
**sort** | **String**| Sort criteria. Can be one of: name, data_type, created_at. | [optional]
|
134
136
|
**order** | **String**| Order direction. Can be one of: asc, desc. | [optional]
|
135
137
|
|
data/docs/KeyCreateParameters.md
CHANGED
@@ -35,7 +35,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
|
|
35
35
|
data_type: number,
|
36
36
|
tags: awesome-feature,needs-proofreading,
|
37
37
|
max_characters_allowed: 140,
|
38
|
-
screenshot: [B@
|
38
|
+
screenshot: [B@59a8891e,
|
39
39
|
remove_screenshot: null,
|
40
40
|
unformatted: null,
|
41
41
|
default_translation_content: Default translation content,
|
data/docs/KeyLink.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Phrase::KeyLink
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**created_at** | **Time** | The timestamp when the link was created. |
|
8
|
+
**updated_at** | **Time** | The timestamp when the link was last updated. |
|
9
|
+
**created_by** | [**UserPreview**](UserPreview.md) | |
|
10
|
+
**updated_by** | [**UserPreview**](UserPreview.md) | |
|
11
|
+
**account** | [**Account**](Account.md) | |
|
12
|
+
**parent** | [**KeyPreview**](KeyPreview.md) | |
|
13
|
+
**children** | [**Array<KeyPreview>**](KeyPreview.md) | The child translation keys linked to the parent. |
|
14
|
+
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'Phrase'
|
19
|
+
|
20
|
+
instance = Phrase::KeyLink.new(created_at: null,
|
21
|
+
updated_at: null,
|
22
|
+
created_by: null,
|
23
|
+
updated_by: null,
|
24
|
+
account: null,
|
25
|
+
parent: null,
|
26
|
+
children: null)
|
27
|
+
```
|
28
|
+
|
29
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::KeyLinksBatchDestroyParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**child_key_ids** | **Array<String>** | The IDs of the child keys to unlink from the parent key. |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::KeyLinksBatchDestroyParameters.new(child_key_ids: ["child_key_id1","child_key_id2"])
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::KeyLinksCreateParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**child_key_ids** | **Array<String>** | The IDs of the child keys to link to the parent key. Can be left empty, to only mark the given translation-key as parent |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::KeyLinksCreateParameters.new(child_key_ids: ["child_key_id1","child_key_id2"])
|
15
|
+
```
|
16
|
+
|
17
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Phrase::KeyLinksIndex400Response
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**message** | **String** | | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'Phrase'
|
13
|
+
|
14
|
+
instance = Phrase::KeyLinksIndex400Response.new(message: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/KeyUpdateParameters.md
CHANGED
@@ -34,7 +34,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
|
|
34
34
|
data_type: number,
|
35
35
|
tags: awesome-feature,needs-proofreading,
|
36
36
|
max_characters_allowed: 140,
|
37
|
-
screenshot: [B@
|
37
|
+
screenshot: [B@f054e29,
|
38
38
|
remove_screenshot: null,
|
39
39
|
unformatted: null,
|
40
40
|
xml_space_preserve: null,
|
@@ -0,0 +1,270 @@
|
|
1
|
+
# Phrase::LinkedKeysApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**key_links_batch_destroy**](LinkedKeysApi.md#key_links_batch_destroy) | **DELETE** /projects/{project_id}/keys/{id}/key_links | Batch unlink child keys from a parent key
|
8
|
+
[**key_links_create**](LinkedKeysApi.md#key_links_create) | **POST** /projects/{project_id}/keys/{id}/key_links | Link child keys to a parent key
|
9
|
+
[**key_links_destroy**](LinkedKeysApi.md#key_links_destroy) | **DELETE** /projects/{project_id}/keys/{id}/key_links/{child_key_id} | Unlink a child key from a parent key
|
10
|
+
[**key_links_index**](LinkedKeysApi.md#key_links_index) | **GET** /projects/{project_id}/keys/{id}/key_links | Retrieve all child keys linked to a specific parent key
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## key_links_batch_destroy
|
15
|
+
|
16
|
+
> key_links_batch_destroy(project_id, id, key_links_batch_destroy_parameters, opts)
|
17
|
+
|
18
|
+
Batch unlink child keys from a parent key
|
19
|
+
|
20
|
+
Unlinks multiple child keys from a given parent key in a single operation.
|
21
|
+
|
22
|
+
### Example
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
# load the gem
|
26
|
+
require 'phrase'
|
27
|
+
# setup authorization
|
28
|
+
Phrase.configure do |config|
|
29
|
+
# Configure HTTP basic authorization: Basic
|
30
|
+
config.username = 'YOUR USERNAME'
|
31
|
+
config.password = 'YOUR PASSWORD'
|
32
|
+
|
33
|
+
# Configure API key authorization: Token
|
34
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
35
|
+
config.api_key_prefix['Authorization'] = 'token'
|
36
|
+
end
|
37
|
+
|
38
|
+
api_instance = Phrase::LinkedKeysApi.new
|
39
|
+
project_id = 'project_id_example' # String | Project ID
|
40
|
+
id = 'id_example' # String | Parent Translation Key ID
|
41
|
+
key_links_batch_destroy_parameters = Phrase::KeyLinksBatchDestroyParameters.new({child_key_ids: ["child_key_id1", "child_key_id2"]}) # KeyLinksBatchDestroyParameters |
|
42
|
+
opts = {
|
43
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
44
|
+
unlink_parent: true # Boolean | Whether to unlink the parent key as well and unmark it as linked-key.
|
45
|
+
}
|
46
|
+
|
47
|
+
begin
|
48
|
+
#Batch unlink child keys from a parent key
|
49
|
+
api_instance.key_links_batch_destroy(project_id, id, key_links_batch_destroy_parameters, opts)
|
50
|
+
rescue Phrase::ApiError => e
|
51
|
+
puts "Exception when calling LinkedKeysApi->key_links_batch_destroy: #{e}"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### Parameters
|
56
|
+
|
57
|
+
|
58
|
+
Name | Type | Description | Notes
|
59
|
+
------------- | ------------- | ------------- | -------------
|
60
|
+
**project_id** | **String**| Project ID |
|
61
|
+
**id** | **String**| Parent Translation Key ID |
|
62
|
+
**key_links_batch_destroy_parameters** | [**KeyLinksBatchDestroyParameters**](KeyLinksBatchDestroyParameters.md)| |
|
63
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
64
|
+
**unlink_parent** | **Boolean**| Whether to unlink the parent key as well and unmark it as linked-key. | [optional]
|
65
|
+
|
66
|
+
### Return type
|
67
|
+
|
68
|
+
Response<(nil (empty response body))>
|
69
|
+
|
70
|
+
### Authorization
|
71
|
+
|
72
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
73
|
+
|
74
|
+
### HTTP request headers
|
75
|
+
|
76
|
+
- **Content-Type**: application/json
|
77
|
+
- **Accept**: application/json
|
78
|
+
|
79
|
+
|
80
|
+
## key_links_create
|
81
|
+
|
82
|
+
> KeyLink key_links_create(project_id, id, key_links_create_parameters, opts)
|
83
|
+
|
84
|
+
Link child keys to a parent key
|
85
|
+
|
86
|
+
Creates links between a given parent key and one or more child keys.
|
87
|
+
|
88
|
+
### Example
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
# load the gem
|
92
|
+
require 'phrase'
|
93
|
+
# setup authorization
|
94
|
+
Phrase.configure do |config|
|
95
|
+
# Configure HTTP basic authorization: Basic
|
96
|
+
config.username = 'YOUR USERNAME'
|
97
|
+
config.password = 'YOUR PASSWORD'
|
98
|
+
|
99
|
+
# Configure API key authorization: Token
|
100
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
101
|
+
config.api_key_prefix['Authorization'] = 'token'
|
102
|
+
end
|
103
|
+
|
104
|
+
api_instance = Phrase::LinkedKeysApi.new
|
105
|
+
project_id = 'project_id_example' # String | Project ID
|
106
|
+
id = 'id_example' # String | Parent Translation Key ID
|
107
|
+
key_links_create_parameters = Phrase::KeyLinksCreateParameters.new({child_key_ids: ["child_key_id1", "child_key_id2"]}) # KeyLinksCreateParameters |
|
108
|
+
opts = {
|
109
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
110
|
+
}
|
111
|
+
|
112
|
+
begin
|
113
|
+
#Link child keys to a parent key
|
114
|
+
result = api_instance.key_links_create(project_id, id, key_links_create_parameters, opts)
|
115
|
+
pp result
|
116
|
+
rescue Phrase::ApiError => e
|
117
|
+
puts "Exception when calling LinkedKeysApi->key_links_create: #{e}"
|
118
|
+
end
|
119
|
+
```
|
120
|
+
|
121
|
+
### Parameters
|
122
|
+
|
123
|
+
|
124
|
+
Name | Type | Description | Notes
|
125
|
+
------------- | ------------- | ------------- | -------------
|
126
|
+
**project_id** | **String**| Project ID |
|
127
|
+
**id** | **String**| Parent Translation Key ID |
|
128
|
+
**key_links_create_parameters** | [**KeyLinksCreateParameters**](KeyLinksCreateParameters.md)| |
|
129
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
130
|
+
|
131
|
+
### Return type
|
132
|
+
|
133
|
+
Response<([**KeyLink**](KeyLink.md))>
|
134
|
+
|
135
|
+
### Authorization
|
136
|
+
|
137
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
138
|
+
|
139
|
+
### HTTP request headers
|
140
|
+
|
141
|
+
- **Content-Type**: application/json
|
142
|
+
- **Accept**: application/json
|
143
|
+
|
144
|
+
|
145
|
+
## key_links_destroy
|
146
|
+
|
147
|
+
> key_links_destroy(project_id, id, child_key_id, opts)
|
148
|
+
|
149
|
+
Unlink a child key from a parent key
|
150
|
+
|
151
|
+
Unlinks a single child key from a given parent key.
|
152
|
+
|
153
|
+
### Example
|
154
|
+
|
155
|
+
```ruby
|
156
|
+
# load the gem
|
157
|
+
require 'phrase'
|
158
|
+
# setup authorization
|
159
|
+
Phrase.configure do |config|
|
160
|
+
# Configure HTTP basic authorization: Basic
|
161
|
+
config.username = 'YOUR USERNAME'
|
162
|
+
config.password = 'YOUR PASSWORD'
|
163
|
+
|
164
|
+
# Configure API key authorization: Token
|
165
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
166
|
+
config.api_key_prefix['Authorization'] = 'token'
|
167
|
+
end
|
168
|
+
|
169
|
+
api_instance = Phrase::LinkedKeysApi.new
|
170
|
+
project_id = 'project_id_example' # String | Project ID
|
171
|
+
id = 'id_example' # String | Parent Translation Key ID
|
172
|
+
child_key_id = 'child_key_id_example' # String | The ID of the child key to unlink.
|
173
|
+
opts = {
|
174
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
175
|
+
}
|
176
|
+
|
177
|
+
begin
|
178
|
+
#Unlink a child key from a parent key
|
179
|
+
api_instance.key_links_destroy(project_id, id, child_key_id, opts)
|
180
|
+
rescue Phrase::ApiError => e
|
181
|
+
puts "Exception when calling LinkedKeysApi->key_links_destroy: #{e}"
|
182
|
+
end
|
183
|
+
```
|
184
|
+
|
185
|
+
### Parameters
|
186
|
+
|
187
|
+
|
188
|
+
Name | Type | Description | Notes
|
189
|
+
------------- | ------------- | ------------- | -------------
|
190
|
+
**project_id** | **String**| Project ID |
|
191
|
+
**id** | **String**| Parent Translation Key ID |
|
192
|
+
**child_key_id** | **String**| The ID of the child key to unlink. |
|
193
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
194
|
+
|
195
|
+
### Return type
|
196
|
+
|
197
|
+
Response<(nil (empty response body))>
|
198
|
+
|
199
|
+
### Authorization
|
200
|
+
|
201
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
202
|
+
|
203
|
+
### HTTP request headers
|
204
|
+
|
205
|
+
- **Content-Type**: Not defined
|
206
|
+
- **Accept**: application/json
|
207
|
+
|
208
|
+
|
209
|
+
## key_links_index
|
210
|
+
|
211
|
+
> KeyLink key_links_index(project_id, id, opts)
|
212
|
+
|
213
|
+
Retrieve all child keys linked to a specific parent key
|
214
|
+
|
215
|
+
Returns detailed information about a parent key, including its linked child keys.
|
216
|
+
|
217
|
+
### Example
|
218
|
+
|
219
|
+
```ruby
|
220
|
+
# load the gem
|
221
|
+
require 'phrase'
|
222
|
+
# setup authorization
|
223
|
+
Phrase.configure do |config|
|
224
|
+
# Configure HTTP basic authorization: Basic
|
225
|
+
config.username = 'YOUR USERNAME'
|
226
|
+
config.password = 'YOUR PASSWORD'
|
227
|
+
|
228
|
+
# Configure API key authorization: Token
|
229
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
230
|
+
config.api_key_prefix['Authorization'] = 'token'
|
231
|
+
end
|
232
|
+
|
233
|
+
api_instance = Phrase::LinkedKeysApi.new
|
234
|
+
project_id = 'project_id_example' # String | Project ID
|
235
|
+
id = 'id_example' # String | Parent Translation Key ID
|
236
|
+
opts = {
|
237
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
238
|
+
}
|
239
|
+
|
240
|
+
begin
|
241
|
+
#Retrieve all child keys linked to a specific parent key
|
242
|
+
result = api_instance.key_links_index(project_id, id, opts)
|
243
|
+
pp result
|
244
|
+
rescue Phrase::ApiError => e
|
245
|
+
puts "Exception when calling LinkedKeysApi->key_links_index: #{e}"
|
246
|
+
end
|
247
|
+
```
|
248
|
+
|
249
|
+
### Parameters
|
250
|
+
|
251
|
+
|
252
|
+
Name | Type | Description | Notes
|
253
|
+
------------- | ------------- | ------------- | -------------
|
254
|
+
**project_id** | **String**| Project ID |
|
255
|
+
**id** | **String**| Parent Translation Key ID |
|
256
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
257
|
+
|
258
|
+
### Return type
|
259
|
+
|
260
|
+
Response<([**KeyLink**](KeyLink.md))>
|
261
|
+
|
262
|
+
### Authorization
|
263
|
+
|
264
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
265
|
+
|
266
|
+
### HTTP request headers
|
267
|
+
|
268
|
+
- **Content-Type**: Not defined
|
269
|
+
- **Accept**: application/json
|
270
|
+
|
@@ -40,7 +40,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
|
|
40
40
|
main_format: yml,
|
41
41
|
media: Python,
|
42
42
|
shares_translation_memory: true,
|
43
|
-
project_image: [B@
|
43
|
+
project_image: [B@2c890ee3,
|
44
44
|
remove_project_image: null,
|
45
45
|
account_id: abcd1234,
|
46
46
|
point_of_contact: abcd1234,
|
@@ -41,7 +41,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
|
|
41
41
|
main_format: yml,
|
42
42
|
media: Python,
|
43
43
|
shares_translation_memory: true,
|
44
|
-
project_image: [B@
|
44
|
+
project_image: [B@62068fa5,
|
45
45
|
remove_project_image: false,
|
46
46
|
workflow: review,
|
47
47
|
machine_translation_enabled: true,
|
@@ -86,6 +86,7 @@ module Phrase
|
|
86
86
|
# @option opts [String] :project_id id of project that the properties belong to
|
87
87
|
# @option opts [Integer] :page Page number
|
88
88
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
89
|
+
# @option opts [String] :q query to find a property by name
|
89
90
|
# @option opts [String] :sort Sort criteria. Can be one of: name, data_type, created_at.
|
90
91
|
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
91
92
|
# @return [Array<CustomMetadataProperty>]
|
@@ -103,6 +104,7 @@ module Phrase
|
|
103
104
|
# @option opts [String] :project_id id of project that the properties belong to
|
104
105
|
# @option opts [Integer] :page Page number
|
105
106
|
# @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
107
|
+
# @option opts [String] :q query to find a property by name
|
106
108
|
# @option opts [String] :sort Sort criteria. Can be one of: name, data_type, created_at.
|
107
109
|
# @option opts [String] :order Order direction. Can be one of: asc, desc.
|
108
110
|
# @return [Array<(Response<(Array<CustomMetadataProperty>)>, Integer, Hash)>] Response<(Array<CustomMetadataProperty>)> data, response status code and response headers
|
@@ -123,6 +125,7 @@ module Phrase
|
|
123
125
|
query_params[:'project_id'] = opts[:'project_id'] if !opts[:'project_id'].nil?
|
124
126
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
125
127
|
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
128
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
126
129
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
127
130
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
128
131
|
|