phrase 1.0.9 → 1.0.14

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -3
  3. data/docs/Invitation.md +9 -1
  4. data/docs/InvitationCreateParameters.md +4 -0
  5. data/docs/InvitationUpdateParameters.md +4 -0
  6. data/docs/InvitationUpdateSettingsParameters.md +19 -0
  7. data/docs/InvitationsApi.md +66 -0
  8. data/docs/JobLocale.md +3 -1
  9. data/docs/Member.md +7 -1
  10. data/docs/MemberProjectDetail.md +35 -0
  11. data/docs/MemberProjectDetailProjectRoles.md +19 -0
  12. data/docs/MemberSpaces.md +25 -0
  13. data/docs/MemberUpdateParameters.md +4 -0
  14. data/docs/MemberUpdateSettingsParameters.md +19 -0
  15. data/docs/MembersApi.md +66 -0
  16. data/docs/ProjectUpdateParameters.md +43 -9
  17. data/docs/ScreenshotCreateParameters.md +3 -1
  18. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  19. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  20. data/docs/ScreenshotMarkersApi.md +9 -3
  21. data/docs/ScreenshotUpdateParameters.md +3 -1
  22. data/docs/ScreenshotsApi.md +8 -2
  23. data/docs/Variable.md +23 -0
  24. data/docs/VariableCreateParameters.md +19 -0
  25. data/docs/VariableUpdateParameters.md +19 -0
  26. data/docs/VariablesApi.md +331 -0
  27. data/lib/phrase.rb +9 -0
  28. data/lib/phrase/api/invitations_api.rb +80 -0
  29. data/lib/phrase/api/members_api.rb +80 -0
  30. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  31. data/lib/phrase/api/screenshots_api.rb +9 -0
  32. data/lib/phrase/api/variables_api.rb +378 -0
  33. data/lib/phrase/models/invitation.rb +48 -4
  34. data/lib/phrase/models/invitation_create_parameters.rb +25 -1
  35. data/lib/phrase/models/invitation_update_parameters.rb +25 -1
  36. data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
  37. data/lib/phrase/models/job_locale.rb +13 -4
  38. data/lib/phrase/models/member.rb +35 -4
  39. data/lib/phrase/models/member_project_detail.rb +285 -0
  40. data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
  41. data/lib/phrase/models/member_spaces.rb +230 -0
  42. data/lib/phrase/models/member_update_parameters.rb +25 -1
  43. data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
  44. data/lib/phrase/models/project_update_parameters.rb +183 -13
  45. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  46. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  47. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  48. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  49. data/lib/phrase/models/variable.rb +221 -0
  50. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  51. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  52. data/lib/phrase/version.rb +1 -1
  53. data/spec/api/invitations_api_spec.rb +15 -0
  54. data/spec/api/members_api_spec.rb +15 -0
  55. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  56. data/spec/api/screenshots_api_spec.rb +3 -0
  57. data/spec/api/variables_api_spec.rb +95 -0
  58. data/spec/models/invitation_create_parameters_spec.rb +12 -0
  59. data/spec/models/invitation_spec.rb +24 -0
  60. data/spec/models/invitation_update_parameters_spec.rb +12 -0
  61. data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
  62. data/spec/models/job_locale_spec.rb +6 -0
  63. data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
  64. data/spec/models/member_project_detail_spec.rb +83 -0
  65. data/spec/models/member_spaces_spec.rb +53 -0
  66. data/spec/models/member_spec.rb +18 -0
  67. data/spec/models/member_update_parameters_spec.rb +12 -0
  68. data/spec/models/member_update_settings_parameters_spec.rb +35 -0
  69. data/spec/models/project_update_parameters_spec.rb +103 -1
  70. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  71. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  72. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  73. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  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. metadata +196 -160
@@ -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 <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">Format Guide</a> or our <a href=\"#formats\">Formats API Endpoint</a>. | [optional]
9
- **shares_translation_memory** | **Boolean** | Indicates whether the project should share the account'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 <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(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
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
+ **branch** | **String** | specify the branch to use | [optional]
7
8
  **name** | **String** | Name of the screenshot | [optional]
8
9
  **description** | **String** | Description of the screenshot | [optional]
9
10
  **filename** | **File** | Screenshot file | [optional]
@@ -13,7 +14,8 @@ Name | Type | Description | Notes
13
14
  ```ruby
14
15
  require 'Phrase'
15
16
 
16
- instance = Phrase::ScreenshotCreateParameters.new(name: A screenshot name,
17
+ instance = Phrase::ScreenshotCreateParameters.new(branch: my-feature-branch,
18
+ name: A screenshot name,
17
19
  description: A screenshot description,
18
20
  filename: null)
19
21
  ```
@@ -4,6 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
+ **branch** | **String** | specify the branch to use | [optional]
7
8
  **key_id** | **String** | Specify the Key ID which should be highlighted on the specified screenshot. The Key must belong to the project. | [optional]
8
9
  **presentation** | **String** | Presentation details of the screenshot marker in JSON format.<br/><br/>Each Screenshot Marker is represented as a rectangular shaped highlight box with the name of the specified Key attached. You can specify the marker position on the screenshot (<code>x</code>-axis and <code>y</code>-axis in pixels) from the top left corner of the screenshot and the dimensions of the marker itself (<code>w</code> and <code>h</code> in pixels). | [optional]
9
10
 
@@ -12,7 +13,8 @@ Name | Type | Description | Notes
12
13
  ```ruby
13
14
  require 'Phrase'
14
15
 
15
- instance = Phrase::ScreenshotMarkerCreateParameters.new(key_id: abcd1234abcd1234abcd1234abcd1234,
16
+ instance = Phrase::ScreenshotMarkerCreateParameters.new(branch: my-feature-branch,
17
+ key_id: abcd1234abcd1234abcd1234abcd1234,
16
18
  presentation: { "x": 100, "y": 100, "w": 100, "h": 100 })
17
19
  ```
18
20
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
+ **branch** | **String** | specify the branch to use | [optional]
7
8
  **key_id** | **String** | Specify the Key ID which should be highlighted on the specified screenshot. The Key must belong to the project. | [optional]
8
9
  **presentation** | **String** | Presentation details of the screenshot marker in JSON format.<br/><br/>Each Screenshot Marker is represented as a rectangular shaped highlight box with the name of the specified Key attached. You can specify the marker position on the screenshot (<code>x</code>-axis and <code>y</code>-axis in pixels) from the top left corner of the screenshot and the dimensions of the marker itself (<code>w</code> and <code>h</code> in pixels). | [optional]
9
10
 
@@ -12,7 +13,8 @@ Name | Type | Description | Notes
12
13
  ```ruby
13
14
  require 'Phrase'
14
15
 
15
- instance = Phrase::ScreenshotMarkerUpdateParameters.new(key_id: abcd1234abcd1234abcd1234abcd1234,
16
+ instance = Phrase::ScreenshotMarkerUpdateParameters.new(branch: my-feature-branch,
17
+ key_id: abcd1234abcd1234abcd1234abcd1234,
16
18
  presentation: { "x": 100, "y": 100, "w": 100, "h": 100 })
17
19
  ```
18
20
 
@@ -105,7 +105,8 @@ api_instance = Phrase::ScreenshotMarkersApi.new
105
105
  project_id = 'project_id_example' # String | Project ID
106
106
  screenshot_id = 'screenshot_id_example' # String | Screenshot ID
107
107
  opts = {
108
- x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
108
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
109
+ branch: 'my-feature-branch' # String | specify the branch to use
109
110
  }
110
111
 
111
112
  begin
@@ -124,6 +125,7 @@ Name | Type | Description | Notes
124
125
  **project_id** | **String**| Project ID |
125
126
  **screenshot_id** | **String**| Screenshot ID |
126
127
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
128
+ **branch** | **String**| specify the branch to use | [optional]
127
129
 
128
130
  ### Return type
129
131
 
@@ -168,7 +170,8 @@ project_id = 'project_id_example' # String | Project ID
168
170
  screenshot_id = 'screenshot_id_example' # String | Screenshot ID
169
171
  id = 'id_example' # String | ID
170
172
  opts = {
171
- x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
173
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
174
+ branch: 'my-feature-branch' # String | specify the branch to use
172
175
  }
173
176
 
174
177
  begin
@@ -189,6 +192,7 @@ Name | Type | Description | Notes
189
192
  **screenshot_id** | **String**| Screenshot ID |
190
193
  **id** | **String**| ID |
191
194
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
195
+ **branch** | **String**| specify the branch to use | [optional]
192
196
 
193
197
  ### Return type
194
198
 
@@ -299,7 +303,8 @@ id = 'id_example' # String | ID
299
303
  opts = {
300
304
  x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
301
305
  page: 1, # Integer | Page number
302
- per_page: 25 # Integer | allows you to specify a page size up to 100 items, 25 by default
306
+ per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default
307
+ branch: 'my-feature-branch' # String | specify the branch to use
303
308
  }
304
309
 
305
310
  begin
@@ -321,6 +326,7 @@ Name | Type | Description | Notes
321
326
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
322
327
  **page** | **Integer**| Page number | [optional]
323
328
  **per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
329
+ **branch** | **String**| specify the branch to use | [optional]
324
330
 
325
331
  ### Return type
326
332
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
+ **branch** | **String** | specify the branch to use | [optional]
7
8
  **name** | **String** | Name of the screenshot | [optional]
8
9
  **description** | **String** | Description of the screenshot | [optional]
9
10
  **filename** | **File** | Screenshot file | [optional]
@@ -13,7 +14,8 @@ Name | Type | Description | Notes
13
14
  ```ruby
14
15
  require 'Phrase'
15
16
 
16
- instance = Phrase::ScreenshotUpdateParameters.new(name: A screenshot name,
17
+ instance = Phrase::ScreenshotUpdateParameters.new(branch: my-feature-branch,
18
+ name: A screenshot name,
17
19
  description: A screenshot description,
18
20
  filename: null)
19
21
  ```
@@ -103,7 +103,8 @@ api_instance = Phrase::ScreenshotsApi.new
103
103
  project_id = 'project_id_example' # String | Project ID
104
104
  id = 'id_example' # String | ID
105
105
  opts = {
106
- x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
106
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
107
+ branch: 'my-feature-branch' # String | specify the branch to use
107
108
  }
108
109
 
109
110
  begin
@@ -122,6 +123,7 @@ Name | Type | Description | Notes
122
123
  **project_id** | **String**| Project ID |
123
124
  **id** | **String**| ID |
124
125
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
126
+ **branch** | **String**| specify the branch to use | [optional]
125
127
 
126
128
  ### Return type
127
129
 
@@ -165,7 +167,8 @@ api_instance = Phrase::ScreenshotsApi.new
165
167
  project_id = 'project_id_example' # String | Project ID
166
168
  id = 'id_example' # String | ID
167
169
  opts = {
168
- x_phrase_app_otp: 'x_phrase_app_otp_example' # String | Two-Factor-Authentication token (optional)
170
+ x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
171
+ branch: 'my-feature-branch' # String | specify the branch to use
169
172
  }
170
173
 
171
174
  begin
@@ -185,6 +188,7 @@ Name | Type | Description | Notes
185
188
  **project_id** | **String**| Project ID |
186
189
  **id** | **String**| ID |
187
190
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
191
+ **branch** | **String**| specify the branch to use | [optional]
188
192
 
189
193
  ### Return type
190
194
 
@@ -295,6 +299,7 @@ opts = {
295
299
  x_phrase_app_otp: 'x_phrase_app_otp_example', # String | Two-Factor-Authentication token (optional)
296
300
  page: 1, # Integer | Page number
297
301
  per_page: 25, # Integer | allows you to specify a page size up to 100 items, 25 by default
302
+ branch: 'my-feature-branch', # String | specify the branch to use
298
303
  key_id: 'abcd1234cdef1234abcd1234cdef1234' # String | filter by key
299
304
  }
300
305
 
@@ -316,6 +321,7 @@ Name | Type | Description | Notes
316
321
  **x_phrase_app_otp** | **String**| Two-Factor-Authentication token (optional) | [optional]
317
322
  **page** | **Integer**| Page number | [optional]
318
323
  **per_page** | **Integer**| allows you to specify a page size up to 100 items, 25 by default | [optional]
324
+ **branch** | **String**| specify the branch to use | [optional]
319
325
  **key_id** | **String**| filter by key | [optional]
320
326
 
321
327
  ### Return type
@@ -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
+