Method: SwaggerClient::TasksApi#public_api_get_task_with_http_info

Defined in:
lib/swagger_client/api/tasks_api.rb

#public_api_get_task_with_http_info(task_id, api_key, opts = {}) ⇒ Array<(PublicApiGetTaskResponse, Fixnum, Hash)>

retrieve a task

Parameters:

  • task_id

    identifier

  • api_key

    crelate api key

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

    the optional parameters

Returns:

  • (Array<(PublicApiGetTaskResponse, Fixnum, Hash)>)

    PublicApiGetTaskResponse data, response status code and response headers



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/swagger_client/api/tasks_api.rb', line 96

def public_api_get_task_with_http_info(task_id, api_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TasksApi.public_api_get_task ..."
  end
  # verify the required parameter 'task_id' is set
  fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.public_api_get_task" if task_id.nil?
  # verify the required parameter 'api_key' is set
  fail ArgumentError, "Missing the required parameter 'api_key' when calling TasksApi.public_api_get_task" if api_key.nil?
  # resource path
  local_var_path = "/api/pub/v1/tasks/{taskId}".sub('{' + 'taskId' + '}', task_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'api_key'] = api_key

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PublicApiGetTaskResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TasksApi#public_api_get_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end