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

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

      if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'] > 100
        fail ArgumentError, 'invalid value for "opts[:"number"]" when calling MiscApi.search_food_videos, 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 MiscApi.search_food_videos, must be greater than or equal to 1.'
      end

      # resource path
      local_var_path = '/food/videos/search'

      # query parameters
      query_params = opts[:query_params] || {}
      query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
      query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
      query_params[:'cuisine'] = opts[:'cuisine'] if !opts[:'cuisine'].nil?
      query_params[:'diet'] = opts[:'diet'] if !opts[:'diet'].nil?
      query_params[:'includeIngredients'] = opts[:'include_ingredients'] if !opts[:'include_ingredients'].nil?
      query_params[:'excludeIngredients'] = opts[:'exclude_ingredients'] if !opts[:'exclude_ingredients'].nil?
      query_params[:'minLength'] = opts[:'min_length'] if !opts[:'min_length'].nil?
      query_params[:'maxLength'] = opts[:'max_length'] if !opts[:'max_length'].nil?
      query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
      query_params[:'number'] = opts[:'number'] if !opts[:'number'].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] || 'InlineResponse20054' 

      # 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: MiscApi#search_food_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
# Search Food Videos
# Find recipe and other food related videos.
# @param [Hash] opts the optional parameters
# @option opts [String] :query The (natural language) search query.
# @option opts [String] :type The type of the recipes. See a full list of supported meal types.
# @option opts [String] :cuisine The cuisine(s) of the recipes. One or more, comma separated. See a full list of supported cuisines.
# @option opts [String] :diet The diet for which the recipes must be suitable. See a full list of supported diets.
# @option opts [String] :include_ingredients A comma-separated list of ingredients that the recipes should contain.
# @option opts [String] :exclude_ingredients A comma-separated list of ingredients or ingredient types that the recipes must not contain.
# @option opts [Float] :min_length Minimum video length in seconds.
# @option opts [Float] :max_length Maximum video length in seconds.
# @option opts [Integer] :offset The number of results to skip (between 0 and 900).
# @option opts [Integer] :number The maximum number of items to return (between 1 and 100). Defaults to 10.
# @return [Array<(InlineResponse20054, Integer, Hash)>] InlineResponse20054 data, response status code and response headers
Search Food Videos
Find recipe and other food related videos.
Search Food Videos Find recipe and other food related videos .
def search_food_videos_with_http_info(opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MiscApi.search_food_videos ...'
      end
      if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 900
        fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling MiscApi.search_food_videos, must be smaller than or equal to 900.'
      end
      if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
        fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling MiscApi.search_food_videos, must be greater than or equal to 0.'
      end
      if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'] > 100
        fail ArgumentError, 'invalid value for "opts[:"number"]" when calling MiscApi.search_food_videos, 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 MiscApi.search_food_videos, must be greater than or equal to 1.'
      end
      local_var_path = '/food/videos/search'
      query_params = opts[:query_params] || {}
      query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
      query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
      query_params[:'cuisine'] = opts[:'cuisine'] if !opts[:'cuisine'].nil?
      query_params[:'diet'] = opts[:'diet'] if !opts[:'diet'].nil?
      query_params[:'includeIngredients'] = opts[:'include_ingredients'] if !opts[:'include_ingredients'].nil?
      query_params[:'excludeIngredients'] = opts[:'exclude_ingredients'] if !opts[:'exclude_ingredients'].nil?
      query_params[:'minLength'] = opts[:'min_length'] if !opts[:'min_length'].nil?
      query_params[:'maxLength'] = opts[:'max_length'] if !opts[:'max_length'].nil?
      query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
      query_params[:'number'] = opts[:'number'] if !opts[:'number'].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] || 'InlineResponse20054' 
      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: MiscApi#search_food_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def search_food_videos_with_http_info ( opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MiscApi.search_food_videos ...' end if @api_client . config . client_side_validation && ! opts [ :' offset ' ] . nil? && opts [ :' offset ' ] > 900 fail ArgumentError , 'invalid value for "opts[:"offset"]" when calling MiscApi.search_food_videos, must be smaller than or equal to 900.' end if @api_client . config . client_side_validation && ! opts [ :' offset ' ] . nil? && opts [ :' offset ' ] < 0 fail ArgumentError , 'invalid value for "opts[:"offset"]" when calling MiscApi.search_food_videos, must be greater than or equal to 0.' end if @api_client . config . client_side_validation && ! opts [ :' number ' ] . nil? && opts [ :' number ' ] > 100 fail ArgumentError , 'invalid value for "opts[:"number"]" when calling MiscApi.search_food_videos, 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 MiscApi.search_food_videos, must be greater than or equal to 1.' end local_var_path = '/food/videos/search' query_params = opts [ :query_params ] || { } query_params [ :' query ' ] = opts [ :' query ' ] if ! opts [ :' query ' ] . nil? query_params [ :' type ' ] = opts [ :' type ' ] if ! opts [ :' type ' ] . nil? query_params [ :' cuisine ' ] = opts [ :' cuisine ' ] if ! opts [ :' cuisine ' ] . nil? query_params [ :' diet ' ] = opts [ :' diet ' ] if ! opts [ :' diet ' ] . nil? query_params [ :' includeIngredients ' ] = opts [ :' include_ingredients ' ] if ! opts [ :' include_ingredients ' ] . nil? query_params [ :' excludeIngredients ' ] = opts [ :' exclude_ingredients ' ] if ! opts [ :' exclude_ingredients ' ] . nil? query_params [ :' minLength ' ] = opts [ :' min_length ' ] if ! opts [ :' min_length ' ] . nil? query_params [ :' maxLength ' ] = opts [ :' max_length ' ] if ! opts [ :' max_length ' ] . nil? query_params [ :' offset ' ] = opts [ :' offset ' ] if ! opts [ :' offset ' ] . nil? query_params [ :' number ' ] = opts [ :' number ' ] if ! opts [ :' number ' ] . 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 ] || 'InlineResponse20054' 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: MiscApi#search_food_videos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Search Food Videos
Find recipe and other food related videos.
Search Food Videos Find recipe and other food related videos .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
InlineResponse20054 data, response status code and response headers
InlineResponse20054 data response status code and response headers
Array<(InlineResponse20054, Integer, Hash)>
opts
:number The maximum number of items to return (between 1 and 100). Defaults to 10.
: number The maximum number of items to return ( between 1 and 100 ) . Defaults to 10 .
opts the optional parameters
opts the optional parameters