Class: Phrase::CommentRepliesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/phrase/api/comment_replies_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CommentRepliesApi

Returns a new instance of CommentRepliesApi.



7
8
9
# File 'lib/phrase/api/comment_replies_api.rb', line 7

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



5
6
7
# File 'lib/phrase/api/comment_replies_api.rb', line 5

def api_client
  @api_client
end

Instance Method Details

#replies_list(project_id, key_id, comment_id, replies_list_parameters, opts = {}) ⇒ Array<Comment>

List replies List all replies for a comment.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • replies_list_parameters (RepliesListParameters)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :page (Integer)

    Page number

  • :per_page (Integer)

    Limit on the number of objects to be returned, between 1 and 100. 25 by default

  • :branch (String)

    specify the branch to use

  • :query (String)

    Search query for comment messages

  • :filters (Array<String>)

    Specify the filter for the comments

  • :order (String)

    Order direction. Can be one of: asc, desc.

Returns:



25
26
27
28
# File 'lib/phrase/api/comment_replies_api.rb', line 25

def replies_list(project_id, key_id, comment_id, replies_list_parameters, opts = {})
  data, _status_code, _headers = replies_list_with_http_info(project_id, key_id, comment_id, replies_list_parameters, opts)
  data
end

#replies_list_with_http_info(project_id, key_id, comment_id, replies_list_parameters, opts = {}) ⇒ Array<(Response<(Array<Comment>)>, Integer, Hash)>

List replies List all replies for a comment.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • replies_list_parameters (RepliesListParameters)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :page (Integer)

    Page number

  • :per_page (Integer)

    Limit on the number of objects to be returned, between 1 and 100. 25 by default

  • :branch (String)

    specify the branch to use

  • :query (String)

    Search query for comment messages

  • :filters (Array<String>)

    Specify the filter for the comments

  • :order (String)

    Order direction. Can be one of: asc, desc.

Returns:

  • (Array<(Response<(Array<Comment>)>, Integer, Hash)>)

    Response<(Array<Comment>)> data, response status code and response headers



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/phrase/api/comment_replies_api.rb', line 45

def replies_list_with_http_info(project_id, key_id, comment_id, replies_list_parameters, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentRepliesApi.replies_list ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.replies_list"
  end
  # verify the required parameter 'key_id' is set
  if @api_client.config.client_side_validation && key_id.nil?
    fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.replies_list"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.replies_list"
  end
  # verify the required parameter 'replies_list_parameters' is set
  if @api_client.config.client_side_validation && replies_list_parameters.nil?
    fail ArgumentError, "Missing the required parameter 'replies_list_parameters' when calling CommentRepliesApi.replies_list"
  end
  # resource path
  local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'filters'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(replies_list_parameters) 

  # return_type
  return_type = opts[:return_type] || 'Array<Comment>' 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic', 'Token']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentRepliesApi#replies_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  response = ::Phrase::Response.new(data, headers)
  return response, status_code, headers
end

#reply_create(project_id, key_id, comment_id, opts = {}) ⇒ Comment

Create a reply Create a new reply for a comment.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

  • :message (String)

    specify the message for the comment

Returns:



124
125
126
127
# File 'lib/phrase/api/comment_replies_api.rb', line 124

def reply_create(project_id, key_id, comment_id, opts = {})
  data, _status_code, _headers = reply_create_with_http_info(project_id, key_id, comment_id, opts)
  data
end

#reply_create_with_http_info(project_id, key_id, comment_id, opts = {}) ⇒ Array<(Response<(Comment)>, Integer, Hash)>

Create a reply Create a new reply for a comment.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

  • :message (String)

    specify the message for the comment

Returns:

  • (Array<(Response<(Comment)>, Integer, Hash)>)

    Response<(Comment)> data, response status code and response headers



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/phrase/api/comment_replies_api.rb', line 139

def reply_create_with_http_info(project_id, key_id, comment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_create ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_create"
  end
  # verify the required parameter 'key_id' is set
  if @api_client.config.client_side_validation && key_id.nil?
    fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_create"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_create"
  end
  # resource path
  local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?
  query_params[:'message'] = opts[:'message'] if !opts[:'message'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Comment' 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic', 'Token']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentRepliesApi#reply_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  response = ::Phrase::Response.new(data, headers)
  return response, status_code, headers
end

#reply_delete(project_id, key_id, comment_id, id, opts = {}) ⇒ nil

Delete a reply Delete an existing reply.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:

  • (nil)


208
209
210
211
# File 'lib/phrase/api/comment_replies_api.rb', line 208

def reply_delete(project_id, key_id, comment_id, id, opts = {})
  data, _status_code, _headers = reply_delete_with_http_info(project_id, key_id, comment_id, id, opts)
  data
end

#reply_delete_with_http_info(project_id, key_id, comment_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>

Delete a reply Delete an existing reply.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:

  • (Array<(Response, Integer, Hash)>)

    Response<(nil, response status code and response headers



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/phrase/api/comment_replies_api.rb', line 223

def reply_delete_with_http_info(project_id, key_id, comment_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_delete ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_delete"
  end
  # verify the required parameter 'key_id' is set
  if @api_client.config.client_side_validation && key_id.nil?
    fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_delete"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_delete"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_delete"
  end
  # resource path
  local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic', 'Token']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentRepliesApi#reply_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  response = ::Phrase::Response.new(data, headers)
  return response, status_code, headers
end

#reply_mark_as_read(project_id, key_id, comment_id, id, opts = {}) ⇒ nil

Mark a reply as read Mark a reply as read.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:

  • (nil)


293
294
295
296
# File 'lib/phrase/api/comment_replies_api.rb', line 293

def reply_mark_as_read(project_id, key_id, comment_id, id, opts = {})
  data, _status_code, _headers = reply_mark_as_read_with_http_info(project_id, key_id, comment_id, id, opts)
  data
end

#reply_mark_as_read_with_http_info(project_id, key_id, comment_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>

Mark a reply as read Mark a reply as read.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:

  • (Array<(Response, Integer, Hash)>)

    Response<(nil, response status code and response headers



308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/phrase/api/comment_replies_api.rb', line 308

def reply_mark_as_read_with_http_info(project_id, key_id, comment_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_mark_as_read ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_mark_as_read"
  end
  # verify the required parameter 'key_id' is set
  if @api_client.config.client_side_validation && key_id.nil?
    fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_mark_as_read"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_mark_as_read"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_mark_as_read"
  end
  # resource path
  local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_read'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic', 'Token']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentRepliesApi#reply_mark_as_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  response = ::Phrase::Response.new(data, headers)
  return response, status_code, headers
end

#reply_mark_as_unread(project_id, key_id, comment_id, id, opts = {}) ⇒ nil

Mark a reply as unread Mark a reply as unread.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:

  • (nil)


378
379
380
381
# File 'lib/phrase/api/comment_replies_api.rb', line 378

def reply_mark_as_unread(project_id, key_id, comment_id, id, opts = {})
  data, _status_code, _headers = reply_mark_as_unread_with_http_info(project_id, key_id, comment_id, id, opts)
  data
end

#reply_mark_as_unread_with_http_info(project_id, key_id, comment_id, id, opts = {}) ⇒ Array<(Response, Integer, Hash)>

Mark a reply as unread Mark a reply as unread.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:

  • (Array<(Response, Integer, Hash)>)

    Response<(nil, response status code and response headers



393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/phrase/api/comment_replies_api.rb', line 393

def reply_mark_as_unread_with_http_info(project_id, key_id, comment_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_mark_as_unread ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_mark_as_unread"
  end
  # verify the required parameter 'key_id' is set
  if @api_client.config.client_side_validation && key_id.nil?
    fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_mark_as_unread"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_mark_as_unread"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_mark_as_unread"
  end
  # resource path
  local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}/mark_as_unread'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic', 'Token']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentRepliesApi#reply_mark_as_unread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  response = ::Phrase::Response.new(data, headers)
  return response, status_code, headers
end

#reply_show(project_id, key_id, comment_id, id, opts = {}) ⇒ Comment

Get a single reply Get details on a single reply.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:



463
464
465
466
# File 'lib/phrase/api/comment_replies_api.rb', line 463

def reply_show(project_id, key_id, comment_id, id, opts = {})
  data, _status_code, _headers = reply_show_with_http_info(project_id, key_id, comment_id, id, opts)
  data
end

#reply_show_with_http_info(project_id, key_id, comment_id, id, opts = {}) ⇒ Array<(Response<(Comment)>, Integer, Hash)>

Get a single reply Get details on a single reply.

Parameters:

  • project_id (String)

    Project ID

  • key_id (String)

    Translation Key ID

  • comment_id (String)

    Comment ID

  • id (String)

    ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_phrase_app_otp (String)

    Two-Factor-Authentication token (optional)

  • :branch (String)

    specify the branch to use

Returns:

  • (Array<(Response<(Comment)>, Integer, Hash)>)

    Response<(Comment)> data, response status code and response headers



478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
# File 'lib/phrase/api/comment_replies_api.rb', line 478

def reply_show_with_http_info(project_id, key_id, comment_id, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CommentRepliesApi.reply_show ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling CommentRepliesApi.reply_show"
  end
  # verify the required parameter 'key_id' is set
  if @api_client.config.client_side_validation && key_id.nil?
    fail ArgumentError, "Missing the required parameter 'key_id' when calling CommentRepliesApi.reply_show"
  end
  # verify the required parameter 'comment_id' is set
  if @api_client.config.client_side_validation && comment_id.nil?
    fail ArgumentError, "Missing the required parameter 'comment_id' when calling CommentRepliesApi.reply_show"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CommentRepliesApi.reply_show"
  end
  # resource path
  local_var_path = '/projects/{project_id}/keys/{key_id}/comments/{comment_id}/replies/{id}'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s)).sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'branch'] = opts[:'branch'] if !opts[:'branch'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-PhraseApp-OTP'] = opts[:'x_phrase_app_otp'] if !opts[:'x_phrase_app_otp'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  # return_type
  return_type = opts[:return_type] || 'Comment' 

  # auth_names
  auth_names = opts[:auth_names] || ['Basic', 'Token']

  new_options = opts.merge(
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CommentRepliesApi#reply_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  response = ::Phrase::Response.new(data, headers)
  return response, status_code, headers
end