phrase 4.8.0 → 4.10.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 +15 -0
- data/README.md +13 -3
- data/docs/Automation.md +41 -0
- data/docs/AutomationsApi.md +455 -0
- data/docs/AutomationsCreateParameters.md +31 -0
- data/docs/AutomationsCreateParameters1.md +31 -0
- data/docs/KeyCreateParameters.md +1 -1
- data/docs/KeyUpdateParameters.md +1 -1
- data/docs/ProjectCreateParameters.md +1 -1
- data/docs/ProjectUpdateParameters.md +1 -1
- data/docs/ScreenshotUpdateParameters.md +1 -1
- data/docs/TranslationUpdateParameters.md +3 -1
- data/docs/UploadsApi.md +2 -0
- data/lib/phrase/api/automations_api.rb +518 -0
- data/lib/phrase/api/uploads_api.rb +3 -0
- data/lib/phrase/models/automation.rb +355 -0
- data/lib/phrase/models/automations_create_parameters.rb +326 -0
- data/lib/phrase/models/automations_create_parameters1.rb +326 -0
- data/lib/phrase/models/translation_update_parameters.rb +14 -4
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +4 -0
- data/spec/api/automations_api_spec.rb +121 -0
- data/spec/models/automation_spec.rb +113 -0
- data/spec/models/automations_create_parameters1_spec.rb +79 -0
- data/spec/models/automations_create_parameters_spec.rb +79 -0
- data/spec/models/translation_update_parameters_spec.rb +6 -0
- metadata +247 -231
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1f05b092cf94291d6805c4a9c66aab1d2aa061c6cb4be7855acb0c5cf1c3161
|
4
|
+
data.tar.gz: b34128655c5e36defe2a699c1a3ada9caeb49bd2b21abfbf268fbc094e97e8f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09a326a7c4a77449197cd337b1ba6158e2b2692eb4baf4f281d38c39bf6a08043df95ef2dcdf1dfb9067be69b9e96c8f9840409c67467b1e157924ceeeb6502d'
|
7
|
+
data.tar.gz: a928d32a5fcffe11f4df850baa83db850628d9ae0df20f2fa42191792a563ed46556499c3889e3584c21454e389d45ddc6c5f1c1fcae448cb86dabf989e90eb8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [4.10.0](https://github.com/phrase/openapi/compare/ruby-v4.9.0...ruby-v4.10.0) (2025-09-30)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **API:** Add "reviewed" param for tanslations#update ([#891](https://github.com/phrase/openapi/issues/891)) ([3f77286](https://github.com/phrase/openapi/commit/3f7728669fa68d5911dfca39a9e39c24cd20c0a4))
|
9
|
+
* **SCM-732:** expose Automation API ([#910](https://github.com/phrase/openapi/issues/910)) ([6eea53d](https://github.com/phrase/openapi/commit/6eea53d06aca8f43623ba90e2e0a8cd6761c9a13))
|
10
|
+
|
11
|
+
## [4.9.0](https://github.com/phrase/openapi/compare/ruby-v4.8.0...ruby-v4.9.0) (2025-08-01)
|
12
|
+
|
13
|
+
|
14
|
+
### Features
|
15
|
+
|
16
|
+
* **API:** Add support for `update_custom_metadata` option on upload ([#882](https://github.com/phrase/openapi/issues/882)) ([5b486ea](https://github.com/phrase/openapi/commit/5b486eabf30c84402a8e31911a5ba6fe3b343a89))
|
17
|
+
|
3
18
|
## [4.8.0](https://github.com/phrase/openapi/compare/ruby-v4.7.0...ruby-v4.8.0) (2025-07-23)
|
4
19
|
|
5
20
|
|
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: 4.
|
10
|
+
- Package version: 4.10.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-4.
|
59
|
+
gem install ./phrase-4.10.0.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-4.
|
62
|
+
(for development, run `gem install --dev ./phrase-4.10.0.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -137,6 +137,13 @@ Class | Method | HTTP request | Description
|
|
137
137
|
*Phrase::AuthorizationsApi* | [**authorization_show**](docs/AuthorizationsApi.md#authorization_show) | **GET** /authorizations/{id} | Get a single authorization
|
138
138
|
*Phrase::AuthorizationsApi* | [**authorization_update**](docs/AuthorizationsApi.md#authorization_update) | **PATCH** /authorizations/{id} | Update an authorization
|
139
139
|
*Phrase::AuthorizationsApi* | [**authorizations_list**](docs/AuthorizationsApi.md#authorizations_list) | **GET** /authorizations | List authorizations
|
140
|
+
*Phrase::AutomationsApi* | [**automation_activate**](docs/AutomationsApi.md#automation_activate) | **POST** /accounts/{account_id}/automations/{automation_id}/activate | Activate an automation
|
141
|
+
*Phrase::AutomationsApi* | [**automation_create**](docs/AutomationsApi.md#automation_create) | **POST** /accounts/{account_id}/automations | Create an automation
|
142
|
+
*Phrase::AutomationsApi* | [**automation_deactivate**](docs/AutomationsApi.md#automation_deactivate) | **POST** /accounts/{account_id}/automations/{automation_id}/deactivate | Deactivate an automation
|
143
|
+
*Phrase::AutomationsApi* | [**automation_delete**](docs/AutomationsApi.md#automation_delete) | **DELETE** /accounts/{account_id}/automations/{automation_id} | Destroy automation
|
144
|
+
*Phrase::AutomationsApi* | [**automation_show**](docs/AutomationsApi.md#automation_show) | **GET** /accounts/{account_id}/automations/{automation_id} | Get a single automation
|
145
|
+
*Phrase::AutomationsApi* | [**automation_update**](docs/AutomationsApi.md#automation_update) | **PATCH** /accounts/{account_id}/automations/{automation_id} | Update an automation
|
146
|
+
*Phrase::AutomationsApi* | [**automations_list**](docs/AutomationsApi.md#automations_list) | **GET** /accounts/{account_id}/automations | List automations
|
140
147
|
*Phrase::BlacklistedKeysApi* | [**blacklisted_key_create**](docs/BlacklistedKeysApi.md#blacklisted_key_create) | **POST** /projects/{project_id}/blacklisted_keys | Create a blocked key
|
141
148
|
*Phrase::BlacklistedKeysApi* | [**blacklisted_key_delete**](docs/BlacklistedKeysApi.md#blacklisted_key_delete) | **DELETE** /projects/{project_id}/blacklisted_keys/{id} | Delete a blocked key
|
142
149
|
*Phrase::BlacklistedKeysApi* | [**blacklisted_key_show**](docs/BlacklistedKeysApi.md#blacklisted_key_show) | **GET** /projects/{project_id}/blacklisted_keys/{id} | Get a single blocked key
|
@@ -418,6 +425,9 @@ Class | Method | HTTP request | Description
|
|
418
425
|
- [Phrase::AuthorizationCreateParameters](docs/AuthorizationCreateParameters.md)
|
419
426
|
- [Phrase::AuthorizationUpdateParameters](docs/AuthorizationUpdateParameters.md)
|
420
427
|
- [Phrase::AuthorizationWithToken](docs/AuthorizationWithToken.md)
|
428
|
+
- [Phrase::Automation](docs/Automation.md)
|
429
|
+
- [Phrase::AutomationsCreateParameters](docs/AutomationsCreateParameters.md)
|
430
|
+
- [Phrase::AutomationsCreateParameters1](docs/AutomationsCreateParameters1.md)
|
421
431
|
- [Phrase::BlacklistedKey](docs/BlacklistedKey.md)
|
422
432
|
- [Phrase::BlacklistedKeyCreateParameters](docs/BlacklistedKeyCreateParameters.md)
|
423
433
|
- [Phrase::BlacklistedKeyUpdateParameters](docs/BlacklistedKeyUpdateParameters.md)
|
data/docs/Automation.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Phrase::Automation
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | | [optional]
|
8
|
+
**name** | **String** | | [optional]
|
9
|
+
**status** | **String** | | [optional]
|
10
|
+
**trigger** | **String** | | [optional]
|
11
|
+
**status_filters** | **Array<String>** | translation key statuses used to filter keys that are added to jobs | [optional]
|
12
|
+
**project_id** | **String** | | [optional]
|
13
|
+
**job_template_id** | **String** | | [optional]
|
14
|
+
**tags** | **Array<String>** | | [optional]
|
15
|
+
**cron_schedule** | **String** | | [optional]
|
16
|
+
**time_zone** | **String** | | [optional]
|
17
|
+
**account** | [**Account**](Account.md) | | [optional]
|
18
|
+
**created_at** | **Time** | | [optional]
|
19
|
+
**updated_at** | **Time** | | [optional]
|
20
|
+
|
21
|
+
## Code Sample
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'Phrase'
|
25
|
+
|
26
|
+
instance = Phrase::Automation.new(id: null,
|
27
|
+
name: null,
|
28
|
+
status: null,
|
29
|
+
trigger: null,
|
30
|
+
status_filters: null,
|
31
|
+
project_id: null,
|
32
|
+
job_template_id: null,
|
33
|
+
tags: null,
|
34
|
+
cron_schedule: null,
|
35
|
+
time_zone: null,
|
36
|
+
account: null,
|
37
|
+
created_at: null,
|
38
|
+
updated_at: null)
|
39
|
+
```
|
40
|
+
|
41
|
+
|
@@ -0,0 +1,455 @@
|
|
1
|
+
# Phrase::AutomationsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**automation_activate**](AutomationsApi.md#automation_activate) | **POST** /accounts/{account_id}/automations/{automation_id}/activate | Activate an automation
|
8
|
+
[**automation_create**](AutomationsApi.md#automation_create) | **POST** /accounts/{account_id}/automations | Create an automation
|
9
|
+
[**automation_deactivate**](AutomationsApi.md#automation_deactivate) | **POST** /accounts/{account_id}/automations/{automation_id}/deactivate | Deactivate an automation
|
10
|
+
[**automation_delete**](AutomationsApi.md#automation_delete) | **DELETE** /accounts/{account_id}/automations/{automation_id} | Destroy automation
|
11
|
+
[**automation_show**](AutomationsApi.md#automation_show) | **GET** /accounts/{account_id}/automations/{automation_id} | Get a single automation
|
12
|
+
[**automation_update**](AutomationsApi.md#automation_update) | **PATCH** /accounts/{account_id}/automations/{automation_id} | Update an automation
|
13
|
+
[**automations_list**](AutomationsApi.md#automations_list) | **GET** /accounts/{account_id}/automations | List automations
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## automation_activate
|
18
|
+
|
19
|
+
> Automation automation_activate(account_id, id, opts)
|
20
|
+
|
21
|
+
Activate an automation
|
22
|
+
|
23
|
+
### Example
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# load the gem
|
27
|
+
require 'phrase'
|
28
|
+
# setup authorization
|
29
|
+
Phrase.configure do |config|
|
30
|
+
# Configure HTTP basic authorization: Basic
|
31
|
+
config.username = 'YOUR USERNAME'
|
32
|
+
config.password = 'YOUR PASSWORD'
|
33
|
+
|
34
|
+
# Configure API key authorization: Token
|
35
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
36
|
+
config.api_key_prefix['Authorization'] = 'token'
|
37
|
+
end
|
38
|
+
|
39
|
+
api_instance = Phrase::AutomationsApi.new
|
40
|
+
account_id = 'account_id_example' # String | Account ID
|
41
|
+
id = 'id_example' # String | ID
|
42
|
+
opts = {
|
43
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
44
|
+
}
|
45
|
+
|
46
|
+
begin
|
47
|
+
#Activate an automation
|
48
|
+
result = api_instance.automation_activate(account_id, id, opts)
|
49
|
+
pp result
|
50
|
+
rescue Phrase::ApiError => e
|
51
|
+
puts "Exception when calling AutomationsApi->automation_activate: #{e}"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### Parameters
|
56
|
+
|
57
|
+
|
58
|
+
Name | Type | Description | Notes
|
59
|
+
------------- | ------------- | ------------- | -------------
|
60
|
+
**account_id** | **String**| Account ID |
|
61
|
+
**id** | **String**| ID |
|
62
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
Response<([**Automation**](Automation.md))>
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: Not defined
|
75
|
+
- **Accept**: application/json
|
76
|
+
|
77
|
+
|
78
|
+
## automation_create
|
79
|
+
|
80
|
+
> Automation automation_create(account_id, automations_create_parameters, opts)
|
81
|
+
|
82
|
+
Create an automation
|
83
|
+
|
84
|
+
Create a new automation.
|
85
|
+
|
86
|
+
### Example
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
# load the gem
|
90
|
+
require 'phrase'
|
91
|
+
# setup authorization
|
92
|
+
Phrase.configure do |config|
|
93
|
+
# Configure HTTP basic authorization: Basic
|
94
|
+
config.username = 'YOUR USERNAME'
|
95
|
+
config.password = 'YOUR PASSWORD'
|
96
|
+
|
97
|
+
# Configure API key authorization: Token
|
98
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
99
|
+
config.api_key_prefix['Authorization'] = 'token'
|
100
|
+
end
|
101
|
+
|
102
|
+
api_instance = Phrase::AutomationsApi.new
|
103
|
+
account_id = 'account_id_example' # String | Account ID
|
104
|
+
automations_create_parameters = Phrase::AutomationsCreateParameters.new({name: 'Scheduled Job Automation - Hourly', trigger: 'schedule', project_ids: ["abcd1234cdef1234abcd1234cdef1234"], status_filters: ['unverified']}) # AutomationsCreateParameters |
|
105
|
+
opts = {
|
106
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
107
|
+
}
|
108
|
+
|
109
|
+
begin
|
110
|
+
#Create an automation
|
111
|
+
result = api_instance.automation_create(account_id, automations_create_parameters, opts)
|
112
|
+
pp result
|
113
|
+
rescue Phrase::ApiError => e
|
114
|
+
puts "Exception when calling AutomationsApi->automation_create: #{e}"
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
### Parameters
|
119
|
+
|
120
|
+
|
121
|
+
Name | Type | Description | Notes
|
122
|
+
------------- | ------------- | ------------- | -------------
|
123
|
+
**account_id** | **String**| Account ID |
|
124
|
+
**automations_create_parameters** | [**AutomationsCreateParameters**](AutomationsCreateParameters.md)| |
|
125
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
126
|
+
|
127
|
+
### Return type
|
128
|
+
|
129
|
+
Response<([**Automation**](Automation.md))>
|
130
|
+
|
131
|
+
### Authorization
|
132
|
+
|
133
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
134
|
+
|
135
|
+
### HTTP request headers
|
136
|
+
|
137
|
+
- **Content-Type**: application/json
|
138
|
+
- **Accept**: application/json
|
139
|
+
|
140
|
+
|
141
|
+
## automation_deactivate
|
142
|
+
|
143
|
+
> Automation automation_deactivate(account_id, id, opts)
|
144
|
+
|
145
|
+
Deactivate an automation
|
146
|
+
|
147
|
+
### Example
|
148
|
+
|
149
|
+
```ruby
|
150
|
+
# load the gem
|
151
|
+
require 'phrase'
|
152
|
+
# setup authorization
|
153
|
+
Phrase.configure do |config|
|
154
|
+
# Configure HTTP basic authorization: Basic
|
155
|
+
config.username = 'YOUR USERNAME'
|
156
|
+
config.password = 'YOUR PASSWORD'
|
157
|
+
|
158
|
+
# Configure API key authorization: Token
|
159
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
160
|
+
config.api_key_prefix['Authorization'] = 'token'
|
161
|
+
end
|
162
|
+
|
163
|
+
api_instance = Phrase::AutomationsApi.new
|
164
|
+
account_id = 'account_id_example' # String | Account ID
|
165
|
+
id = 'id_example' # String | ID
|
166
|
+
opts = {
|
167
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
168
|
+
}
|
169
|
+
|
170
|
+
begin
|
171
|
+
#Deactivate an automation
|
172
|
+
result = api_instance.automation_deactivate(account_id, id, opts)
|
173
|
+
pp result
|
174
|
+
rescue Phrase::ApiError => e
|
175
|
+
puts "Exception when calling AutomationsApi->automation_deactivate: #{e}"
|
176
|
+
end
|
177
|
+
```
|
178
|
+
|
179
|
+
### Parameters
|
180
|
+
|
181
|
+
|
182
|
+
Name | Type | Description | Notes
|
183
|
+
------------- | ------------- | ------------- | -------------
|
184
|
+
**account_id** | **String**| Account ID |
|
185
|
+
**id** | **String**| ID |
|
186
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
187
|
+
|
188
|
+
### Return type
|
189
|
+
|
190
|
+
Response<([**Automation**](Automation.md))>
|
191
|
+
|
192
|
+
### Authorization
|
193
|
+
|
194
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
195
|
+
|
196
|
+
### HTTP request headers
|
197
|
+
|
198
|
+
- **Content-Type**: Not defined
|
199
|
+
- **Accept**: application/json
|
200
|
+
|
201
|
+
|
202
|
+
## automation_delete
|
203
|
+
|
204
|
+
> automation_delete(account_id, id, opts)
|
205
|
+
|
206
|
+
Destroy automation
|
207
|
+
|
208
|
+
Destroy an automation of an account. This endpoint is only available to accounts with advanced plans or above.
|
209
|
+
|
210
|
+
### Example
|
211
|
+
|
212
|
+
```ruby
|
213
|
+
# load the gem
|
214
|
+
require 'phrase'
|
215
|
+
# setup authorization
|
216
|
+
Phrase.configure do |config|
|
217
|
+
# Configure HTTP basic authorization: Basic
|
218
|
+
config.username = 'YOUR USERNAME'
|
219
|
+
config.password = 'YOUR PASSWORD'
|
220
|
+
|
221
|
+
# Configure API key authorization: Token
|
222
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
223
|
+
config.api_key_prefix['Authorization'] = 'token'
|
224
|
+
end
|
225
|
+
|
226
|
+
api_instance = Phrase::AutomationsApi.new
|
227
|
+
account_id = 'account_id_example' # String | Account ID
|
228
|
+
id = 'id_example' # String | ID
|
229
|
+
opts = {
|
230
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
231
|
+
}
|
232
|
+
|
233
|
+
begin
|
234
|
+
#Destroy automation
|
235
|
+
api_instance.automation_delete(account_id, id, opts)
|
236
|
+
rescue Phrase::ApiError => e
|
237
|
+
puts "Exception when calling AutomationsApi->automation_delete: #{e}"
|
238
|
+
end
|
239
|
+
```
|
240
|
+
|
241
|
+
### Parameters
|
242
|
+
|
243
|
+
|
244
|
+
Name | Type | Description | Notes
|
245
|
+
------------- | ------------- | ------------- | -------------
|
246
|
+
**account_id** | **String**| Account ID |
|
247
|
+
**id** | **String**| ID |
|
248
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
249
|
+
|
250
|
+
### Return type
|
251
|
+
|
252
|
+
Response<(nil (empty response body))>
|
253
|
+
|
254
|
+
### Authorization
|
255
|
+
|
256
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
257
|
+
|
258
|
+
### HTTP request headers
|
259
|
+
|
260
|
+
- **Content-Type**: Not defined
|
261
|
+
- **Accept**: Not defined
|
262
|
+
|
263
|
+
|
264
|
+
## automation_show
|
265
|
+
|
266
|
+
> Automation automation_show(account_id, id, opts)
|
267
|
+
|
268
|
+
Get a single automation
|
269
|
+
|
270
|
+
Get details of a single automation.
|
271
|
+
|
272
|
+
### Example
|
273
|
+
|
274
|
+
```ruby
|
275
|
+
# load the gem
|
276
|
+
require 'phrase'
|
277
|
+
# setup authorization
|
278
|
+
Phrase.configure do |config|
|
279
|
+
# Configure HTTP basic authorization: Basic
|
280
|
+
config.username = 'YOUR USERNAME'
|
281
|
+
config.password = 'YOUR PASSWORD'
|
282
|
+
|
283
|
+
# Configure API key authorization: Token
|
284
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
285
|
+
config.api_key_prefix['Authorization'] = 'token'
|
286
|
+
end
|
287
|
+
|
288
|
+
api_instance = Phrase::AutomationsApi.new
|
289
|
+
account_id = 'account_id_example' # String | Account ID
|
290
|
+
id = 'id_example' # String | ID
|
291
|
+
opts = {
|
292
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
293
|
+
}
|
294
|
+
|
295
|
+
begin
|
296
|
+
#Get a single automation
|
297
|
+
result = api_instance.automation_show(account_id, id, opts)
|
298
|
+
pp result
|
299
|
+
rescue Phrase::ApiError => e
|
300
|
+
puts "Exception when calling AutomationsApi->automation_show: #{e}"
|
301
|
+
end
|
302
|
+
```
|
303
|
+
|
304
|
+
### Parameters
|
305
|
+
|
306
|
+
|
307
|
+
Name | Type | Description | Notes
|
308
|
+
------------- | ------------- | ------------- | -------------
|
309
|
+
**account_id** | **String**| Account ID |
|
310
|
+
**id** | **String**| ID |
|
311
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
312
|
+
|
313
|
+
### Return type
|
314
|
+
|
315
|
+
Response<([**Automation**](Automation.md))>
|
316
|
+
|
317
|
+
### Authorization
|
318
|
+
|
319
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
320
|
+
|
321
|
+
### HTTP request headers
|
322
|
+
|
323
|
+
- **Content-Type**: Not defined
|
324
|
+
- **Accept**: application/json
|
325
|
+
|
326
|
+
|
327
|
+
## automation_update
|
328
|
+
|
329
|
+
> Automation automation_update(account_id, id, automations_create_parameters1, opts)
|
330
|
+
|
331
|
+
Update an automation
|
332
|
+
|
333
|
+
Update an existing automation.
|
334
|
+
|
335
|
+
### Example
|
336
|
+
|
337
|
+
```ruby
|
338
|
+
# load the gem
|
339
|
+
require 'phrase'
|
340
|
+
# setup authorization
|
341
|
+
Phrase.configure do |config|
|
342
|
+
# Configure HTTP basic authorization: Basic
|
343
|
+
config.username = 'YOUR USERNAME'
|
344
|
+
config.password = 'YOUR PASSWORD'
|
345
|
+
|
346
|
+
# Configure API key authorization: Token
|
347
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
348
|
+
config.api_key_prefix['Authorization'] = 'token'
|
349
|
+
end
|
350
|
+
|
351
|
+
api_instance = Phrase::AutomationsApi.new
|
352
|
+
account_id = 'account_id_example' # String | Account ID
|
353
|
+
id = 'id_example' # String | ID
|
354
|
+
automations_create_parameters1 = Phrase::AutomationsCreateParameters1.new({name: 'Scheduled Job Automation - Hourly', trigger: 'schedule', project_ids: ["abcd1234cdef1234abcd1234cdef1234"], status_filters: ['unverified']}) # AutomationsCreateParameters1 |
|
355
|
+
opts = {
|
356
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
357
|
+
}
|
358
|
+
|
359
|
+
begin
|
360
|
+
#Update an automation
|
361
|
+
result = api_instance.automation_update(account_id, id, automations_create_parameters1, opts)
|
362
|
+
pp result
|
363
|
+
rescue Phrase::ApiError => e
|
364
|
+
puts "Exception when calling AutomationsApi->automation_update: #{e}"
|
365
|
+
end
|
366
|
+
```
|
367
|
+
|
368
|
+
### Parameters
|
369
|
+
|
370
|
+
|
371
|
+
Name | Type | Description | Notes
|
372
|
+
------------- | ------------- | ------------- | -------------
|
373
|
+
**account_id** | **String**| Account ID |
|
374
|
+
**id** | **String**| ID |
|
375
|
+
**automations_create_parameters1** | [**AutomationsCreateParameters1**](AutomationsCreateParameters1.md)| |
|
376
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
377
|
+
|
378
|
+
### Return type
|
379
|
+
|
380
|
+
Response<([**Automation**](Automation.md))>
|
381
|
+
|
382
|
+
### Authorization
|
383
|
+
|
384
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
385
|
+
|
386
|
+
### HTTP request headers
|
387
|
+
|
388
|
+
- **Content-Type**: application/json
|
389
|
+
- **Accept**: application/json
|
390
|
+
|
391
|
+
|
392
|
+
## automations_list
|
393
|
+
|
394
|
+
> Array<Automation> automations_list(account_id, opts)
|
395
|
+
|
396
|
+
List automations
|
397
|
+
|
398
|
+
List all automations for an account. This endpoint is only available to accounts with advanced plans or above.
|
399
|
+
|
400
|
+
### Example
|
401
|
+
|
402
|
+
```ruby
|
403
|
+
# load the gem
|
404
|
+
require 'phrase'
|
405
|
+
# setup authorization
|
406
|
+
Phrase.configure do |config|
|
407
|
+
# Configure HTTP basic authorization: Basic
|
408
|
+
config.username = 'YOUR USERNAME'
|
409
|
+
config.password = 'YOUR PASSWORD'
|
410
|
+
|
411
|
+
# Configure API key authorization: Token
|
412
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
413
|
+
config.api_key_prefix['Authorization'] = 'token'
|
414
|
+
end
|
415
|
+
|
416
|
+
api_instance = Phrase::AutomationsApi.new
|
417
|
+
account_id = 'account_id_example' # String | Account ID
|
418
|
+
opts = {
|
419
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
420
|
+
page: 1, # Integer | Page number
|
421
|
+
per_page: 25 # Integer | Limit on the number of objects to be returned, between 1 and 100. 25 by default
|
422
|
+
}
|
423
|
+
|
424
|
+
begin
|
425
|
+
#List automations
|
426
|
+
result = api_instance.automations_list(account_id, opts)
|
427
|
+
pp result
|
428
|
+
rescue Phrase::ApiError => e
|
429
|
+
puts "Exception when calling AutomationsApi->automations_list: #{e}"
|
430
|
+
end
|
431
|
+
```
|
432
|
+
|
433
|
+
### Parameters
|
434
|
+
|
435
|
+
|
436
|
+
Name | Type | Description | Notes
|
437
|
+
------------- | ------------- | ------------- | -------------
|
438
|
+
**account_id** | **String**| Account ID |
|
439
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
440
|
+
**page** | **Integer**| Page number | [optional]
|
441
|
+
**per_page** | **Integer**| Limit on the number of objects to be returned, between 1 and 100. 25 by default | [optional]
|
442
|
+
|
443
|
+
### Return type
|
444
|
+
|
445
|
+
Response<([**Array<Automation>**](Automation.md))>
|
446
|
+
|
447
|
+
### Authorization
|
448
|
+
|
449
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
450
|
+
|
451
|
+
### HTTP request headers
|
452
|
+
|
453
|
+
- **Content-Type**: Not defined
|
454
|
+
- **Accept**: application/json
|
455
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Phrase::AutomationsCreateParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | name of the automation |
|
8
|
+
**trigger** | **String** | |
|
9
|
+
**project_ids** | **Array<String>** | List of project IDs to associate with the automation. Currently, only the first ID in the array is used. The array format leaves room for future support of multiple projects. |
|
10
|
+
**job_template_id** | **String** | id of job template that the automation uses to create jobs from | [optional]
|
11
|
+
**status_filters** | **Array<String>** | Translation states used when selecting keys for a job. States are derived from associated translations, not the keys themselves. When review workflow is enabled, `ready_for_review` is internally treated as `translated`. |
|
12
|
+
**tags** | **Array<String>** | used to filter which keys are added to jobs | [optional]
|
13
|
+
**cron_schedule** | **String** | along with time_zone, specifies when the scheduled automation is supposed to run | [optional]
|
14
|
+
**time_zone** | **String** | along with cron_schedule, specifies when the scheduled automation is supposed to run | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'Phrase'
|
20
|
+
|
21
|
+
instance = Phrase::AutomationsCreateParameters.new(name: Scheduled Job Automation - Hourly,
|
22
|
+
trigger: null,
|
23
|
+
project_ids: ["abcd1234cdef1234abcd1234cdef1234"],
|
24
|
+
job_template_id: abcd1234cdef1234abcd1234cdef1234,
|
25
|
+
status_filters: null,
|
26
|
+
tags: ["myTag"],
|
27
|
+
cron_schedule: 00 13 * * 1,2,
|
28
|
+
time_zone: GMT)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Phrase::AutomationsCreateParameters1
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | name of the automation |
|
8
|
+
**trigger** | **String** | |
|
9
|
+
**project_ids** | **Array<String>** | List of project IDs to associate with the automation. Currently, only the first ID in the array is used. The array format leaves room for future support of multiple projects. |
|
10
|
+
**job_template_id** | **String** | id of job template that the automation uses to create jobs from | [optional]
|
11
|
+
**status_filters** | **Array<String>** | translation key statuses used to filter keys that are added to jobs |
|
12
|
+
**tags** | **Array<String>** | used to filter which keys are added to jobs | [optional]
|
13
|
+
**cron_schedule** | **String** | along with time_zone, specifies when the scheduled automation is supposed to run | [optional]
|
14
|
+
**time_zone** | **String** | along with cron_schedule, specifies when the scheduled automation is supposed to run | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'Phrase'
|
20
|
+
|
21
|
+
instance = Phrase::AutomationsCreateParameters1.new(name: Scheduled Job Automation - Hourly,
|
22
|
+
trigger: null,
|
23
|
+
project_ids: ["abcd1234cdef1234abcd1234cdef1234"],
|
24
|
+
job_template_id: abcd1234cdef1234abcd1234cdef1234,
|
25
|
+
status_filters: null,
|
26
|
+
tags: ["myTag"],
|
27
|
+
cron_schedule: 00 13 * * 1,2,
|
28
|
+
time_zone: GMT)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
data/docs/KeyCreateParameters.md
CHANGED
@@ -38,7 +38,7 @@ instance = Phrase::KeyCreateParameters.new(branch: my-feature-branch,
|
|
38
38
|
data_type: number,
|
39
39
|
tags: awesome-feature,needs-proofreading,
|
40
40
|
max_characters_allowed: 140,
|
41
|
-
screenshot: [B@
|
41
|
+
screenshot: [B@164212ad,
|
42
42
|
remove_screenshot: null,
|
43
43
|
unformatted: null,
|
44
44
|
default_translation_content: Default translation content,
|
data/docs/KeyUpdateParameters.md
CHANGED
@@ -36,7 +36,7 @@ instance = Phrase::KeyUpdateParameters.new(branch: my-feature-branch,
|
|
36
36
|
data_type: number,
|
37
37
|
tags: awesome-feature,needs-proofreading,
|
38
38
|
max_characters_allowed: 140,
|
39
|
-
screenshot: [B@
|
39
|
+
screenshot: [B@1053b20d,
|
40
40
|
remove_screenshot: null,
|
41
41
|
unformatted: null,
|
42
42
|
xml_space_preserve: null,
|
@@ -37,7 +37,7 @@ instance = Phrase::ProjectCreateParameters.new(name: My Android Project,
|
|
37
37
|
main_format: yml,
|
38
38
|
media: Python,
|
39
39
|
shares_translation_memory: true,
|
40
|
-
project_image: [B@
|
40
|
+
project_image: [B@27a9fe9e,
|
41
41
|
remove_project_image: null,
|
42
42
|
account_id: abcd1234,
|
43
43
|
point_of_contact: abcd1234,
|
@@ -39,7 +39,7 @@ instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
|
|
39
39
|
main_format: yml,
|
40
40
|
media: Python,
|
41
41
|
shares_translation_memory: true,
|
42
|
-
project_image: [B@
|
42
|
+
project_image: [B@6cfd4d4d,
|
43
43
|
remove_project_image: false,
|
44
44
|
workflow: review,
|
45
45
|
machine_translation_enabled: true,
|