lib/phrase/api/comments_api.rb in phrase-2.13.0 vs lib/phrase/api/comments_api.rb in phrase-2.14.0
- old
+ new
@@ -12,10 +12,12 @@
# @param project_id [String] Project ID
# @param key_id [String] Translation Key ID
# @param comment_create_parameters [CommentCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
+ # @option opts [String] :message specify the message for the comment
+ # @option opts [Array<String>] :locale_ids specify the locales for the comment
# @return [Comment]
def comment_create(project_id, key_id, comment_create_parameters, opts = {})
data, _status_code, _headers = comment_create_with_http_info(project_id, key_id, comment_create_parameters, opts)
data
end
@@ -25,10 +27,12 @@
# @param project_id [String] Project ID
# @param key_id [String] Translation Key ID
# @param comment_create_parameters [CommentCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
+ # @option opts [String] :message specify the message for the comment
+ # @option opts [Array<String>] :locale_ids specify the locales for the comment
# @return [Array<(Response<(Comment)>, Integer, Hash)>] Response<(Comment)> data, response status code and response headers
def comment_create_with_http_info(project_id, key_id, comment_create_parameters, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: CommentsApi.comment_create ...'
end
@@ -47,9 +51,11 @@
# resource path
local_var_path = '/projects/{project_id}/keys/{key_id}/comments'.sub('{' + 'project_id' + '}', CGI.escape(project_id.to_s)).sub('{' + 'key_id' + '}', CGI.escape(key_id.to_s))
# query parameters
query_params = opts[:query_params] || {}
+ query_params[:'message'] = opts[:'message'] if !opts[:'message'].nil?
+ query_params[:'locale_ids'] = @api_client.build_collection_param(opts[:'locale_ids'], :multi) if !opts[:'locale_ids'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])