lib/phrase/api/jobs_api.rb in phrase-1.0.1 vs lib/phrase/api/jobs_api.rb in phrase-1.0.2
- old
+ new
@@ -91,23 +91,23 @@
# Create a new job.
# @param project_id [String] Project ID
# @param job_create_parameters [JobCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
- # @return [nil]
+ # @return [JobDetails]
def job_create(project_id, job_create_parameters, opts = {})
- job_create_with_http_info(project_id, job_create_parameters, opts)
- nil
+ data, _status_code, _headers = job_create_with_http_info(project_id, job_create_parameters, opts)
+ data
end
# Create a job
# Create a new job.
# @param project_id [String] Project ID
# @param job_create_parameters [JobCreateParameters]
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
+ # @return [Array<(Response<(JobDetails)>, Integer, Hash)>] Response<(JobDetails)> data, response status code and response headers
def job_create_with_http_info(project_id, job_create_parameters, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: JobsApi.job_create ...'
end
# verify the required parameter 'project_id' is set
@@ -124,10 +124,12 @@
# query parameters
query_params = opts[:query_params] || {}
# 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
@@ -135,11 +137,11 @@
# http body (model)
post_body = opts[:body] || @api_client.object_to_http_body(job_create_parameters)
# return_type
- return_type = opts[:return_type]
+ return_type = opts[:return_type] || 'JobDetails'
# auth_names
auth_names = opts[:auth_names] || ['Basic', 'Token']
new_options = opts.merge(
@@ -166,22 +168,22 @@
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
# @option opts [String] :branch specify the branch to use
# @return [nil]
def job_delete(project_id, id, opts = {})
- job_delete_with_http_info(project_id, id, opts)
- nil
+ data, _status_code, _headers = job_delete_with_http_info(project_id, id, opts)
+ data
end
# Delete a job
# Delete an existing job.
# @param project_id [String] Project ID
# @param id [String] ID
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
# @option opts [String] :branch specify the branch to use
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
def job_delete_with_http_info(project_id, id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: JobsApi.job_delete ...'
end
# verify the required parameter 'project_id' is set
@@ -320,22 +322,22 @@
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
# @option opts [String] :branch specify the branch to use
# @option opts [Array<String>] :translation_key_ids ids of keys that should added to the job
# @return [nil]
def job_keys_delete(project_id, id, opts = {})
- job_keys_delete_with_http_info(project_id, id, opts)
- nil
+ data, _status_code, _headers = job_keys_delete_with_http_info(project_id, id, opts)
+ data
end
# Remove keys from job
# Remove multiple keys from existing job.
# @param project_id [String] Project ID
# @param id [String] ID
# @param [Hash] opts the optional parameters
# @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional)
# @option opts [String] :branch specify the branch to use
# @option opts [Array<String>] :translation_key_ids ids of keys that should added to the job
- # @return [Array<(Response<(nil)>, Integer, Hash)>] Response<(nil, response status code and response headers
+ # @return [Array<(Response, Integer, Hash)>] Response<(nil, response status code and response headers
def job_keys_delete_with_http_info(project_id, id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: JobsApi.job_keys_delete ...'
end
# verify the required parameter 'project_id' is set