phrase 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/docs/ProjectUpdateParameters.md +43 -9
- data/docs/Variable.md +23 -0
- data/docs/VariableCreateParameters.md +19 -0
- data/docs/VariableUpdateParameters.md +19 -0
- data/docs/VariablesApi.md +331 -0
- data/lib/phrase.rb +4 -0
- data/lib/phrase/api/variables_api.rb +378 -0
- data/lib/phrase/models/project_update_parameters.rb +183 -13
- data/lib/phrase/models/variable.rb +221 -0
- data/lib/phrase/models/variable_create_parameters.rb +205 -0
- data/lib/phrase/models/variable_update_parameters.rb +205 -0
- data/lib/phrase/version.rb +1 -1
- data/spec/api/variables_api_spec.rb +95 -0
- data/spec/models/project_update_parameters_spec.rb +103 -1
- data/spec/models/variable_create_parameters_spec.rb +35 -0
- data/spec/models/variable_spec.rb +47 -0
- data/spec/models/variable_update_parameters_spec.rb +35 -0
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49a19fc546ef52207dcf5bb6fb55be7d17952a2bf653c9ffff5be7635d3b4458
|
4
|
+
data.tar.gz: 0fa6cbdbea643ec4d224630d8c64d4985e98f24c027222f752a3401c9326ec4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6417d48d5c4db8bdd56e5d15e82e443a30ce12709930a38e36e1e10d7ca2d1de79c68a8f603dce55d6ace04eb24828503615116337883e74a9fa343ceb971a71
|
7
|
+
data.tar.gz: 1f3acb829026fc944d11b5a17b0d33fda84461f2373a170371266a13d52f2292a8ca5978a441cd65aa2d4a0136ffffb44d2d3017d8a8222bbeaeee31f71699a5
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Phrase is a translation management platform for software projects. You can colla
|
|
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: 1.0.
|
10
|
+
- Package version: 1.0.13
|
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-1.0.
|
59
|
+
gem install ./phrase-1.0.13.gem
|
60
60
|
```
|
61
61
|
|
62
|
-
(for development, run `gem install --dev ./phrase-1.0.
|
62
|
+
(for development, run `gem install --dev ./phrase-1.0.13.gem` to install the development dependencies)
|
63
63
|
|
64
64
|
## Getting Started
|
65
65
|
|
@@ -284,6 +284,11 @@ Class | Method | HTTP request | Description
|
|
284
284
|
*Phrase::UploadsApi* | [**upload_show**](docs/UploadsApi.md#upload_show) | **GET** /projects/{project_id}/uploads/{id} | View upload details
|
285
285
|
*Phrase::UploadsApi* | [**uploads_list**](docs/UploadsApi.md#uploads_list) | **GET** /projects/{project_id}/uploads | List uploads
|
286
286
|
*Phrase::UsersApi* | [**show_user**](docs/UsersApi.md#show_user) | **GET** /user | Show current User
|
287
|
+
*Phrase::VariablesApi* | [**variable_create**](docs/VariablesApi.md#variable_create) | **POST** /projects/{project_id}/variables | Create a variable
|
288
|
+
*Phrase::VariablesApi* | [**variable_delete**](docs/VariablesApi.md#variable_delete) | **DELETE** /projects/{project_id}/variables/{name} | Delete a variable
|
289
|
+
*Phrase::VariablesApi* | [**variable_show**](docs/VariablesApi.md#variable_show) | **GET** /projects/{project_id}/variables/{name} | Get a single variable
|
290
|
+
*Phrase::VariablesApi* | [**variable_update**](docs/VariablesApi.md#variable_update) | **PATCH** /projects/{project_id}/variables/{name} | Update a variable
|
291
|
+
*Phrase::VariablesApi* | [**variables_list**](docs/VariablesApi.md#variables_list) | **GET** /projects/{project_id}/variables | List variables
|
287
292
|
*Phrase::VersionsHistoryApi* | [**version_show**](docs/VersionsHistoryApi.md#version_show) | **GET** /projects/{project_id}/translations/{translation_id}/versions/{id} | Get a single version
|
288
293
|
*Phrase::VersionsHistoryApi* | [**versions_list**](docs/VersionsHistoryApi.md#versions_list) | **GET** /projects/{project_id}/translations/{translation_id}/versions | List all versions
|
289
294
|
*Phrase::WebhooksApi* | [**webhook_create**](docs/WebhooksApi.md#webhook_create) | **POST** /projects/{project_id}/webhooks | Create a webhook
|
@@ -455,6 +460,9 @@ Class | Method | HTTP request | Description
|
|
455
460
|
- [Phrase::UploadSummary](docs/UploadSummary.md)
|
456
461
|
- [Phrase::User](docs/User.md)
|
457
462
|
- [Phrase::UserPreview](docs/UserPreview.md)
|
463
|
+
- [Phrase::Variable](docs/Variable.md)
|
464
|
+
- [Phrase::VariableCreateParameters](docs/VariableCreateParameters.md)
|
465
|
+
- [Phrase::VariableUpdateParameters](docs/VariableUpdateParameters.md)
|
458
466
|
- [Phrase::Webhook](docs/Webhook.md)
|
459
467
|
- [Phrase::WebhookCreateParameters](docs/WebhookCreateParameters.md)
|
460
468
|
- [Phrase::WebhookUpdateParameters](docs/WebhookUpdateParameters.md)
|
@@ -4,24 +4,58 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**
|
8
|
-
**
|
9
|
-
**
|
10
|
-
**
|
11
|
-
**
|
12
|
-
**
|
7
|
+
**account_id** | **String** | Required if the requesting user is a member of multiple accounts. Account ID to specify the actual account the project should be created in. | [optional]
|
8
|
+
**name** | **String** | (Optional) Name of the project | [optional]
|
9
|
+
**main_format** | **String** | (Optional) Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">Format Guide</a> or our <a href=\"#formats\">Formats API Endpoint</a>. | [optional]
|
10
|
+
**shares_translation_memory** | **Boolean** | (Optional) Indicates whether the project should share the account's translation memory | [optional]
|
11
|
+
**project_image** | **File** | (Optional) Image to identify the project | [optional]
|
12
|
+
**remove_project_image** | **Boolean** | (Optional) Indicates whether the project image should be deleted. | [optional]
|
13
|
+
**workflow** | **String** | (Optional) Review Workflow. \"simple\" / \"review\". <a href=\"https://help.phrase.com/help/advanced-review-workflow\">Read more</a> | [optional]
|
14
|
+
**machine_translation_enabled** | **Boolean** | (Optional) Enable machine translation support in the project. Required for Autopilot and Smart Suggest | [optional]
|
15
|
+
**enable_branching** | **Boolean** | (Optional) Enable branching in the project | [optional]
|
16
|
+
**protect_master_branch** | **Boolean** | (Optional) Protect the master branch in project where branching is enabled | [optional]
|
17
|
+
**enable_all_data_type_translation_keys_for_translators** | **Boolean** | (Optional) Otherwise, translators are not allowed to edit translations other than strings | [optional]
|
18
|
+
**enable_icu_message_format** | **Boolean** | (Optional) We can validate and highlight your ICU messages. <a href=\"https://help.phrase.com/help/icu-message-format\">Read more</a> | [optional]
|
19
|
+
**zero_plural_form_enabled** | **Boolean** | (Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly. | [optional]
|
20
|
+
**autotranslate_enabled** | **Boolean** | (Optional) Autopilot, requires machine_translation_enabled. <a href=\"https://help.phrase.com/help/autopilot\">Read more</a> | [optional]
|
21
|
+
**autotranslate_check_new_translation_keys** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
|
22
|
+
**autotranslate_check_new_uploads** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
|
23
|
+
**autotranslate_check_new_locales** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
|
24
|
+
**autotranslate_mark_as_unverified** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
|
25
|
+
**autotranslate_use_machine_translation** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
|
26
|
+
**autotranslate_use_translation_memory** | **Boolean** | (Optional) Requires autotranslate_enabled to be true | [optional]
|
27
|
+
**smart_suggest_enabled** | **Boolean** | (Optional) Smart Suggest, requires machine_translation_enabled | [optional]
|
28
|
+
**smart_suggest_use_glossary** | **Boolean** | (Optional) Requires smart_suggest_enabled to be true | [optional]
|
29
|
+
**smart_suggest_use_machine_translation** | **Boolean** | (Optional) Requires smart_suggest_enabled to be true | [optional]
|
13
30
|
|
14
31
|
## Code Sample
|
15
32
|
|
16
33
|
```ruby
|
17
34
|
require 'Phrase'
|
18
35
|
|
19
|
-
instance = Phrase::ProjectUpdateParameters.new(
|
36
|
+
instance = Phrase::ProjectUpdateParameters.new(account_id: abcd1234,
|
37
|
+
name: My Android Project,
|
20
38
|
main_format: yml,
|
21
39
|
shares_translation_memory: true,
|
22
40
|
project_image: null,
|
23
|
-
remove_project_image:
|
24
|
-
|
41
|
+
remove_project_image: false,
|
42
|
+
workflow: review,
|
43
|
+
machine_translation_enabled: true,
|
44
|
+
enable_branching: true,
|
45
|
+
protect_master_branch: true,
|
46
|
+
enable_all_data_type_translation_keys_for_translators: true,
|
47
|
+
enable_icu_message_format: true,
|
48
|
+
zero_plural_form_enabled: true,
|
49
|
+
autotranslate_enabled: true,
|
50
|
+
autotranslate_check_new_translation_keys: true,
|
51
|
+
autotranslate_check_new_uploads: true,
|
52
|
+
autotranslate_check_new_locales: true,
|
53
|
+
autotranslate_mark_as_unverified: true,
|
54
|
+
autotranslate_use_machine_translation: true,
|
55
|
+
autotranslate_use_translation_memory: true,
|
56
|
+
smart_suggest_enabled: true,
|
57
|
+
smart_suggest_use_glossary: true,
|
58
|
+
smart_suggest_use_machine_translation: true)
|
25
59
|
```
|
26
60
|
|
27
61
|
|
data/docs/Variable.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Phrase::Variable
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**value** | **String** | | [optional]
|
9
|
+
**created_at** | **DateTime** | | [optional]
|
10
|
+
**updated_at** | **DateTime** | | [optional]
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'Phrase'
|
16
|
+
|
17
|
+
instance = Phrase::Variable.new(name: null,
|
18
|
+
value: null,
|
19
|
+
created_at: null,
|
20
|
+
updated_at: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Phrase::VariableCreateParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of the variable | [optional]
|
8
|
+
**value** | **String** | Value of the variable | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'Phrase'
|
14
|
+
|
15
|
+
instance = Phrase::VariableCreateParameters.new(name: MY_VARIABLE,
|
16
|
+
value: Hello World)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Phrase::VariableUpdateParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Name of the variable | [optional]
|
8
|
+
**value** | **String** | Value of the variable | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'Phrase'
|
14
|
+
|
15
|
+
instance = Phrase::VariableUpdateParameters.new(name: MY_VARIABLE,
|
16
|
+
value: Hello World)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,331 @@
|
|
1
|
+
# Phrase::VariablesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phrase.com/v2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**variable_create**](VariablesApi.md#variable_create) | **POST** /projects/{project_id}/variables | Create a variable
|
8
|
+
[**variable_delete**](VariablesApi.md#variable_delete) | **DELETE** /projects/{project_id}/variables/{name} | Delete a variable
|
9
|
+
[**variable_show**](VariablesApi.md#variable_show) | **GET** /projects/{project_id}/variables/{name} | Get a single variable
|
10
|
+
[**variable_update**](VariablesApi.md#variable_update) | **PATCH** /projects/{project_id}/variables/{name} | Update a variable
|
11
|
+
[**variables_list**](VariablesApi.md#variables_list) | **GET** /projects/{project_id}/variables | List variables
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
## variable_create
|
16
|
+
|
17
|
+
> Variable variable_create(project_id, variable_create_parameters, opts)
|
18
|
+
|
19
|
+
Create a variable
|
20
|
+
|
21
|
+
Create a new variable.
|
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::VariablesApi.new
|
40
|
+
project_id = 'project_id_example' # String | Project ID
|
41
|
+
variable_create_parameters = Phrase::VariableCreateParameters.new # VariableCreateParameters |
|
42
|
+
opts = {
|
43
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
44
|
+
}
|
45
|
+
|
46
|
+
begin
|
47
|
+
#Create a variable
|
48
|
+
result = api_instance.variable_create(project_id, variable_create_parameters, opts)
|
49
|
+
pp result
|
50
|
+
rescue Phrase::ApiError => e
|
51
|
+
puts "Exception when calling VariablesApi->variable_create: #{e}"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### Parameters
|
56
|
+
|
57
|
+
|
58
|
+
Name | Type | Description | Notes
|
59
|
+
------------- | ------------- | ------------- | -------------
|
60
|
+
**project_id** | **String**| Project ID |
|
61
|
+
**variable_create_parameters** | [**VariableCreateParameters**](VariableCreateParameters.md)| |
|
62
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
63
|
+
|
64
|
+
### Return type
|
65
|
+
|
66
|
+
Response<([**Variable**](Variable.md))>
|
67
|
+
|
68
|
+
### Authorization
|
69
|
+
|
70
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
71
|
+
|
72
|
+
### HTTP request headers
|
73
|
+
|
74
|
+
- **Content-Type**: application/json
|
75
|
+
- **Accept**: application/json
|
76
|
+
|
77
|
+
|
78
|
+
## variable_delete
|
79
|
+
|
80
|
+
> variable_delete(project_id, name, opts)
|
81
|
+
|
82
|
+
Delete a variable
|
83
|
+
|
84
|
+
Delete an existing variable.
|
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::VariablesApi.new
|
103
|
+
project_id = 'project_id_example' # String | Project ID
|
104
|
+
name = 'name_example' # String | name
|
105
|
+
opts = {
|
106
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
107
|
+
}
|
108
|
+
|
109
|
+
begin
|
110
|
+
#Delete a variable
|
111
|
+
api_instance.variable_delete(project_id, name, opts)
|
112
|
+
rescue Phrase::ApiError => e
|
113
|
+
puts "Exception when calling VariablesApi->variable_delete: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
### Parameters
|
118
|
+
|
119
|
+
|
120
|
+
Name | Type | Description | Notes
|
121
|
+
------------- | ------------- | ------------- | -------------
|
122
|
+
**project_id** | **String**| Project ID |
|
123
|
+
**name** | **String**| name |
|
124
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
125
|
+
|
126
|
+
### Return type
|
127
|
+
|
128
|
+
Response<(nil (empty response body))>
|
129
|
+
|
130
|
+
### Authorization
|
131
|
+
|
132
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
133
|
+
|
134
|
+
### HTTP request headers
|
135
|
+
|
136
|
+
- **Content-Type**: Not defined
|
137
|
+
- **Accept**: Not defined
|
138
|
+
|
139
|
+
|
140
|
+
## variable_show
|
141
|
+
|
142
|
+
> Variable variable_show(project_id, name, opts)
|
143
|
+
|
144
|
+
Get a single variable
|
145
|
+
|
146
|
+
Get details on a single variable for a given project.
|
147
|
+
|
148
|
+
### Example
|
149
|
+
|
150
|
+
```ruby
|
151
|
+
# load the gem
|
152
|
+
require 'phrase'
|
153
|
+
# setup authorization
|
154
|
+
Phrase.configure do |config|
|
155
|
+
# Configure HTTP basic authorization: Basic
|
156
|
+
config.username = 'YOUR USERNAME'
|
157
|
+
config.password = 'YOUR PASSWORD'
|
158
|
+
|
159
|
+
# Configure API key authorization: Token
|
160
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
161
|
+
config.api_key_prefix['Authorization'] = 'token'
|
162
|
+
end
|
163
|
+
|
164
|
+
api_instance = Phrase::VariablesApi.new
|
165
|
+
project_id = 'project_id_example' # String | Project ID
|
166
|
+
name = 'name_example' # String | name
|
167
|
+
opts = {
|
168
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
169
|
+
}
|
170
|
+
|
171
|
+
begin
|
172
|
+
#Get a single variable
|
173
|
+
result = api_instance.variable_show(project_id, name, opts)
|
174
|
+
pp result
|
175
|
+
rescue Phrase::ApiError => e
|
176
|
+
puts "Exception when calling VariablesApi->variable_show: #{e}"
|
177
|
+
end
|
178
|
+
```
|
179
|
+
|
180
|
+
### Parameters
|
181
|
+
|
182
|
+
|
183
|
+
Name | Type | Description | Notes
|
184
|
+
------------- | ------------- | ------------- | -------------
|
185
|
+
**project_id** | **String**| Project ID |
|
186
|
+
**name** | **String**| name |
|
187
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
188
|
+
|
189
|
+
### Return type
|
190
|
+
|
191
|
+
Response<([**Variable**](Variable.md))>
|
192
|
+
|
193
|
+
### Authorization
|
194
|
+
|
195
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
196
|
+
|
197
|
+
### HTTP request headers
|
198
|
+
|
199
|
+
- **Content-Type**: Not defined
|
200
|
+
- **Accept**: application/json
|
201
|
+
|
202
|
+
|
203
|
+
## variable_update
|
204
|
+
|
205
|
+
> Variable variable_update(project_id, name, variable_update_parameters, opts)
|
206
|
+
|
207
|
+
Update a variable
|
208
|
+
|
209
|
+
Update an existing variable.
|
210
|
+
|
211
|
+
### Example
|
212
|
+
|
213
|
+
```ruby
|
214
|
+
# load the gem
|
215
|
+
require 'phrase'
|
216
|
+
# setup authorization
|
217
|
+
Phrase.configure do |config|
|
218
|
+
# Configure HTTP basic authorization: Basic
|
219
|
+
config.username = 'YOUR USERNAME'
|
220
|
+
config.password = 'YOUR PASSWORD'
|
221
|
+
|
222
|
+
# Configure API key authorization: Token
|
223
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
224
|
+
config.api_key_prefix['Authorization'] = 'token'
|
225
|
+
end
|
226
|
+
|
227
|
+
api_instance = Phrase::VariablesApi.new
|
228
|
+
project_id = 'project_id_example' # String | Project ID
|
229
|
+
name = 'name_example' # String | name
|
230
|
+
variable_update_parameters = Phrase::VariableUpdateParameters.new # VariableUpdateParameters |
|
231
|
+
opts = {
|
232
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
|
233
|
+
}
|
234
|
+
|
235
|
+
begin
|
236
|
+
#Update a variable
|
237
|
+
result = api_instance.variable_update(project_id, name, variable_update_parameters, opts)
|
238
|
+
pp result
|
239
|
+
rescue Phrase::ApiError => e
|
240
|
+
puts "Exception when calling VariablesApi->variable_update: #{e}"
|
241
|
+
end
|
242
|
+
```
|
243
|
+
|
244
|
+
### Parameters
|
245
|
+
|
246
|
+
|
247
|
+
Name | Type | Description | Notes
|
248
|
+
------------- | ------------- | ------------- | -------------
|
249
|
+
**project_id** | **String**| Project ID |
|
250
|
+
**name** | **String**| name |
|
251
|
+
**variable_update_parameters** | [**VariableUpdateParameters**](VariableUpdateParameters.md)| |
|
252
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
253
|
+
|
254
|
+
### Return type
|
255
|
+
|
256
|
+
Response<([**Variable**](Variable.md))>
|
257
|
+
|
258
|
+
### Authorization
|
259
|
+
|
260
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
261
|
+
|
262
|
+
### HTTP request headers
|
263
|
+
|
264
|
+
- **Content-Type**: application/json
|
265
|
+
- **Accept**: application/json
|
266
|
+
|
267
|
+
|
268
|
+
## variables_list
|
269
|
+
|
270
|
+
> Array<Variable> variables_list(project_id, opts)
|
271
|
+
|
272
|
+
List variables
|
273
|
+
|
274
|
+
List all variables for the current project.
|
275
|
+
|
276
|
+
### Example
|
277
|
+
|
278
|
+
```ruby
|
279
|
+
# load the gem
|
280
|
+
require 'phrase'
|
281
|
+
# setup authorization
|
282
|
+
Phrase.configure do |config|
|
283
|
+
# Configure HTTP basic authorization: Basic
|
284
|
+
config.username = 'YOUR USERNAME'
|
285
|
+
config.password = 'YOUR PASSWORD'
|
286
|
+
|
287
|
+
# Configure API key authorization: Token
|
288
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
289
|
+
config.api_key_prefix['Authorization'] = 'token'
|
290
|
+
end
|
291
|
+
|
292
|
+
api_instance = Phrase::VariablesApi.new
|
293
|
+
project_id = 'project_id_example' # String | Project ID
|
294
|
+
opts = {
|
295
|
+
x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
|
296
|
+
page: 1, # Integer | Page number
|
297
|
+
per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
|
298
|
+
}
|
299
|
+
|
300
|
+
begin
|
301
|
+
#List variables
|
302
|
+
result = api_instance.variables_list(project_id, opts)
|
303
|
+
pp result
|
304
|
+
rescue Phrase::ApiError => e
|
305
|
+
puts "Exception when calling VariablesApi->variables_list: #{e}"
|
306
|
+
end
|
307
|
+
```
|
308
|
+
|
309
|
+
### Parameters
|
310
|
+
|
311
|
+
|
312
|
+
Name | Type | Description | Notes
|
313
|
+
------------- | ------------- | ------------- | -------------
|
314
|
+
**project_id** | **String**| Project ID |
|
315
|
+
**x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
|
316
|
+
**page** | **Integer**| Page number | [optional]
|
317
|
+
**per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
|
318
|
+
|
319
|
+
### Return type
|
320
|
+
|
321
|
+
Response<([**Array<Variable>**](Variable.md))>
|
322
|
+
|
323
|
+
### Authorization
|
324
|
+
|
325
|
+
[Basic](../README.md#Basic), [Token](../README.md#Token)
|
326
|
+
|
327
|
+
### HTTP request headers
|
328
|
+
|
329
|
+
- **Content-Type**: Not defined
|
330
|
+
- **Accept**: application/json
|
331
|
+
|