python/spoonacular/com/spoonacular/default_api.py
def search_recipes_by_ingredients_with_http_info(self, ingredients, **kwargs):  # noqa: E501
        """Search Recipes by Ingredients  # noqa: E501

                     Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry? This endpoint lets you find recipes that either maximize the usage of ingredients you have at hand (pre shopping) or minimize the ingredients that you don't currently have (post shopping).           # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_recipes_by_ingredients_with_http_info(ingredients, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str ingredients: A comma-separated list of ingredients that the recipes should contain. (required)
        :param float number: The maximum number of recipes to return (between 1 and 100). Defaults to 10.
        :param bool limit_license: Whether the recipes should have an open license that allows display with proper attribution.
        :param float ranking: Whether to maximize used ingredients (1) or minimize missing ingredients (2) first.
        :param bool ignore_pantry: Whether to ignore typical pantry items, such as water, salt, flour, etc.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['ingredients', 'number', 'limit_license', 'ranking', 'ignore_pantry']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_recipes_by_ingredients" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'ingredients' is set
        if ('ingredients' not in local_var_params or
                local_var_params['ingredients'] is None):
            raise ApiValueError("Missing the required parameter `ingredients` when calling `search_recipes_by_ingredients`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'ingredients' in local_var_params:
            query_params.append(('ingredients', local_var_params['ingredients']))  # noqa: E501
        if 'number' in local_var_params:
            query_params.append(('number', local_var_params['number']))  # noqa: E501
        if 'limit_license' in local_var_params:
            query_params.append(('limitLicense', local_var_params['limit_license']))  # noqa: E501
        if 'ranking' in local_var_params:
            query_params.append(('ranking', local_var_params['ranking']))  # noqa: E501
        if 'ignore_pantry' in local_var_params:
            query_params.append(('ignorePantry', local_var_params['ignore_pantry']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/recipes/findByIngredients', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
Search Recipes by Ingredients  # noqa: E501

                     Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry? This endpoint lets you find recipes that either maximize the usage of ingredients you have at hand (pre shopping) or minimize the ingredients that you don't currently have (post shopping).           # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_recipes_by_ingredients_with_http_info(ingredients, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str ingredients: A comma-separated list of ingredients that the recipes should contain. (required)
        :param float number: The maximum number of recipes to return (between 1 and 100). Defaults to 10.
        :param bool limit_license: Whether the recipes should have an open license that allows display with proper attribution.
        :param float ranking: Whether to maximize used ingredients (1) or minimize missing ingredients (2) first.
        :param bool ignore_pantry: Whether to ignore typical pantry items, such as water, salt, flour, etc.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        
Search Recipes by Ingredients  # noqa: E501
Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry. This endpoint lets you find recipes that either maximize the usage of ingredients you have at hand (pre shopping) or minimize the ingredients that you don't currently have (post shopping).           # noqa: E501
This method makes a synchronous HTTP request by default.

:param async_req bool
:param str ingredients: A comma-separated list of ingredients that the recipes should contain. (required)
:param float number: The maximum number of recipes to return (between 1 and 100). Defaults to 10.
:param bool limit_license: Whether the recipes should have an open license that allows display with proper attribution.
:param float ranking: Whether to maximize used ingredients (1) or minimize missing ingredients (2) first.
:param bool ignore_pantry: Whether to ignore typical pantry items, such as water, salt, flour, etc.
:return: object
If the method is called asynchronously,
returns the request thread.
Search Recipes by Ingredients # noqa : E501 Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry . This endpoint lets you find recipes that either maximize the usage of ingredients you have at hand ( pre shopping ) or minimize the ingredients that you don ' t currently have ( post shopping ) . # noqa : E501 This method makes a synchronous HTTP request by default . : param async_req bool : param str ingredients : A comma - separated list of ingredients that the recipes should contain . ( required ) : param float number : The maximum number of recipes to return ( between 1 and 100 ) . Defaults to 10 . : param bool limit_license : Whether the recipes should have an open license that allows display with proper attribution . : param float ranking : Whether to maximize used ingredients ( 1 ) or minimize missing ingredients ( 2 ) first . : param bool ignore_pantry : Whether to ignore typical pantry items such as water salt flour etc . : return : object If the method is called asynchronously returns the request thread .
def search_recipes_by_ingredients_with_http_info(self, ingredients, **kwargs):  
        """Search Recipes by Ingredients  
                     Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry? This endpoint lets you find recipes that either maximize the usage of ingredients you have at hand (pre shopping) or minimize the ingredients that you don't currently have (post shopping).           
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_recipes_by_ingredients_with_http_info(ingredients, async_req=True)
        >>> result = thread.get()
        :param async_req bool
        :param str ingredients: A comma-separated list of ingredients that the recipes should contain. (required)
        :param float number: The maximum number of recipes to return (between 1 and 100). Defaults to 10.
        :param bool limit_license: Whether the recipes should have an open license that allows display with proper attribution.
        :param float ranking: Whether to maximize used ingredients (1) or minimize missing ingredients (2) first.
        :param bool ignore_pantry: Whether to ignore typical pantry items, such as water, salt, flour, etc.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        local_var_params = locals()
        all_params = ['ingredients', 'number', 'limit_license', 'ranking', 'ignore_pantry']  
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')
        for key, val in six.iteritems(local_var_params['kwargs']):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method search_recipes_by_ingredients" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        if ('ingredients' not in local_var_params or
                local_var_params['ingredients'] is None):
            raise ApiValueError("Missing the required parameter `ingredients` when calling `search_recipes_by_ingredients`")  
        collection_formats = {}
        path_params = {}
        query_params = []
        if 'ingredients' in local_var_params:
            query_params.append(('ingredients', local_var_params['ingredients']))  
        if 'number' in local_var_params:
            query_params.append(('number', local_var_params['number']))  
        if 'limit_license' in local_var_params:
            query_params.append(('limitLicense', local_var_params['limit_license']))  
        if 'ranking' in local_var_params:
            query_params.append(('ranking', local_var_params['ranking']))  
        if 'ignore_pantry' in local_var_params:
            query_params.append(('ignorePantry', local_var_params['ignore_pantry']))  
        header_params = {}
        form_params = []
        local_var_files = {}
        body_params = None
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  
        auth_settings = []  
        return self.api_client.call_api(
            '/recipes/findByIngredients', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='object',  
            auth_settings=auth_settings,
            async_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
def search_recipes_by_ingredients_with_http_info ( self , ingredients , ** kwargs ) : local_var_params = locals ( ) all_params = [ 'ingredients' , 'number' , 'limit_license' , 'ranking' , 'ignore_pantry' ] all_params . append ( 'async_req' ) all_params . append ( '_return_http_data_only' ) all_params . append ( '_preload_content' ) all_params . append ( '_request_timeout' ) for key , val in six . iteritems ( local_var_params [ 'kwargs' ] ) : if key not in all_params : raise ApiTypeError ( "Got an unexpected keyword argument '%s'" " to method search_recipes_by_ingredients" % key ) local_var_params [ key ] = val del local_var_params [ 'kwargs' ] if ( 'ingredients' not in local_var_params or local_var_params [ 'ingredients' ] is None ) : raise ApiValueError ( "Missing the required parameter `ingredients` when calling `search_recipes_by_ingredients`" ) collection_formats = { } path_params = { } query_params = [ ] if 'ingredients' in local_var_params : query_params . append ( ( 'ingredients' , local_var_params [ 'ingredients' ] ) ) if 'number' in local_var_params : query_params . append ( ( 'number' , local_var_params [ 'number' ] ) ) if 'limit_license' in local_var_params : query_params . append ( ( 'limitLicense' , local_var_params [ 'limit_license' ] ) ) if 'ranking' in local_var_params : query_params . append ( ( 'ranking' , local_var_params [ 'ranking' ] ) ) if 'ignore_pantry' in local_var_params : query_params . append ( ( 'ignorePantry' , local_var_params [ 'ignore_pantry' ] ) ) header_params = { } form_params = [ ] local_var_files = { } body_params = None header_params [ 'Accept' ] = self . api_client . select_header_accept ( [ 'application/json' ] ) auth_settings = [ ] return self . api_client . call_api ( '/recipes/findByIngredients' , 'GET' , path_params , query_params , header_params , body = body_params , post_params = form_params , files = local_var_files , response_type = 'object' , auth_settings = auth_settings , async_req = local_var_params . get ( 'async_req' ) , _return_http_data_only = local_var_params . get ( '_return_http_data_only' ) , _preload_content = local_var_params . get ( '_preload_content' , True ) , _request_timeout = local_var_params . get ( '_request_timeout' ) , collection_formats = collection_formats )
Search Recipes by Ingredients  # noqa: E501
Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry?
Search Recipes by Ingredients # noqa : E501 Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry?
# noqa: E501 """Search Recipes by Ingredients  # noqa: E501

                     Ever wondered what recipes you can cook with the ingredients you have in your fridge or pantry? This endpoint lets you find recipes that either maximize the usage of ingredients you have at hand (pre shopping) or minimize the ingredients that you don't currently have (post shopping).           # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_recipes_by_ingredients_with_http_info(ingredients, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str ingredients: A comma-separated list of ingredients that the recipes should contain. (required)
        :param float number: The maximum number of recipes to return (between 1 and 100). Defaults to 10.
        :param bool limit_license: Whether the recipes should have an open license that allows display with proper attribution.
        :param float ranking: Whether to maximize used ingredients (1) or minimize missing ingredients (2) first.
        :param bool ignore_pantry: Whether to ignore typical pantry items, such as water, salt, flour, etc.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """ # noqa: E501 # verify the required parameter 'ingredients' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501
self
ingredients