phrase 2.6.0 → 2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -22
- data/docs/BlacklistedKeyCreateParameters.md +1 -1
- data/docs/BlacklistedKeyUpdateParameters.md +1 -1
- data/docs/BlacklistedKeysApi.md +20 -20
- data/docs/DistributionCreateParameters.md +2 -0
- data/docs/DistributionUpdateParameters.md +2 -0
- data/docs/GlossariesApi.md +20 -20
- data/docs/GlossaryTermTranslationsApi.md +12 -12
- data/docs/GlossaryTermsApi.md +20 -20
- data/docs/Invitation.md +3 -3
- data/docs/JobComment.md +29 -0
- data/docs/JobCommentCreateParameters.md +17 -0
- data/docs/JobCommentUpdateParameters.md +17 -0
- data/docs/JobCommentsApi.md +343 -0
- data/docs/JobCreateParameters.md +3 -1
- data/docs/JobsApi.md +130 -0
- data/docs/KeyCreateParameters.md +2 -0
- data/docs/Locale.md +2 -0
- data/docs/LocaleCreateParameters.md +2 -0
- data/docs/LocaleDetails.md +2 -0
- data/docs/LocaleUpdateParameters.md +2 -0
- data/docs/Member.md +1 -1
- data/docs/ScreenshotsApi.md +12 -6
- data/docs/StyleguideCreateParameters.md +1 -1
- data/docs/StyleguideUpdateParameters.md +1 -1
- data/docs/{Team1.md → TeamShort.md} +2 -2
- data/docs/VersionsHistoryApi.md +1 -1
- data/lib/phrase/api/blacklisted_keys_api.rb +20 -20
- data/lib/phrase/api/glossaries_api.rb +20 -20
- data/lib/phrase/api/glossary_term_translations_api.rb +12 -12
- data/lib/phrase/api/glossary_terms_api.rb +20 -20
- data/lib/phrase/api/job_comments_api.rb +411 -0
- data/lib/phrase/api/jobs_api.rb +146 -0
- data/lib/phrase/api/screenshots_api.rb +17 -11
- data/lib/phrase/api/versions_history_api.rb +2 -2
- data/lib/phrase/models/blacklisted_key_create_parameters.rb +1 -1
- data/lib/phrase/models/blacklisted_key_update_parameters.rb +1 -1
- data/lib/phrase/models/distribution_create_parameters.rb +11 -1
- data/lib/phrase/models/distribution_update_parameters.rb +11 -1
- data/lib/phrase/models/invitation.rb +13 -13
- data/lib/phrase/models/job_comment.rb +250 -0
- data/lib/phrase/models/job_comment_create_parameters.rb +195 -0
- data/lib/phrase/models/job_comment_update_parameters.rb +195 -0
- data/lib/phrase/models/job_create_parameters.rb +14 -4
- data/lib/phrase/models/key_create_parameters.rb +11 -1
- data/lib/phrase/models/locale.rb +10 -1
- data/lib/phrase/models/locale_create_parameters.rb +11 -1
- data/lib/phrase/models/locale_details.rb +10 -1
- data/lib/phrase/models/locale_update_parameters.rb +11 -1
- data/lib/phrase/models/member.rb +1 -1
- data/lib/phrase/models/{team1.rb → team_short.rb} +3 -3
- data/lib/phrase/version.rb +1 -1
- data/lib/phrase.rb +5 -1
- data/spec/api/blacklisted_keys_api_spec.rb +10 -10
- data/spec/api/glossaries_api_spec.rb +10 -10
- data/spec/api/glossary_term_translations_api_spec.rb +6 -6
- data/spec/api/glossary_terms_api_spec.rb +10 -10
- data/spec/api/job_comments_api_spec.rb +101 -0
- data/spec/api/jobs_api_spec.rb +30 -0
- data/spec/api/screenshots_api_spec.rb +4 -1
- data/spec/api/versions_history_api_spec.rb +1 -1
- data/spec/models/distribution_create_parameters_spec.rb +6 -0
- data/spec/models/distribution_update_parameters_spec.rb +6 -0
- data/spec/models/invitation_spec.rb +6 -6
- data/spec/models/job_comment_create_parameters_spec.rb +29 -0
- data/spec/models/job_comment_spec.rb +65 -0
- data/spec/models/job_comment_update_parameters_spec.rb +29 -0
- data/spec/models/job_create_parameters_spec.rb +6 -0
- data/spec/models/key_create_parameters_spec.rb +6 -0
- data/spec/models/locale_create_parameters_spec.rb +6 -0
- data/spec/models/locale_details_spec.rb +6 -0
- data/spec/models/locale_spec.rb +6 -0
- data/spec/models/locale_update_parameters_spec.rb +6 -0
- data/spec/models/{team1_spec.rb → team_short_spec.rb} +6 -6
- metadata +218 -202
@@ -0,0 +1,411 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module Phrase
|
4
|
+
class JobCommentsApi
|
5
|
+
attr_accessor :api_client
|
6
|
+
|
7
|
+
def initialize(api_client = ApiClient.default)
|
8
|
+
@api_client = api_client
|
9
|
+
end
|
10
|
+
# Create a job comment
|
11
|
+
# Create a new comment for a job.
|
12
|
+
# @param project_id [String] Project ID
|
13
|
+
# @param job_id [String] Job ID
|
14
|
+
# @param job_comment_create_parameters [JobCommentCreateParameters]
|
15
|
+
# @param [Hash] opts the optional parameters
|
16
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
17
|
+
# @return [JobComment]
|
18
|
+
def job_comment_create(project_id, job_id, job_comment_create_parameters, opts = {})
|
19
|
+
data, _status_code, _headers = job_comment_create_with_http_info(project_id, job_id, job_comment_create_parameters, opts)
|
20
|
+
data
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a job comment
|
24
|
+
# Create a new comment for a job.
|
25
|
+
# @param project_id [String] Project ID
|
26
|
+
# @param job_id [String] Job ID
|
27
|
+
# @param job_comment_create_parameters [JobCommentCreateParameters]
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
30
|
+
# @return [Array<(Response<(JobComment)>, Integer, Hash)>] Response<(JobComment)> data, response status code and response headers
|
31
|
+
def job_comment_create_with_http_info(project_id, job_id, job_comment_create_parameters, opts = {})
|
32
|
+
if @api_client.config.debugging
|
33
|
+
@api_client.config.logger.debug 'Calling API: JobCommentsApi.job_comment_create ...'
|
34
|
+
end
|
35
|
+
# verify the required parameter 'project_id' is set
|
36
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
37
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobCommentsApi.job_comment_create"
|
38
|
+
end
|
39
|
+
# verify the required parameter 'job_id' is set
|
40
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobCommentsApi.job_comment_create"
|
42
|
+
end
|
43
|
+
# verify the required parameter 'job_comment_create_parameters' is set
|
44
|
+
if @api_client.config.client_side_validation && job_comment_create_parameters.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'job_comment_create_parameters' when calling JobCommentsApi.job_comment_create"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/projects/{project_id}/jobs/{job_id}/comments'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
59
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_comment_create_parameters)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:return_type] || 'JobComment'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: JobCommentsApi#job_comment_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
response = ::Phrase::Response.new(data, headers)
|
87
|
+
return response, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Delete a job comment
|
91
|
+
# Delete an existing job comment.
|
92
|
+
# @param project_id [String] Project ID
|
93
|
+
# @param job_id [String] Job ID
|
94
|
+
# @param id [String] ID
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
97
|
+
# @option opts [String] :branch specify the branch to use
|
98
|
+
# @return [nil]
|
99
|
+
def job_comment_delete(project_id, job_id, id, opts = {})
|
100
|
+
data, _status_code, _headers = job_comment_delete_with_http_info(project_id, job_id, id, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Delete a job comment
|
105
|
+
# Delete an existing job comment.
|
106
|
+
# @param project_id [String] Project ID
|
107
|
+
# @param job_id [String] Job ID
|
108
|
+
# @param id [String] ID
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
111
|
+
# @option opts [String] :branch specify the branch to use
|
112
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
113
|
+
def job_comment_delete_with_http_info(project_id, job_id, id, opts = {})
|
114
|
+
if @api_client.config.debugging
|
115
|
+
@api_client.config.logger.debug 'Calling API: JobCommentsApi.job_comment_delete ...'
|
116
|
+
end
|
117
|
+
# verify the required parameter 'project_id' is set
|
118
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
119
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobCommentsApi.job_comment_delete"
|
120
|
+
end
|
121
|
+
# verify the required parameter 'job_id' is set
|
122
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobCommentsApi.job_comment_delete"
|
124
|
+
end
|
125
|
+
# verify the required parameter 'id' is set
|
126
|
+
if @api_client.config.client_side_validation && id.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobCommentsApi.job_comment_delete"
|
128
|
+
end
|
129
|
+
# resource path
|
130
|
+
local_var_path = '/projects/{project_id}/jobs/{job_id}/comments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
131
|
+
|
132
|
+
# query parameters
|
133
|
+
query_params = opts[:query_params] || {}
|
134
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
135
|
+
|
136
|
+
# header parameters
|
137
|
+
header_params = opts[:header_params] || {}
|
138
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
139
|
+
|
140
|
+
# form parameters
|
141
|
+
form_params = opts[:form_params] || {}
|
142
|
+
|
143
|
+
# http body (model)
|
144
|
+
post_body = opts[:body]
|
145
|
+
|
146
|
+
# return_type
|
147
|
+
return_type = opts[:return_type]
|
148
|
+
|
149
|
+
# auth_names
|
150
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
151
|
+
|
152
|
+
new_options = opts.merge(
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => return_type
|
159
|
+
)
|
160
|
+
|
161
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: JobCommentsApi#job_comment_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
response = ::Phrase::Response.new(data, headers)
|
166
|
+
return response, status_code, headers
|
167
|
+
end
|
168
|
+
|
169
|
+
# Get a single job comment
|
170
|
+
# Get details on a single job comment.
|
171
|
+
# @param project_id [String] Project ID
|
172
|
+
# @param job_id [String] Job ID
|
173
|
+
# @param id [String] ID
|
174
|
+
# @param [Hash] opts the optional parameters
|
175
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
176
|
+
# @option opts [String] :branch specify the branch to use
|
177
|
+
# @return [Object]
|
178
|
+
def job_comment_show(project_id, job_id, id, opts = {})
|
179
|
+
data, _status_code, _headers = job_comment_show_with_http_info(project_id, job_id, id, opts)
|
180
|
+
data
|
181
|
+
end
|
182
|
+
|
183
|
+
# Get a single job comment
|
184
|
+
# Get details on a single job comment.
|
185
|
+
# @param project_id [String] Project ID
|
186
|
+
# @param job_id [String] Job ID
|
187
|
+
# @param id [String] ID
|
188
|
+
# @param [Hash] opts the optional parameters
|
189
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
190
|
+
# @option opts [String] :branch specify the branch to use
|
191
|
+
# @return [Array<(Response<(Object)>, Integer, Hash)>] Response<(Object)> data, response status code and response headers
|
192
|
+
def job_comment_show_with_http_info(project_id, job_id, id, opts = {})
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug 'Calling API: JobCommentsApi.job_comment_show ...'
|
195
|
+
end
|
196
|
+
# verify the required parameter 'project_id' is set
|
197
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
198
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobCommentsApi.job_comment_show"
|
199
|
+
end
|
200
|
+
# verify the required parameter 'job_id' is set
|
201
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
202
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobCommentsApi.job_comment_show"
|
203
|
+
end
|
204
|
+
# verify the required parameter 'id' is set
|
205
|
+
if @api_client.config.client_side_validation && id.nil?
|
206
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobCommentsApi.job_comment_show"
|
207
|
+
end
|
208
|
+
# resource path
|
209
|
+
local_var_path = '/projects/{project_id}/jobs/{job_id}/comments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
210
|
+
|
211
|
+
# query parameters
|
212
|
+
query_params = opts[:query_params] || {}
|
213
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
214
|
+
|
215
|
+
# header parameters
|
216
|
+
header_params = opts[:header_params] || {}
|
217
|
+
# HTTP header 'Accept' (if needed)
|
218
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
219
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
220
|
+
|
221
|
+
# form parameters
|
222
|
+
form_params = opts[:form_params] || {}
|
223
|
+
|
224
|
+
# http body (model)
|
225
|
+
post_body = opts[:body]
|
226
|
+
|
227
|
+
# return_type
|
228
|
+
return_type = opts[:return_type] || 'Object'
|
229
|
+
|
230
|
+
# auth_names
|
231
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
232
|
+
|
233
|
+
new_options = opts.merge(
|
234
|
+
:header_params => header_params,
|
235
|
+
:query_params => query_params,
|
236
|
+
:form_params => form_params,
|
237
|
+
:body => post_body,
|
238
|
+
:auth_names => auth_names,
|
239
|
+
:return_type => return_type
|
240
|
+
)
|
241
|
+
|
242
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
243
|
+
if @api_client.config.debugging
|
244
|
+
@api_client.config.logger.debug "API called: JobCommentsApi#job_comment_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
245
|
+
end
|
246
|
+
response = ::Phrase::Response.new(data, headers)
|
247
|
+
return response, status_code, headers
|
248
|
+
end
|
249
|
+
|
250
|
+
# Update a job comment
|
251
|
+
# Update an existing job comment.
|
252
|
+
# @param project_id [String] Project ID
|
253
|
+
# @param key_id [String] Translation Key ID
|
254
|
+
# @param id [String] ID
|
255
|
+
# @param job_comment_update_parameters [JobCommentUpdateParameters]
|
256
|
+
# @param [Hash] opts the optional parameters
|
257
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
258
|
+
# @return [Object]
|
259
|
+
def job_comment_update(project_id, key_id, id, job_comment_update_parameters, opts = {})
|
260
|
+
data, _status_code, _headers = job_comment_update_with_http_info(project_id, key_id, id, job_comment_update_parameters, opts)
|
261
|
+
data
|
262
|
+
end
|
263
|
+
|
264
|
+
# Update a job comment
|
265
|
+
# Update an existing job comment.
|
266
|
+
# @param project_id [String] Project ID
|
267
|
+
# @param key_id [String] Translation Key ID
|
268
|
+
# @param id [String] ID
|
269
|
+
# @param job_comment_update_parameters [JobCommentUpdateParameters]
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
272
|
+
# @return [Array<(Response<(Object)>, Integer, Hash)>] Response<(Object)> data, response status code and response headers
|
273
|
+
def job_comment_update_with_http_info(project_id, key_id, id, job_comment_update_parameters, opts = {})
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug 'Calling API: JobCommentsApi.job_comment_update ...'
|
276
|
+
end
|
277
|
+
# verify the required parameter 'project_id' is set
|
278
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
279
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobCommentsApi.job_comment_update"
|
280
|
+
end
|
281
|
+
# verify the required parameter 'key_id' is set
|
282
|
+
if @api_client.config.client_side_validation && key_id.nil?
|
283
|
+
fail ArgumentError, "Missing the required parameter 'key_id' when calling JobCommentsApi.job_comment_update"
|
284
|
+
end
|
285
|
+
# verify the required parameter 'id' is set
|
286
|
+
if @api_client.config.client_side_validation && id.nil?
|
287
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobCommentsApi.job_comment_update"
|
288
|
+
end
|
289
|
+
# verify the required parameter 'job_comment_update_parameters' is set
|
290
|
+
if @api_client.config.client_side_validation && job_comment_update_parameters.nil?
|
291
|
+
fail ArgumentError, "Missing the required parameter 'job_comment_update_parameters' when calling JobCommentsApi.job_comment_update"
|
292
|
+
end
|
293
|
+
# resource path
|
294
|
+
local_var_path = '/projects/{project_id}/jobs/{job_id}/comments/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
295
|
+
|
296
|
+
# query parameters
|
297
|
+
query_params = opts[:query_params] || {}
|
298
|
+
|
299
|
+
# header parameters
|
300
|
+
header_params = opts[:header_params] || {}
|
301
|
+
# HTTP header 'Accept' (if needed)
|
302
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
303
|
+
# HTTP header 'Content-Type'
|
304
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
305
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
306
|
+
|
307
|
+
# form parameters
|
308
|
+
form_params = opts[:form_params] || {}
|
309
|
+
|
310
|
+
# http body (model)
|
311
|
+
post_body = opts[:body] || @api_client.object_to_http_body(job_comment_update_parameters)
|
312
|
+
|
313
|
+
# return_type
|
314
|
+
return_type = opts[:return_type] || 'Object'
|
315
|
+
|
316
|
+
# auth_names
|
317
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
318
|
+
|
319
|
+
new_options = opts.merge(
|
320
|
+
:header_params => header_params,
|
321
|
+
:query_params => query_params,
|
322
|
+
:form_params => form_params,
|
323
|
+
:body => post_body,
|
324
|
+
:auth_names => auth_names,
|
325
|
+
:return_type => return_type
|
326
|
+
)
|
327
|
+
|
328
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
329
|
+
if @api_client.config.debugging
|
330
|
+
@api_client.config.logger.debug "API called: JobCommentsApi#job_comment_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
331
|
+
end
|
332
|
+
response = ::Phrase::Response.new(data, headers)
|
333
|
+
return response, status_code, headers
|
334
|
+
end
|
335
|
+
|
336
|
+
# List job comments
|
337
|
+
# List all comments for a job.
|
338
|
+
# @param project_id [String] Project ID
|
339
|
+
# @param job_id [String] Job ID
|
340
|
+
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
342
|
+
# @option opts [String] :branch specify the branch to use
|
343
|
+
# @return [Array<Object>]
|
344
|
+
def job_comments_list(project_id, job_id, opts = {})
|
345
|
+
data, _status_code, _headers = job_comments_list_with_http_info(project_id, job_id, opts)
|
346
|
+
data
|
347
|
+
end
|
348
|
+
|
349
|
+
# List job comments
|
350
|
+
# List all comments for a job.
|
351
|
+
# @param project_id [String] Project ID
|
352
|
+
# @param job_id [String] Job ID
|
353
|
+
# @param [Hash] opts the optional parameters
|
354
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
355
|
+
# @option opts [String] :branch specify the branch to use
|
356
|
+
# @return [Array<(Response<(Array<Object>)>, Integer, Hash)>] Response<(Array<Object>)> data, response status code and response headers
|
357
|
+
def job_comments_list_with_http_info(project_id, job_id, opts = {})
|
358
|
+
if @api_client.config.debugging
|
359
|
+
@api_client.config.logger.debug 'Calling API: JobCommentsApi.job_comments_list ...'
|
360
|
+
end
|
361
|
+
# verify the required parameter 'project_id' is set
|
362
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
363
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobCommentsApi.job_comments_list"
|
364
|
+
end
|
365
|
+
# verify the required parameter 'job_id' is set
|
366
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
367
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling JobCommentsApi.job_comments_list"
|
368
|
+
end
|
369
|
+
# resource path
|
370
|
+
local_var_path = '/projects/{project_id}/jobs/{job_id}/comments'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
|
371
|
+
|
372
|
+
# query parameters
|
373
|
+
query_params = opts[:query_params] || {}
|
374
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
375
|
+
|
376
|
+
# header parameters
|
377
|
+
header_params = opts[:header_params] || {}
|
378
|
+
# HTTP header 'Accept' (if needed)
|
379
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
380
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
381
|
+
|
382
|
+
# form parameters
|
383
|
+
form_params = opts[:form_params] || {}
|
384
|
+
|
385
|
+
# http body (model)
|
386
|
+
post_body = opts[:body]
|
387
|
+
|
388
|
+
# return_type
|
389
|
+
return_type = opts[:return_type] || 'Array<Object>'
|
390
|
+
|
391
|
+
# auth_names
|
392
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
393
|
+
|
394
|
+
new_options = opts.merge(
|
395
|
+
:header_params => header_params,
|
396
|
+
:query_params => query_params,
|
397
|
+
:form_params => form_params,
|
398
|
+
:body => post_body,
|
399
|
+
:auth_names => auth_names,
|
400
|
+
:return_type => return_type
|
401
|
+
)
|
402
|
+
|
403
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
404
|
+
if @api_client.config.debugging
|
405
|
+
@api_client.config.logger.debug "API called: JobCommentsApi#job_comments_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
406
|
+
end
|
407
|
+
response = ::Phrase::Response.new(data, headers)
|
408
|
+
return response, status_code, headers
|
409
|
+
end
|
410
|
+
end
|
411
|
+
end
|
data/lib/phrase/api/jobs_api.rb
CHANGED
@@ -390,6 +390,79 @@ module Phrase
|
|
390
390
|
return response, status_code, headers
|
391
391
|
end
|
392
392
|
|
393
|
+
# Lock a job
|
394
|
+
# If you are the job owner, you may lock a job using this API request.
|
395
|
+
# @param project_id [String] Project ID
|
396
|
+
# @param id [String] ID
|
397
|
+
# @param [Hash] opts the optional parameters
|
398
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
399
|
+
# @option opts [String] :branch specify the branch to use
|
400
|
+
# @return [nil]
|
401
|
+
def job_lock(project_id, id, opts = {})
|
402
|
+
data, _status_code, _headers = job_lock_with_http_info(project_id, id, opts)
|
403
|
+
data
|
404
|
+
end
|
405
|
+
|
406
|
+
# Lock a job
|
407
|
+
# If you are the job owner, you may lock a job using this API request.
|
408
|
+
# @param project_id [String] Project ID
|
409
|
+
# @param id [String] ID
|
410
|
+
# @param [Hash] opts the optional parameters
|
411
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
412
|
+
# @option opts [String] :branch specify the branch to use
|
413
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
414
|
+
def job_lock_with_http_info(project_id, id, opts = {})
|
415
|
+
if @api_client.config.debugging
|
416
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_lock ...'
|
417
|
+
end
|
418
|
+
# verify the required parameter 'project_id' is set
|
419
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
420
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_lock"
|
421
|
+
end
|
422
|
+
# verify the required parameter 'id' is set
|
423
|
+
if @api_client.config.client_side_validation && id.nil?
|
424
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_lock"
|
425
|
+
end
|
426
|
+
# resource path
|
427
|
+
local_var_path = '/projects/{project_id}/jobs/{id}/lock'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
428
|
+
|
429
|
+
# query parameters
|
430
|
+
query_params = opts[:query_params] || {}
|
431
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
432
|
+
|
433
|
+
# header parameters
|
434
|
+
header_params = opts[:header_params] || {}
|
435
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
436
|
+
|
437
|
+
# form parameters
|
438
|
+
form_params = opts[:form_params] || {}
|
439
|
+
|
440
|
+
# http body (model)
|
441
|
+
post_body = opts[:body]
|
442
|
+
|
443
|
+
# return_type
|
444
|
+
return_type = opts[:return_type]
|
445
|
+
|
446
|
+
# auth_names
|
447
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
448
|
+
|
449
|
+
new_options = opts.merge(
|
450
|
+
:header_params => header_params,
|
451
|
+
:query_params => query_params,
|
452
|
+
:form_params => form_params,
|
453
|
+
:body => post_body,
|
454
|
+
:auth_names => auth_names,
|
455
|
+
:return_type => return_type
|
456
|
+
)
|
457
|
+
|
458
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
459
|
+
if @api_client.config.debugging
|
460
|
+
@api_client.config.logger.debug "API called: JobsApi#job_lock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
461
|
+
end
|
462
|
+
response = ::Phrase::Response.new(data, headers)
|
463
|
+
return response, status_code, headers
|
464
|
+
end
|
465
|
+
|
393
466
|
# Reopen a job
|
394
467
|
# Mark a job as uncompleted.
|
395
468
|
# @param project_id [String] Project ID
|
@@ -625,6 +698,79 @@ module Phrase
|
|
625
698
|
return response, status_code, headers
|
626
699
|
end
|
627
700
|
|
701
|
+
# Unlock a job
|
702
|
+
# If you are the job owner, you may unlock a locked job using this API request.
|
703
|
+
# @param project_id [String] Project ID
|
704
|
+
# @param id [String] ID
|
705
|
+
# @param [Hash] opts the optional parameters
|
706
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
707
|
+
# @option opts [String] :branch specify the branch to use
|
708
|
+
# @return [nil]
|
709
|
+
def job_unlock(project_id, id, opts = {})
|
710
|
+
data, _status_code, _headers = job_unlock_with_http_info(project_id, id, opts)
|
711
|
+
data
|
712
|
+
end
|
713
|
+
|
714
|
+
# Unlock a job
|
715
|
+
# If you are the job owner, you may unlock a locked job using this API request.
|
716
|
+
# @param project_id [String] Project ID
|
717
|
+
# @param id [String] ID
|
718
|
+
# @param [Hash] opts the optional parameters
|
719
|
+
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
720
|
+
# @option opts [String] :branch specify the branch to use
|
721
|
+
# @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
|
722
|
+
def job_unlock_with_http_info(project_id, id, opts = {})
|
723
|
+
if @api_client.config.debugging
|
724
|
+
@api_client.config.logger.debug 'Calling API: JobsApi.job_unlock ...'
|
725
|
+
end
|
726
|
+
# verify the required parameter 'project_id' is set
|
727
|
+
if @api_client.config.client_side_validation && project_id.nil?
|
728
|
+
fail ArgumentError, "Missing the required parameter 'project_id' when calling JobsApi.job_unlock"
|
729
|
+
end
|
730
|
+
# verify the required parameter 'id' is set
|
731
|
+
if @api_client.config.client_side_validation && id.nil?
|
732
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling JobsApi.job_unlock"
|
733
|
+
end
|
734
|
+
# resource path
|
735
|
+
local_var_path = '/projects/{project_id}/jobs/{id}/unlock'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
736
|
+
|
737
|
+
# query parameters
|
738
|
+
query_params = opts[:query_params] || {}
|
739
|
+
query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
740
|
+
|
741
|
+
# header parameters
|
742
|
+
header_params = opts[:header_params] || {}
|
743
|
+
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
744
|
+
|
745
|
+
# form parameters
|
746
|
+
form_params = opts[:form_params] || {}
|
747
|
+
|
748
|
+
# http body (model)
|
749
|
+
post_body = opts[:body]
|
750
|
+
|
751
|
+
# return_type
|
752
|
+
return_type = opts[:return_type]
|
753
|
+
|
754
|
+
# auth_names
|
755
|
+
auth_names = opts[:auth_names] || ['Basic', 'Token']
|
756
|
+
|
757
|
+
new_options = opts.merge(
|
758
|
+
:header_params => header_params,
|
759
|
+
:query_params => query_params,
|
760
|
+
:form_params => form_params,
|
761
|
+
:body => post_body,
|
762
|
+
:auth_names => auth_names,
|
763
|
+
:return_type => return_type
|
764
|
+
)
|
765
|
+
|
766
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
767
|
+
if @api_client.config.debugging
|
768
|
+
@api_client.config.logger.debug "API called: JobsApi#job_unlock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
769
|
+
end
|
770
|
+
response = ::Phrase::Response.new(data, headers)
|
771
|
+
return response, status_code, headers
|
772
|
+
end
|
773
|
+
|
628
774
|
# Update a job
|
629
775
|
# Update an existing job.
|
630
776
|
# @param project_id [String] Project ID
|
@@ -10,23 +10,29 @@ module Phrase
|
|
10
10
|
# Create a screenshot
|
11
11
|
# Create a new screenshot.
|
12
12
|
# @param project_id [String] Project ID
|
13
|
-
# @param screenshot_create_parameters [ScreenshotCreateParameters]
|
14
13
|
# @param [Hash] opts the optional parameters
|
15
14
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
15
|
+
# @option opts [String] :branch specify the branch to use
|
16
|
+
# @option opts [String] :name Name of the screenshot
|
17
|
+
# @option opts [String] :description Description of the screenshot
|
18
|
+
# @option opts [File] :filename Screenshot file
|
16
19
|
# @return [Screenshot]
|
17
|
-
def screenshot_create(project_id,
|
18
|
-
data, _status_code, _headers = screenshot_create_with_http_info(project_id,
|
20
|
+
def screenshot_create(project_id, opts = {})
|
21
|
+
data, _status_code, _headers = screenshot_create_with_http_info(project_id, opts)
|
19
22
|
data
|
20
23
|
end
|
21
24
|
|
22
25
|
# Create a screenshot
|
23
26
|
# Create a new screenshot.
|
24
27
|
# @param project_id [String] Project ID
|
25
|
-
# @param screenshot_create_parameters [ScreenshotCreateParameters]
|
26
28
|
# @param [Hash] opts the optional parameters
|
27
29
|
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
|
30
|
+
# @option opts [String] :branch specify the branch to use
|
31
|
+
# @option opts [String] :name Name of the screenshot
|
32
|
+
# @option opts [String] :description Description of the screenshot
|
33
|
+
# @option opts [File] :filename Screenshot file
|
28
34
|
# @return [Array<(Response<(Screenshot)>, Integer, Hash)>] Response<(Screenshot)> data, response status code and response headers
|
29
|
-
def screenshot_create_with_http_info(project_id,
|
35
|
+
def screenshot_create_with_http_info(project_id, opts = {})
|
30
36
|
if @api_client.config.debugging
|
31
37
|
@api_client.config.logger.debug 'Calling API: ScreenshotsApi.screenshot_create ...'
|
32
38
|
end
|
@@ -34,10 +40,6 @@ module Phrase
|
|
34
40
|
if @api_client.config.client_side_validation && project_id.nil?
|
35
41
|
fail ArgumentError, "Missing the required parameter 'project_id' when calling ScreenshotsApi.screenshot_create"
|
36
42
|
end
|
37
|
-
# verify the required parameter 'screenshot_create_parameters' is set
|
38
|
-
if @api_client.config.client_side_validation && screenshot_create_parameters.nil?
|
39
|
-
fail ArgumentError, "Missing the required parameter 'screenshot_create_parameters' when calling ScreenshotsApi.screenshot_create"
|
40
|
-
end
|
41
43
|
# resource path
|
42
44
|
local_var_path = '/projects/{project_id}/screenshots'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s))
|
43
45
|
|
@@ -49,14 +51,18 @@ module Phrase
|
|
49
51
|
# HTTP header 'Accept' (if needed)
|
50
52
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
53
|
# HTTP header 'Content-Type'
|
52
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
53
55
|
header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?
|
54
56
|
|
55
57
|
# form parameters
|
56
58
|
form_params = opts[:form_params] || {}
|
59
|
+
form_params['branch'] = opts[:'branch'] if !opts[:'branch'].nil?
|
60
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
61
|
+
form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
|
62
|
+
form_params['filename'] = opts[:'filename'] if !opts[:'filename'].nil?
|
57
63
|
|
58
64
|
# http body (model)
|
59
|
-
post_body = opts[:body]
|
65
|
+
post_body = opts[:body]
|
60
66
|
|
61
67
|
# return_type
|
62
68
|
return_type = opts[:return_type] || 'Screenshot'
|
@@ -89,7 +89,7 @@ module Phrase
|
|
89
89
|
end
|
90
90
|
|
91
91
|
# List all versions
|
92
|
-
# List all
|
92
|
+
# List all changes done to a given translation.
|
93
93
|
# @param project_id [String] Project ID
|
94
94
|
# @param translation_id [String] Translation ID
|
95
95
|
# @param [Hash] opts the optional parameters
|
@@ -104,7 +104,7 @@ module Phrase
|
|
104
104
|
end
|
105
105
|
|
106
106
|
# List all versions
|
107
|
-
# List all
|
107
|
+
# List all changes done to a given translation.
|
108
108
|
# @param project_id [String] Project ID
|
109
109
|
# @param translation_id [String] Translation ID
|
110
110
|
# @param [Hash] opts the optional parameters
|