ruby/lib/openapi_client/api/misc_api.rb
def detect_food_in_text_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MiscApi.detect_food_in_text ...'
      end
      allowable_values = ["application/x-www-form-urlencoded", "application/json", "multipart/form-data"]
      if @api_client.config.client_side_validation && opts[:'content_type'] && !allowable_values.include?(opts[:'content_type'])
        fail ArgumentError, "invalid value for \"content_type\", must be one of #{allowable_values}"
      end
      # resource path
      local_var_path = '/food/detect'

      # 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/x-www-form-urlencoded'])
      header_params[:'Content-Type'] = opts[:'content_type'] if !opts[:'content_type'].nil?

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

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

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

      # auth_names
      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(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MiscApi#detect_food_in_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
# Detect Food in Text
# Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.
# @param [Hash] opts the optional parameters
# @option opts [String] :content_type The content type.
# @return [Array<(InlineResponse20051, Integer, Hash)>] InlineResponse20051 data, response status code and response headers
Detect Food in Text
Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.
Detect Food in Text Take any text and find all mentions of food contained within it . This task is also called Named Entity Recognition ( NER ) . In this case the entities are foods . Either dishes such as pizza or cheeseburger or ingredients such as cucumber or almonds .
def detect_food_in_text_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MiscApi.detect_food_in_text ...'
      end
      allowable_values = ["application/x-www-form-urlencoded", "application/json", "multipart/form-data"]
      if @api_client.config.client_side_validation && opts[:'content_type'] && !allowable_values.include?(opts[:'content_type'])
        fail ArgumentError, "invalid value for \"content_type\", must be one of #{allowable_values}"
      end
      local_var_path = '/food/detect'
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
      header_params[:'Content-Type'] = opts[:'content_type'] if !opts[:'content_type'].nil?
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] || 'InlineResponse20051' 
      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(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MiscApi#detect_food_in_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def detect_food_in_text_with_http_info ( opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MiscApi.detect_food_in_text ...' end allowable_values = [ "application/x-www-form-urlencoded" , "application/json" , "multipart/form-data" ] if @api_client . config . client_side_validation && opts [ :' content_type ' ] && ! allowable_values . include? ( opts [ :' content_type ' ] ) fail ArgumentError , "invalid value for \"content_type\", must be one of #{allowable_values}" end local_var_path = '/food/detect' query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/x-www-form-urlencoded' ] ) header_params [ :' Content-Type ' ] = opts [ :' content_type ' ] if ! opts [ :' content_type ' ] . nil? form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] || 'InlineResponse20051' 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 ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: MiscApi#detect_food_in_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Detect Food in Text
Take any text and find all mentions of food contained within it.
Detect Food in Text Take any text and find all mentions of food contained within it .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
InlineResponse20051 data, response status code and response headers
InlineResponse20051 data response status code and response headers
Array<(InlineResponse20051, Integer, Hash)>
opts
:content_type The content type.
: content_type The content type .
opts the optional parameters
opts the optional parameters