ruby/lib/openapi_client/api/ingredients_api.rb
def autocomplete_ingredient_search_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: IngredientsApi.autocomplete_ingredient_search ...'
      end
      if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'] > 100
        fail ArgumentError, 'invalid value for "opts[:"number"]" when calling IngredientsApi.autocomplete_ingredient_search, must be smaller than or equal to 100.'
      end

      if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'] < 1
        fail ArgumentError, 'invalid value for "opts[:"number"]" when calling IngredientsApi.autocomplete_ingredient_search, must be greater than or equal to 1.'
      end

      # resource path
      local_var_path = '/food/ingredients/autocomplete'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
      query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
      query_params[:'metaInformation'] = opts[:'meta_information'] if !opts[:'meta_information'].nil?
      query_params[:'intolerances'] = opts[:'intolerances'] if !opts[:'intolerances'].nil?

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

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

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

      # return_type
      return_type = opts[:return_type] || 'Array<InlineResponse20024>' 

      # 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(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: IngredientsApi#autocomplete_ingredient_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
# Autocomplete Ingredient Search
# Autocomplete the entry of an ingredient.
# @param [Hash] opts the optional parameters
# @option opts [String] :query The (natural language) search query.
# @option opts [Integer] :number The maximum number of items to return (between 1 and 100). Defaults to 10.
# @option opts [Boolean] :meta_information Whether to return more meta information about the ingredients.
# @option opts [String] :intolerances A comma-separated list of intolerances. All recipes returned must not contain ingredients that are not suitable for people with the intolerances entered. See a full list of supported intolerances.
# @return [Array<(Array<InlineResponse20024>, Integer, Hash)>] Array<InlineResponse20024> data, response status code and response headers
Autocomplete Ingredient Search
Autocomplete the entry of an ingredient.
Autocomplete Ingredient Search Autocomplete the entry of an ingredient .
def autocomplete_ingredient_search_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: IngredientsApi.autocomplete_ingredient_search ...'
      end
      if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'] > 100
        fail ArgumentError, 'invalid value for "opts[:"number"]" when calling IngredientsApi.autocomplete_ingredient_search, must be smaller than or equal to 100.'
      end
      if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'] < 1
        fail ArgumentError, 'invalid value for "opts[:"number"]" when calling IngredientsApi.autocomplete_ingredient_search, must be greater than or equal to 1.'
      end
      local_var_path = '/food/ingredients/autocomplete'
      query_params = opts[:query_params] || {}
      query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
      query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
      query_params[:'metaInformation'] = opts[:'meta_information'] if !opts[:'meta_information'].nil?
      query_params[:'intolerances'] = opts[:'intolerances'] if !opts[:'intolerances'].nil?
      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] || 'Array<InlineResponse20024>' 
      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: IngredientsApi#autocomplete_ingredient_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def autocomplete_ingredient_search_with_http_info ( opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: IngredientsApi.autocomplete_ingredient_search ...' end if @api_client . config . client_side_validation && ! opts [ :' number ' ] . nil? && opts [ :' number ' ] > 100 fail ArgumentError , 'invalid value for "opts[:"number"]" when calling IngredientsApi.autocomplete_ingredient_search, must be smaller than or equal to 100.' end if @api_client . config . client_side_validation && ! opts [ :' number ' ] . nil? && opts [ :' number ' ] < 1 fail ArgumentError , 'invalid value for "opts[:"number"]" when calling IngredientsApi.autocomplete_ingredient_search, must be greater than or equal to 1.' end local_var_path = '/food/ingredients/autocomplete' query_params = opts [ :query_params ] || { } query_params [ :' query ' ] = opts [ :' query ' ] if ! opts [ :' query ' ] . nil? query_params [ :' number ' ] = opts [ :' number ' ] if ! opts [ :' number ' ] . nil? query_params [ :' metaInformation ' ] = opts [ :' meta_information ' ] if ! opts [ :' meta_information ' ] . nil? query_params [ :' intolerances ' ] = opts [ :' intolerances ' ] if ! opts [ :' intolerances ' ] . nil? 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 ] || 'Array<InlineResponse20024>' 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: IngredientsApi#autocomplete_ingredient_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Autocomplete Ingredient Search
Autocomplete the entry of an ingredient.
Autocomplete Ingredient Search Autocomplete the entry of an ingredient .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
Array data, response status code and response headers
Array data response status code and response headers
Array<(Array<InlineResponse20024>, Integer, Hash)>
opts
:intolerances A comma-separated list of intolerances. All recipes returned must not contain ingredients that are not suitable for people with the intolerances entered. See a full list of supported intolerances.
: intolerances A comma - separated list of intolerances . All recipes returned must not contain ingredients that are not suitable for people with the intolerances entered . See a full list of supported intolerances .
opts the optional parameters
opts the optional parameters