phrase 1.0.10 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -9
  3. data/docs/CurrentUser.md +31 -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/JobLocale.md +5 -1
  10. data/docs/KeysApi.md +5 -5
  11. data/docs/LocalesApi.md +5 -4
  12. data/docs/Member.md +7 -1
  13. data/docs/MemberProjectDetail.md +35 -0
  14. data/docs/MemberProjectDetailProjectRoles.md +19 -0
  15. data/docs/MemberSpaces.md +25 -0
  16. data/docs/MemberUpdateParameters.md +4 -0
  17. data/docs/MemberUpdateSettingsParameters.md +19 -0
  18. data/docs/MembersApi.md +66 -0
  19. data/docs/ProjectUpdateParameters.md +43 -9
  20. data/docs/ScreenshotCreateParameters.md +3 -1
  21. data/docs/ScreenshotMarkerCreateParameters.md +3 -1
  22. data/docs/ScreenshotMarkerUpdateParameters.md +3 -1
  23. data/docs/ScreenshotMarkersApi.md +9 -3
  24. data/docs/ScreenshotUpdateParameters.md +3 -1
  25. data/docs/ScreenshotsApi.md +8 -2
  26. data/docs/TranslationsApi.md +25 -25
  27. data/docs/UsersApi.md +2 -2
  28. data/docs/Variable.md +23 -0
  29. data/docs/VariableCreateParameters.md +19 -0
  30. data/docs/VariableUpdateParameters.md +19 -0
  31. data/docs/VariablesApi.md +331 -0
  32. data/lib/phrase.rb +10 -0
  33. data/lib/phrase/api/invitations_api.rb +80 -0
  34. data/lib/phrase/api/keys_api.rb +6 -6
  35. data/lib/phrase/api/locales_api.rb +5 -3
  36. data/lib/phrase/api/members_api.rb +80 -0
  37. data/lib/phrase/api/screenshot_markers_api.rb +9 -0
  38. data/lib/phrase/api/screenshots_api.rb +9 -0
  39. data/lib/phrase/api/translations_api.rb +35 -35
  40. data/lib/phrase/api/users_api.rb +3 -3
  41. data/lib/phrase/api/variables_api.rb +378 -0
  42. data/lib/phrase/models/current_user.rb +257 -0
  43. data/lib/phrase/models/invitation.rb +48 -4
  44. data/lib/phrase/models/invitation_create_parameters.rb +25 -1
  45. data/lib/phrase/models/invitation_update_parameters.rb +25 -1
  46. data/lib/phrase/models/invitation_update_settings_parameters.rb +207 -0
  47. data/lib/phrase/models/job_locale.rb +22 -4
  48. data/lib/phrase/models/member.rb +35 -4
  49. data/lib/phrase/models/member_project_detail.rb +285 -0
  50. data/lib/phrase/models/member_project_detail_project_roles.rb +203 -0
  51. data/lib/phrase/models/member_spaces.rb +230 -0
  52. data/lib/phrase/models/member_update_parameters.rb +25 -1
  53. data/lib/phrase/models/member_update_settings_parameters.rb +207 -0
  54. data/lib/phrase/models/project_update_parameters.rb +183 -13
  55. data/lib/phrase/models/screenshot_create_parameters.rb +11 -1
  56. data/lib/phrase/models/screenshot_marker_create_parameters.rb +11 -1
  57. data/lib/phrase/models/screenshot_marker_update_parameters.rb +11 -1
  58. data/lib/phrase/models/screenshot_update_parameters.rb +11 -1
  59. data/lib/phrase/models/variable.rb +221 -0
  60. data/lib/phrase/models/variable_create_parameters.rb +205 -0
  61. data/lib/phrase/models/variable_update_parameters.rb +205 -0
  62. data/lib/phrase/version.rb +1 -1
  63. data/spec/api/invitations_api_spec.rb +15 -0
  64. data/spec/api/keys_api_spec.rb +2 -2
  65. data/spec/api/locales_api_spec.rb +1 -1
  66. data/spec/api/members_api_spec.rb +15 -0
  67. data/spec/api/screenshot_markers_api_spec.rb +3 -0
  68. data/spec/api/screenshots_api_spec.rb +3 -0
  69. data/spec/api/translations_api_spec.rb +10 -10
  70. data/spec/api/users_api_spec.rb +1 -1
  71. data/spec/api/variables_api_spec.rb +95 -0
  72. data/spec/models/current_user_spec.rb +71 -0
  73. data/spec/models/invitation_create_parameters_spec.rb +12 -0
  74. data/spec/models/invitation_spec.rb +24 -0
  75. data/spec/models/invitation_update_parameters_spec.rb +12 -0
  76. data/spec/models/invitation_update_settings_parameters_spec.rb +35 -0
  77. data/spec/models/job_locale_spec.rb +12 -0
  78. data/spec/models/member_project_detail_project_roles_spec.rb +35 -0
  79. data/spec/models/member_project_detail_spec.rb +83 -0
  80. data/spec/models/member_spaces_spec.rb +53 -0
  81. data/spec/models/member_spec.rb +18 -0
  82. data/spec/models/member_update_parameters_spec.rb +12 -0
  83. data/spec/models/member_update_settings_parameters_spec.rb +35 -0
  84. data/spec/models/project_update_parameters_spec.rb +103 -1
  85. data/spec/models/screenshot_create_parameters_spec.rb +6 -0
  86. data/spec/models/screenshot_marker_create_parameters_spec.rb +6 -0
  87. data/spec/models/screenshot_marker_update_parameters_spec.rb +6 -0
  88. data/spec/models/screenshot_update_parameters_spec.rb +6 -0
  89. data/spec/models/variable_create_parameters_spec.rb +35 -0
  90. data/spec/models/variable_spec.rb +47 -0
  91. data/spec/models/variable_update_parameters_spec.rb +35 -0
  92. metadata +203 -163
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
+
data/lib/phrase.rb CHANGED
@@ -34,6 +34,7 @@ require 'phrase/models/comment'
34
34
  require 'phrase/models/comment_create_parameters'
35
35
  require 'phrase/models/comment_mark_read_parameters'
36
36
  require 'phrase/models/comment_update_parameters'
37
+ require 'phrase/models/current_user'
37
38
  require 'phrase/models/distribution'
38
39
  require 'phrase/models/distribution_create_parameters'
39
40
  require 'phrase/models/distribution_preview'
@@ -61,6 +62,7 @@ require 'phrase/models/inline_response422_errors'
61
62
  require 'phrase/models/invitation'
62
63
  require 'phrase/models/invitation_create_parameters'
63
64
  require 'phrase/models/invitation_update_parameters'
65
+ require 'phrase/models/invitation_update_settings_parameters'
64
66
  require 'phrase/models/job'
65
67
  require 'phrase/models/job_complete_parameters'
66
68
  require 'phrase/models/job_create_parameters'
@@ -90,7 +92,11 @@ require 'phrase/models/locale_preview'
90
92
  require 'phrase/models/locale_statistics'
91
93
  require 'phrase/models/locale_update_parameters'
92
94
  require 'phrase/models/member'
95
+ require 'phrase/models/member_project_detail'
96
+ require 'phrase/models/member_project_detail_project_roles'
97
+ require 'phrase/models/member_spaces'
93
98
  require 'phrase/models/member_update_parameters'
99
+ require 'phrase/models/member_update_settings_parameters'
94
100
  require 'phrase/models/order_confirm_parameters'
95
101
  require 'phrase/models/order_create_parameters'
96
102
  require 'phrase/models/project'
@@ -162,6 +168,9 @@ require 'phrase/models/upload_create_parameters'
162
168
  require 'phrase/models/upload_summary'
163
169
  require 'phrase/models/user'
164
170
  require 'phrase/models/user_preview'
171
+ require 'phrase/models/variable'
172
+ require 'phrase/models/variable_create_parameters'
173
+ require 'phrase/models/variable_update_parameters'
165
174
  require 'phrase/models/webhook'
166
175
  require 'phrase/models/webhook_create_parameters'
167
176
  require 'phrase/models/webhook_update_parameters'
@@ -199,6 +208,7 @@ require 'phrase/api/teams_api'
199
208
  require 'phrase/api/translations_api'
200
209
  require 'phrase/api/uploads_api'
201
210
  require 'phrase/api/users_api'
211
+ require 'phrase/api/variables_api'
202
212
  require 'phrase/api/versions_history_api'
203
213
  require 'phrase/api/webhooks_api'
204
214