phrase 1.0.8 → 1.0.13

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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -3
  3. data/docs/BranchName.md +17 -0
  4. data/docs/Invitation.md +9 -1
  5. data/docs/InvitationCreateParameters.md +4 -0
  6. data/docs/InvitationUpdateParameters.md +4 -0
  7. data/docs/InvitationUpdateSettingsParameters.md +19 -0
  8. data/docs/InvitationsApi.md +66 -0
  9. data/docs/Job.md +5 -3
  10. data/docs/JobDetails.md +4 -2
  11. data/docs/JobLocale.md +3 -1
  12. data/docs/LocalesApi.md +2 -0
  13. data/docs/Member.md +7 -1
  14. data/docs/MemberProjectDetail.md +35 -0
  15. data/docs/MemberProjectDetailProjectRoles.md +19 -0
  16. data/docs/MemberSpaces.md +25 -0
  17. data/docs/MemberUpdateParameters.md +4 -0
  18. data/docs/MemberUpdateSettingsParameters.md +19 -0
  19. data/docs/MembersApi.md +66 -0
  20. data/docs/ProjectUpdateParameters.md +43 -9
  21. data/docs/Variable.md +23 -0
  22. data/docs/VariableCreateParameters.md +19 -0
  23. data/docs/VariableUpdateParameters.md +19 -0
  24. data/docs/VariablesApi.md +331 -0
  25. data/docs/Webhook.md +2 -0
  26. data/docs/WebhookCreateParameters.md +3 -1
  27. data/docs/WebhookUpdateParameters.md +3 -1
  28. data/lib/phrase.rb +10 -0
  29. data/lib/phrase/api/invitations_api.rb +80 -0
  30. data/lib/phrase/api/locales_api.rb +3 -0
  31. data/lib/phrase/api/members_api.rb +80 -0
  32. data/lib/phrase/api/variables_api.rb +378 -0
  33. data/lib/phrase/models/branch_name.rb +194 -0
  34. data/lib/phrase/models/invitation.rb +48 -4
  35. data/lib/phrase/models/invitation_create_parameters.rb +25 -1
  36. data/lib/phrase/models/invitation_update_parameters.rb +25 -1
  37. data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
  38. data/lib/phrase/models/job.rb +22 -13
  39. data/lib/phrase/models/job_details.rb +19 -10
  40. data/lib/phrase/models/job_locale.rb +13 -4
  41. data/lib/phrase/models/member.rb +35 -4
  42. data/lib/phrase/models/member_project_detail.rb +285 -0
  43. data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
  44. data/lib/phrase/models/member_spaces.rb +230 -0
  45. data/lib/phrase/models/member_update_parameters.rb +25 -1
  46. data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
  47. data/lib/phrase/models/project_update_parameters.rb +183 -13
  48. data/lib/phrase/models/variable.rb +221 -0
  49. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  50. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  51. data/lib/phrase/models/webhook.rb +10 -1
  52. data/lib/phrase/models/webhook_create_parameters.rb +14 -4
  53. data/lib/phrase/models/webhook_update_parameters.rb +14 -4
  54. data/lib/phrase/version.rb +1 -1
  55. data/spec/api/invitations_api_spec.rb +15 -0
  56. data/spec/api/locales_api_spec.rb +1 -0
  57. data/spec/api/members_api_spec.rb +15 -0
  58. data/spec/api/variables_api_spec.rb +95 -0
  59. data/spec/models/branch_name_spec.rb +29 -0
  60. data/spec/models/invitation_create_parameters_spec.rb +12 -0
  61. data/spec/models/invitation_spec.rb +24 -0
  62. data/spec/models/invitation_update_parameters_spec.rb +12 -0
  63. data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
  64. data/spec/models/job_details_spec.rb +9 -3
  65. data/spec/models/job_locale_spec.rb +6 -0
  66. data/spec/models/job_spec.rb +9 -3
  67. data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
  68. data/spec/models/member_project_detail_spec.rb +83 -0
  69. data/spec/models/member_spaces_spec.rb +53 -0
  70. data/spec/models/member_spec.rb +18 -0
  71. data/spec/models/member_update_parameters_spec.rb +12 -0
  72. data/spec/models/member_update_settings_parameters_spec.rb +35 -0
  73. data/spec/models/project_update_parameters_spec.rb +103 -1
  74. data/spec/models/variable_create_parameters_spec.rb +35 -0
  75. data/spec/models/variable_spec.rb +47 -0
  76. data/spec/models/variable_update_parameters_spec.rb +35 -0
  77. data/spec/models/webhook_create_parameters_spec.rb +6 -0
  78. data/spec/models/webhook_spec.rb +6 -0
  79. data/spec/models/webhook_update_parameters_spec.rb +6 -0
  80. metadata +205 -165
@@ -0,0 +1,25 @@
1
+ # Phrase::MemberSpaces
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | | [optional]
8
+ **name** | **String** | | [optional]
9
+ **created_at** | [**AnyType**](.md) | | [optional]
10
+ **updated_at** | [**AnyType**](.md) | | [optional]
11
+ **projects_count** | **Integer** | | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'Phrase'
17
+
18
+ instance = Phrase::MemberSpaces.new(id: null,
19
+ name: null,
20
+ created_at: null,
21
+ updated_at: null,
22
+ projects_count: null)
23
+ ```
24
+
25
+
@@ -7,6 +7,8 @@ Name | Type | Description | Notes
7
7
  **role** | **String** | Member role, can be any of of Manager, Developer, Translator | [optional]
8
8
  **project_ids** | **String** | List of project ids the user has access to. | [optional]
9
9
  **locale_ids** | **String** | List of locale ids the user has access to. | [optional]
10
+ **default_locale_codes** | **Array<String>** | List of default locales for the user. | [optional]
11
+ **space_ids** | **Array<String>** | List of spaces the user is assigned to. | [optional]
10
12
  **permissions** | **Hash<String, String>** | Additional permissions depending on member role. Available permissions are <code>create_upload</code> and <code>review_translations</code> | [optional]
11
13
 
12
14
  ## Code Sample
@@ -17,6 +19,8 @@ require 'Phrase'
17
19
  instance = Phrase::MemberUpdateParameters.new(role: Developer,
18
20
  project_ids: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235,
19
21
  locale_ids: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235,
22
+ default_locale_codes: ["en","fi"],
23
+ space_ids: ["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],
20
24
  permissions: {"create_upload":true,"review_translations":true})
21
25
  ```
22
26
 
@@ -0,0 +1,19 @@
1
+ # Phrase::MemberUpdateSettingsParameters
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **project_role** | **String** | Member role, can be any of of Manager, Developer, Translator | [optional]
8
+ **locale_ids** | **Array<String>** | List of locale ids the user has access to. | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'Phrase'
14
+
15
+ instance = Phrase::MemberUpdateSettingsParameters.new(project_role: Developer,
16
+ locale_ids: ["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"])
17
+ ```
18
+
19
+
@@ -7,6 +7,7 @@ Method | HTTP request | Description
7
7
  [**member_delete**](MembersApi.md#member_delete) | **DELETE** /accounts/{account_id}/members/{id} | Remove a user from the account
8
8
  [**member_show**](MembersApi.md#member_show) | **GET** /accounts/{account_id}/members/{id} | Get single member
9
9
  [**member_update**](MembersApi.md#member_update) | **PATCH** /accounts/{account_id}/members/{id} | Update a member
10
+ [**member_update_settings**](MembersApi.md#member_update_settings) | **PATCH** /projects/{project_id}/members/{id} | Update a member's project settings
10
11
  [**members_list**](MembersApi.md#members_list) | **GET** /accounts/{account_id}/members | List members
11
12
 
12
13
 
@@ -201,6 +202,71 @@ Response<([**Member**](Member.md))>
201
202
  - **Accept**: application/json
202
203
 
203
204
 
205
+ ## member_update_settings
206
+
207
+ > MemberProjectDetail member_update_settings(project_id, id, member_update_settings_parameters, opts)
208
+
209
+ Update a member's project settings
210
+
211
+ Update user settings in the project. Access token scope must include <code>team.manage</code>.
212
+
213
+ ### Example
214
+
215
+ ```ruby
216
+ # load the gem
217
+ require 'phrase'
218
+ # setup authorization
219
+ Phrase.configure do |config|
220
+ # Configure HTTP basic authorization: Basic
221
+ config.username = 'YOUR USERNAME'
222
+ config.password = 'YOUR PASSWORD'
223
+
224
+ # Configure API key authorization: Token
225
+ config.api_key['Authorization'] = 'YOUR API KEY'
226
+ config.api_key_prefix['Authorization'] = 'token'
227
+ end
228
+
229
+ api_instance = Phrase::MembersApi.new
230
+ project_id = 'project_id_example' # String | Project ID
231
+ id = 'id_example' # String | ID
232
+ member_update_settings_parameters = Phrase::MemberUpdateSettingsParameters.new # MemberUpdateSettingsParameters |
233
+ opts = {
234
+ x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
235
+ }
236
+
237
+ begin
238
+ #Update a member's project settings
239
+ result = api_instance.member_update_settings(project_id, id, member_update_settings_parameters, opts)
240
+ pp result
241
+ rescue Phrase::ApiError => e
242
+ puts "Exception when calling MembersApi->member_update_settings: #{e}"
243
+ end
244
+ ```
245
+
246
+ ### Parameters
247
+
248
+
249
+ Name | Type | Description | Notes
250
+ ------------- | ------------- | ------------- | -------------
251
+ **project_id** | **String**| Project ID |
252
+ **id** | **String**| ID |
253
+ **member_update_settings_parameters** | [**MemberUpdateSettingsParameters**](MemberUpdateSettingsParameters.md)| |
254
+ **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
255
+
256
+ ### Return type
257
+
258
+ Response<([**MemberProjectDetail**](MemberProjectDetail.md))>
259
+
260
+ ### Authorization
261
+
262
+ [Basic](../README.md#Basic), [Token](../README.md#Token)
263
+
264
+ ### HTTP request headers
265
+
266
+ - **Content-Type**: application/json
267
+ - **Accept**: application/json
268
+
269
+
204
270
  ## members_list
205
271
 
206
272
  > Array&lt;Member&gt; members_list(account_id, opts)
@@ -4,24 +4,58 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | Name of the project | [optional]
8
- **main_format** | **String** | 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 &lt;a href&#x3D;\&quot;https://help.phrase.com/help/supported-platforms-and-formats\&quot;&gt;Format Guide&lt;/a&gt; or our &lt;a href&#x3D;\&quot;#formats\&quot;&gt;Formats API Endpoint&lt;/a&gt;. | [optional]
9
- **shares_translation_memory** | **Boolean** | Indicates whether the project should share the account&#39;s translation memory | [optional]
10
- **project_image** | **File** | Image to identify the project | [optional]
11
- **remove_project_image** | **Boolean** | Indicates whether the project image should be deleted. | [optional]
12
- **account_id** | **String** | Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. | [optional]
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 &lt;a href&#x3D;\&quot;https://help.phrase.com/help/supported-platforms-and-formats\&quot;&gt;Format Guide&lt;/a&gt; or our &lt;a href&#x3D;\&quot;#formats\&quot;&gt;Formats API Endpoint&lt;/a&gt;. | [optional]
10
+ **shares_translation_memory** | **Boolean** | (Optional) Indicates whether the project should share the account&#39;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. \&quot;simple\&quot; / \&quot;review\&quot;. &lt;a href&#x3D;\&quot;https://help.phrase.com/help/advanced-review-workflow\&quot;&gt;Read more&lt;/a&gt; | [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. &lt;a href&#x3D;\&quot;https://help.phrase.com/help/icu-message-format\&quot;&gt;Read more&lt;/a&gt; | [optional]
19
+ **zero_plural_form_enabled** | **Boolean** | (Optional) Displays the input fields for the &#39;ZERO&#39; plural form for every key as well although only some languages require the &#39;ZERO&#39; explicitly. | [optional]
20
+ **autotranslate_enabled** | **Boolean** | (Optional) Autopilot, requires machine_translation_enabled. &lt;a href&#x3D;\&quot;https://help.phrase.com/help/autopilot\&quot;&gt;Read more&lt;/a&gt; | [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(name: My Android Project,
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: null,
24
- account_id: abcd1234)
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
 
@@ -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&lt;Variable&gt; 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&lt;Variable&gt;**](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
+