ruby/lib/openapi_client/api/recipes_api.rb
def extract_recipe_from_website_with_http_info(url, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: RecipesApi.extract_recipe_from_website ...'
      end
      # verify the required parameter 'url' is set
      if @api_client.config.client_side_validation && url.nil?
        fail ArgumentError, "Missing the required parameter 'url' when calling RecipesApi.extract_recipe_from_website"
      end
      # resource path
      local_var_path = '/recipes/extract'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'url'] = url
      query_params[:'forceExtraction'] = opts[:'force_extraction'] if !opts[:'force_extraction'].nil?
      query_params[:'analyze'] = opts[:'analyze'] if !opts[:'analyze'].nil?
      query_params[:'includeNutrition'] = opts[:'include_nutrition'] if !opts[:'include_nutrition'].nil?
      query_params[:'includeTaste'] = opts[:'include_taste'] if !opts[:'include_taste'].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] || 'InlineResponse2003' 

      # 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: RecipesApi#extract_recipe_from_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
# Extract Recipe from Website
# This endpoint lets you extract recipe data such as title, ingredients, and instructions from any properly formatted Website.
# @param url [String] The URL of the recipe page.
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :force_extraction If true, the extraction will be triggered whether we already know the recipe or not. Use this only if information is missing as this operation is slower.
# @option opts [Boolean] :analyze If true, the recipe will be analyzed and classified resolving in more data such as cuisines, dish types, and more.
# @option opts [Boolean] :include_nutrition Include nutrition data in the recipe information. Nutrition data is per serving. If you want the nutrition data for the entire recipe, just multiply by the number of servings.
# @option opts [Boolean] :include_taste Whether taste data should be added to correctly parsed ingredients.
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
Extract Recipe from Website
This endpoint lets you extract recipe data such as title, ingredients, and instructions from any properly formatted Website.
Extract Recipe from Website This endpoint lets you extract recipe data such as title ingredients and instructions from any properly formatted Website .
def extract_recipe_from_website_with_http_info(url, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: RecipesApi.extract_recipe_from_website ...'
      end
      if @api_client.config.client_side_validation && url.nil?
        fail ArgumentError, "Missing the required parameter 'url' when calling RecipesApi.extract_recipe_from_website"
      end
      local_var_path = '/recipes/extract'
      query_params = opts[:query_params] || {}
      query_params[:'url'] = url
      query_params[:'forceExtraction'] = opts[:'force_extraction'] if !opts[:'force_extraction'].nil?
      query_params[:'analyze'] = opts[:'analyze'] if !opts[:'analyze'].nil?
      query_params[:'includeNutrition'] = opts[:'include_nutrition'] if !opts[:'include_nutrition'].nil?
      query_params[:'includeTaste'] = opts[:'include_taste'] if !opts[:'include_taste'].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] || 'InlineResponse2003' 
      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#extract_recipe_from_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def extract_recipe_from_website_with_http_info ( url , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: RecipesApi.extract_recipe_from_website ...' end if @api_client . config . client_side_validation && url . nil? fail ArgumentError , "Missing the required parameter 'url' when calling RecipesApi.extract_recipe_from_website" end local_var_path = '/recipes/extract' query_params = opts [ :query_params ] || { } query_params [ :' url ' ] = url query_params [ :' forceExtraction ' ] = opts [ :' force_extraction ' ] if ! opts [ :' force_extraction ' ] . nil? query_params [ :' analyze ' ] = opts [ :' analyze ' ] if ! opts [ :' analyze ' ] . nil? query_params [ :' includeNutrition ' ] = opts [ :' include_nutrition ' ] if ! opts [ :' include_nutrition ' ] . nil? query_params [ :' includeTaste ' ] = opts [ :' include_taste ' ] if ! opts [ :' include_taste ' ] . 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 ] || 'InlineResponse2003' 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#extract_recipe_from_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Extract Recipe from Website
This endpoint lets you extract recipe data such as title, ingredients, and instructions from any properly formatted Website.
Extract Recipe from Website This endpoint lets you extract recipe data such as title ingredients and instructions from any properly formatted Website .
# verify the required parameter 'url' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
InlineResponse2003 data, response status code and response headers
InlineResponse2003 data response status code and response headers
Array<(InlineResponse2003, Integer, Hash)>
url
The URL of the recipe page.
The URL of the recipe page .
opts
:include_taste Whether taste data should be added to correctly parsed ingredients.
: include_taste Whether taste data should be added to correctly parsed ingredients .
opts the optional parameters
opts the optional parameters