phrase 1.0.7 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -9
  3. data/docs/BranchName.md +17 -0
  4. data/docs/CurrentUser.md +31 -0
  5. data/docs/Invitation.md +9 -1
  6. data/docs/InvitationCreateParameters.md +4 -0
  7. data/docs/InvitationUpdateParameters.md +4 -0
  8. data/docs/InvitationUpdateSettingsParameters.md +19 -0
  9. data/docs/InvitationsApi.md +66 -0
  10. data/docs/Job.md +5 -3
  11. data/docs/JobDetails.md +4 -2
  12. data/docs/JobLocale.md +7 -1
  13. data/docs/KeysApi.md +5 -5
  14. data/docs/LocalesApi.md +7 -4
  15. data/docs/Member.md +7 -1
  16. data/docs/MemberProjectDetail.md +35 -0
  17. data/docs/MemberProjectDetailProjectRoles.md +19 -0
  18. data/docs/MemberSpaces.md +25 -0
  19. data/docs/MemberUpdateParameters.md +4 -0
  20. data/docs/MemberUpdateSettingsParameters.md +19 -0
  21. data/docs/MembersApi.md +66 -0
  22. data/docs/ProjectUpdateParameters.md +43 -9
  23. data/docs/ScreenshotCreateParameters.md +3 -1
  24. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  25. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  26. data/docs/ScreenshotMarkersApi.md +9 -3
  27. data/docs/ScreenshotUpdateParameters.md +3 -1
  28. data/docs/ScreenshotsApi.md +8 -2
  29. data/docs/TranslationsApi.md +25 -25
  30. data/docs/UsersApi.md +2 -2
  31. data/docs/Variable.md +23 -0
  32. data/docs/VariableCreateParameters.md +19 -0
  33. data/docs/VariableUpdateParameters.md +19 -0
  34. data/docs/VariablesApi.md +331 -0
  35. data/docs/Webhook.md +2 -0
  36. data/docs/WebhookCreateParameters.md +3 -1
  37. data/docs/WebhookUpdateParameters.md +3 -1
  38. data/lib/phrase.rb +11 -0
  39. data/lib/phrase/api/invitations_api.rb +80 -0
  40. data/lib/phrase/api/keys_api.rb +6 -6
  41. data/lib/phrase/api/locales_api.rb +8 -3
  42. data/lib/phrase/api/members_api.rb +80 -0
  43. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  44. data/lib/phrase/api/screenshots_api.rb +9 -0
  45. data/lib/phrase/api/translations_api.rb +35 -35
  46. data/lib/phrase/api/users_api.rb +3 -3
  47. data/lib/phrase/api/variables_api.rb +378 -0
  48. data/lib/phrase/api_client.rb +2 -0
  49. data/lib/phrase/models/branch_name.rb +194 -0
  50. data/lib/phrase/models/current_user.rb +257 -0
  51. data/lib/phrase/models/invitation.rb +48 -4
  52. data/lib/phrase/models/invitation_create_parameters.rb +25 -1
  53. data/lib/phrase/models/invitation_update_parameters.rb +25 -1
  54. data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
  55. data/lib/phrase/models/job.rb +22 -13
  56. data/lib/phrase/models/job_details.rb +19 -10
  57. data/lib/phrase/models/job_locale.rb +31 -4
  58. data/lib/phrase/models/member.rb +35 -4
  59. data/lib/phrase/models/member_project_detail.rb +285 -0
  60. data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
  61. data/lib/phrase/models/member_spaces.rb +230 -0
  62. data/lib/phrase/models/member_update_parameters.rb +25 -1
  63. data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
  64. data/lib/phrase/models/project_update_parameters.rb +183 -13
  65. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  66. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  67. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  68. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  69. data/lib/phrase/models/variable.rb +221 -0
  70. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  71. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  72. data/lib/phrase/models/webhook.rb +10 -1
  73. data/lib/phrase/models/webhook_create_parameters.rb +14 -4
  74. data/lib/phrase/models/webhook_update_parameters.rb +14 -4
  75. data/lib/phrase/version.rb +1 -1
  76. data/spec/api/invitations_api_spec.rb +15 -0
  77. data/spec/api/keys_api_spec.rb +2 -2
  78. data/spec/api/locales_api_spec.rb +2 -1
  79. data/spec/api/members_api_spec.rb +15 -0
  80. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  81. data/spec/api/screenshots_api_spec.rb +3 -0
  82. data/spec/api/translations_api_spec.rb +10 -10
  83. data/spec/api/users_api_spec.rb +1 -1
  84. data/spec/api/variables_api_spec.rb +95 -0
  85. data/spec/models/branch_name_spec.rb +29 -0
  86. data/spec/models/current_user_spec.rb +71 -0
  87. data/spec/models/invitation_create_parameters_spec.rb +12 -0
  88. data/spec/models/invitation_spec.rb +24 -0
  89. data/spec/models/invitation_update_parameters_spec.rb +12 -0
  90. data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
  91. data/spec/models/job_details_spec.rb +9 -3
  92. data/spec/models/job_locale_spec.rb +18 -0
  93. data/spec/models/job_spec.rb +9 -3
  94. data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
  95. data/spec/models/member_project_detail_spec.rb +83 -0
  96. data/spec/models/member_spaces_spec.rb +53 -0
  97. data/spec/models/member_spec.rb +18 -0
  98. data/spec/models/member_update_parameters_spec.rb +12 -0
  99. data/spec/models/member_update_settings_parameters_spec.rb +35 -0
  100. data/spec/models/project_update_parameters_spec.rb +103 -1
  101. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  102. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  103. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  104. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  105. data/spec/models/variable_create_parameters_spec.rb +35 -0
  106. data/spec/models/variable_spec.rb +47 -0
  107. data/spec/models/variable_update_parameters_spec.rb +35 -0
  108. data/spec/models/webhook_create_parameters_spec.rb +6 -0
  109. data/spec/models/webhook_spec.rb +6 -0
  110. data/spec/models/webhook_update_parameters_spec.rb +6 -0
  111. metadata +206 -162
@@ -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
@@ -14,13 +14,13 @@ Method | HTTP request | Description
14
14
  [**translation_verify**](TranslationsApi.md#translation_verify) | **PATCH** /projects/{project_id}/translations/{id}/verify | Verify a translation
15
15
  [**translations_by_key**](TranslationsApi.md#translations_by_key) | **GET** /projects/{project_id}/keys/{key_id}/translations | List translations by key
16
16
  [**translations_by_locale**](TranslationsApi.md#translations_by_locale) | **GET** /projects/{project_id}/locales/{locale_id}/translations | List translations by locale
17
- [**translations_exclude**](TranslationsApi.md#translations_exclude) | **PATCH** /projects/{project_id}/translations/exclude | Set exclude from export flag on translations selected by query
18
- [**translations_include**](TranslationsApi.md#translations_include) | **PATCH** /projects/{project_id}/translations/include | Remove exlude from import flag from translations selected by query
17
+ [**translations_exclude_collection**](TranslationsApi.md#translations_exclude_collection) | **PATCH** /projects/{project_id}/translations/exclude | Set exclude from export flag on translations selected by query
18
+ [**translations_include_collection**](TranslationsApi.md#translations_include_collection) | **PATCH** /projects/{project_id}/translations/include | Remove exlude from import flag from translations selected by query
19
19
  [**translations_list**](TranslationsApi.md#translations_list) | **GET** /projects/{project_id}/translations | List all translations
20
- [**translations_review**](TranslationsApi.md#translations_review) | **PATCH** /projects/{project_id}/translations/review | Review translations selected by query
20
+ [**translations_review_collection**](TranslationsApi.md#translations_review_collection) | **PATCH** /projects/{project_id}/translations/review | Review translations selected by query
21
21
  [**translations_search**](TranslationsApi.md#translations_search) | **POST** /projects/{project_id}/translations/search | Search translations
22
- [**translations_unverify**](TranslationsApi.md#translations_unverify) | **PATCH** /projects/{project_id}/translations/unverify | Mark translations selected by query as unverified
23
- [**translations_verify**](TranslationsApi.md#translations_verify) | **PATCH** /projects/{project_id}/translations/verify | Verify translations selected by query
22
+ [**translations_unverify_collection**](TranslationsApi.md#translations_unverify_collection) | **PATCH** /projects/{project_id}/translations/unverify | Mark translations selected by query as unverified
23
+ [**translations_verify_collection**](TranslationsApi.md#translations_verify_collection) | **PATCH** /projects/{project_id}/translations/verify | Verify translations selected by query
24
24
 
25
25
 
26
26
 
@@ -692,9 +692,9 @@ Response<([**Array&lt;Translation&gt;**](Translation.md))>
692
692
  - **Accept**: application/json
693
693
 
694
694
 
695
- ## translations_exclude
695
+ ## translations_exclude_collection
696
696
 
697
- > AffectedCount translations_exclude(project_id, translations_exclude_parameters, opts)
697
+ > AffectedCount translations_exclude_collection(project_id, translations_exclude_parameters, opts)
698
698
 
699
699
  Set exclude from export flag on translations selected by query
700
700
 
@@ -725,10 +725,10 @@ opts = {
725
725
 
726
726
  begin
727
727
  #Set exclude from export flag on translations selected by query
728
- result = api_instance.translations_exclude(project_id, translations_exclude_parameters, opts)
728
+ result = api_instance.translations_exclude_collection(project_id, translations_exclude_parameters, opts)
729
729
  pp result
730
730
  rescue Phrase::ApiError => e
731
- puts "Exception when calling TranslationsApi->translations_exclude: #{e}"
731
+ puts "Exception when calling TranslationsApi->translations_exclude_collection: #{e}"
732
732
  end
733
733
  ```
734
734
 
@@ -755,9 +755,9 @@ Response<([**AffectedCount**](AffectedCount.md))>
755
755
  - **Accept**: application/json
756
756
 
757
757
 
758
- ## translations_include
758
+ ## translations_include_collection
759
759
 
760
- > AffectedCount translations_include(project_id, translations_include_parameters, opts)
760
+ > AffectedCount translations_include_collection(project_id, translations_include_parameters, opts)
761
761
 
762
762
  Remove exlude from import flag from translations selected by query
763
763
 
@@ -788,10 +788,10 @@ opts = {
788
788
 
789
789
  begin
790
790
  #Remove exlude from import flag from translations selected by query
791
- result = api_instance.translations_include(project_id, translations_include_parameters, opts)
791
+ result = api_instance.translations_include_collection(project_id, translations_include_parameters, opts)
792
792
  pp result
793
793
  rescue Phrase::ApiError => e
794
- puts "Exception when calling TranslationsApi->translations_include: #{e}"
794
+ puts "Exception when calling TranslationsApi->translations_include_collection: #{e}"
795
795
  end
796
796
  ```
797
797
 
@@ -891,9 +891,9 @@ Response<([**Array&lt;Translation&gt;**](Translation.md))>
891
891
  - **Accept**: application/json
892
892
 
893
893
 
894
- ## translations_review
894
+ ## translations_review_collection
895
895
 
896
- > AffectedCount translations_review(project_id, translations_review_parameters, opts)
896
+ > AffectedCount translations_review_collection(project_id, translations_review_parameters, opts)
897
897
 
898
898
  Review translations selected by query
899
899
 
@@ -924,10 +924,10 @@ opts = {
924
924
 
925
925
  begin
926
926
  #Review translations selected by query
927
- result = api_instance.translations_review(project_id, translations_review_parameters, opts)
927
+ result = api_instance.translations_review_collection(project_id, translations_review_parameters, opts)
928
928
  pp result
929
929
  rescue Phrase::ApiError => e
930
- puts "Exception when calling TranslationsApi->translations_review: #{e}"
930
+ puts "Exception when calling TranslationsApi->translations_review_collection: #{e}"
931
931
  end
932
932
  ```
933
933
 
@@ -1021,9 +1021,9 @@ Response<([**Array&lt;Translation&gt;**](Translation.md))>
1021
1021
  - **Accept**: application/json
1022
1022
 
1023
1023
 
1024
- ## translations_unverify
1024
+ ## translations_unverify_collection
1025
1025
 
1026
- > AffectedCount translations_unverify(project_id, translations_unverify_parameters, opts)
1026
+ > AffectedCount translations_unverify_collection(project_id, translations_unverify_parameters, opts)
1027
1027
 
1028
1028
  Mark translations selected by query as unverified
1029
1029
 
@@ -1054,10 +1054,10 @@ opts = {
1054
1054
 
1055
1055
  begin
1056
1056
  #Mark translations selected by query as unverified
1057
- result = api_instance.translations_unverify(project_id, translations_unverify_parameters, opts)
1057
+ result = api_instance.translations_unverify_collection(project_id, translations_unverify_parameters, opts)
1058
1058
  pp result
1059
1059
  rescue Phrase::ApiError => e
1060
- puts "Exception when calling TranslationsApi->translations_unverify: #{e}"
1060
+ puts "Exception when calling TranslationsApi->translations_unverify_collection: #{e}"
1061
1061
  end
1062
1062
  ```
1063
1063
 
@@ -1084,9 +1084,9 @@ Response<([**AffectedCount**](AffectedCount.md))>
1084
1084
  - **Accept**: application/json
1085
1085
 
1086
1086
 
1087
- ## translations_verify
1087
+ ## translations_verify_collection
1088
1088
 
1089
- > AffectedCount translations_verify(project_id, translations_verify_parameters, opts)
1089
+ > AffectedCount translations_verify_collection(project_id, translations_verify_parameters, opts)
1090
1090
 
1091
1091
  Verify translations selected by query
1092
1092
 
@@ -1117,10 +1117,10 @@ opts = {
1117
1117
 
1118
1118
  begin
1119
1119
  #Verify translations selected by query
1120
- result = api_instance.translations_verify(project_id, translations_verify_parameters, opts)
1120
+ result = api_instance.translations_verify_collection(project_id, translations_verify_parameters, opts)
1121
1121
  pp result
1122
1122
  rescue Phrase::ApiError => e
1123
- puts "Exception when calling TranslationsApi->translations_verify: #{e}"
1123
+ puts "Exception when calling TranslationsApi->translations_verify_collection: #{e}"
1124
1124
  end
1125
1125
  ```
1126
1126
 
data/docs/UsersApi.md CHANGED
@@ -10,7 +10,7 @@ Method | HTTP request | Description
10
10
 
11
11
  ## show_user
12
12
 
13
- > User show_user(opts)
13
+ > CurrentUser show_user(opts)
14
14
 
15
15
  Show current User
16
16
 
@@ -55,7 +55,7 @@ Name | Type | Description | Notes
55
55
 
56
56
  ### Return type
57
57
 
58
- Response<([**User**](User.md))>
58
+ Response<([**CurrentUser**](CurrentUser.md))>
59
59
 
60
60
  ### Authorization
61
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&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
+