ruby/lib/openapi_client/api/recipes_api.rb
# Quick Answer
# Answer a nutrition related natural language question.
# @param q [String] The nutrition related question.
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse20050, Integer, Hash)>] InlineResponse20050 data, response status code and response headers
Quick Answer
Answer a nutrition related natural language question.
Quick Answer Answer a nutrition related natural language question .
def quick_answer_with_http_info(q, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: RecipesApi.quick_answer ...'
      end
      if @api_client.config.client_side_validation && q.nil?
        fail ArgumentError, "Missing the required parameter 'q' when calling RecipesApi.quick_answer"
      end
      local_var_path = '/recipes/quickAnswer'
      query_params = opts[:query_params] || {}
      query_params[:'q'] = q
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] || 'InlineResponse20050' 
      auth_names = opts[:auth_names] || ['apiKeyScheme']
      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: RecipesApi#quick_answer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def quick_answer_with_http_info ( q , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: RecipesApi.quick_answer ...' end if @api_client . config . client_side_validation && q . nil? fail ArgumentError , "Missing the required parameter 'q' when calling RecipesApi.quick_answer" end local_var_path = '/recipes/quickAnswer' query_params = opts [ :query_params ] || { } query_params [ :' q ' ] = q header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] || 'InlineResponse20050' auth_names = opts [ :auth_names ] || [ 'apiKeyScheme' ] 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: RecipesApi#quick_answer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Quick Answer
Answer a nutrition related natural language question.
Quick Answer Answer a nutrition related natural language question .
# verify the required parameter 'q' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
InlineResponse20050 data, response status code and response headers
InlineResponse20050 data response status code and response headers
Array<(InlineResponse20050, Integer, Hash)>
q
The nutrition related question.
The nutrition related question .
opts
opts the optional parameters
opts the optional parameters