python/spoonacular/com/spoonacular/default_api.py
def parse_ingredients_with_http_info(self, ingredient_list, servings, **kwargs):  # noqa: E501
        """Parse Ingredients  # noqa: E501

        Extract an ingredient from plain text.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.parse_ingredients_with_http_info(ingredient_list, servings, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str ingredient_list: The ingredient list of the recipe, one ingredient per line. (required)
        :param float servings: The number of servings that you can make from the ingredients. (required)
        :param bool include_nutrition: Whether nutrition data should be added to correctly parsed ingredients.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['ingredient_list', 'servings', 'include_nutrition']  # 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 parse_ingredients" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'ingredient_list' is set
        if ('ingredient_list' not in local_var_params or
                local_var_params['ingredient_list'] is None):
            raise ApiValueError("Missing the required parameter `ingredient_list` when calling `parse_ingredients`")  # noqa: E501
        # verify the required parameter 'servings' is set
        if ('servings' not in local_var_params or
                local_var_params['servings'] is None):
            raise ApiValueError("Missing the required parameter `servings` when calling `parse_ingredients`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'ingredient_list' in local_var_params:
            form_params.append(('ingredientList', local_var_params['ingredient_list']))  # noqa: E501
        if 'servings' in local_var_params:
            form_params.append(('servings', local_var_params['servings']))  # noqa: E501
        if 'include_nutrition' in local_var_params:
            form_params.append(('includeNutrition', local_var_params['include_nutrition']))  # noqa: E501

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/x-www-form-urlencoded'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/recipes/parseIngredients', 'POST',
            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)
Parse Ingredients  # noqa: E501

        Extract an ingredient from plain text.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.parse_ingredients_with_http_info(ingredient_list, servings, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str ingredient_list: The ingredient list of the recipe, one ingredient per line. (required)
        :param float servings: The number of servings that you can make from the ingredients. (required)
        :param bool include_nutrition: Whether nutrition data should be added to correctly parsed ingredients.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        
Parse Ingredients  # noqa: E501
Extract an ingredient from plain text.  # noqa: E501
This method makes a synchronous HTTP request by default.

:param async_req bool
:param str ingredient_list: The ingredient list of the recipe, one ingredient per line. (required)
:param float servings: The number of servings that you can make from the ingredients. (required)
:param bool include_nutrition: Whether nutrition data should be added to correctly parsed ingredients.
:return: object
If the method is called asynchronously,
returns the request thread.
Parse Ingredients # noqa : E501 Extract an ingredient from plain text . # noqa : E501 This method makes a synchronous HTTP request by default . : param async_req bool : param str ingredient_list : The ingredient list of the recipe one ingredient per line . ( required ) : param float servings : The number of servings that you can make from the ingredients . ( required ) : param bool include_nutrition : Whether nutrition data should be added to correctly parsed ingredients . : return : object If the method is called asynchronously returns the request thread .
def parse_ingredients_with_http_info(self, ingredient_list, servings, **kwargs):  
        """Parse Ingredients  
        Extract an ingredient from plain text.  
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.parse_ingredients_with_http_info(ingredient_list, servings, async_req=True)
        >>> result = thread.get()
        :param async_req bool
        :param str ingredient_list: The ingredient list of the recipe, one ingredient per line. (required)
        :param float servings: The number of servings that you can make from the ingredients. (required)
        :param bool include_nutrition: Whether nutrition data should be added to correctly parsed ingredients.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        local_var_params = locals()
        all_params = ['ingredient_list', 'servings', 'include_nutrition']  
        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 parse_ingredients" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        if ('ingredient_list' not in local_var_params or
                local_var_params['ingredient_list'] is None):
            raise ApiValueError("Missing the required parameter `ingredient_list` when calling `parse_ingredients`")  
        if ('servings' not in local_var_params or
                local_var_params['servings'] is None):
            raise ApiValueError("Missing the required parameter `servings` when calling `parse_ingredients`")  
        collection_formats = {}
        path_params = {}
        query_params = []
        header_params = {}
        form_params = []
        local_var_files = {}
        if 'ingredient_list' in local_var_params:
            form_params.append(('ingredientList', local_var_params['ingredient_list']))  
        if 'servings' in local_var_params:
            form_params.append(('servings', local_var_params['servings']))  
        if 'include_nutrition' in local_var_params:
            form_params.append(('includeNutrition', local_var_params['include_nutrition']))  
        body_params = None
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  
        header_params['Content-Type'] = self.api_client.select_header_content_type(  
            ['application/x-www-form-urlencoded'])  
        auth_settings = []  
        return self.api_client.call_api(
            '/recipes/parseIngredients', 'POST',
            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 parse_ingredients_with_http_info ( self , ingredient_list , servings , ** kwargs ) : local_var_params = locals ( ) all_params = [ 'ingredient_list' , 'servings' , 'include_nutrition' ] 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 parse_ingredients" % key ) local_var_params [ key ] = val del local_var_params [ 'kwargs' ] if ( 'ingredient_list' not in local_var_params or local_var_params [ 'ingredient_list' ] is None ) : raise ApiValueError ( "Missing the required parameter `ingredient_list` when calling `parse_ingredients`" ) if ( 'servings' not in local_var_params or local_var_params [ 'servings' ] is None ) : raise ApiValueError ( "Missing the required parameter `servings` when calling `parse_ingredients`" ) collection_formats = { } path_params = { } query_params = [ ] header_params = { } form_params = [ ] local_var_files = { } if 'ingredient_list' in local_var_params : form_params . append ( ( 'ingredientList' , local_var_params [ 'ingredient_list' ] ) ) if 'servings' in local_var_params : form_params . append ( ( 'servings' , local_var_params [ 'servings' ] ) ) if 'include_nutrition' in local_var_params : form_params . append ( ( 'includeNutrition' , local_var_params [ 'include_nutrition' ] ) ) body_params = None header_params [ 'Accept' ] = self . api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = self . api_client . select_header_content_type ( [ 'application/x-www-form-urlencoded' ] ) auth_settings = [ ] return self . api_client . call_api ( '/recipes/parseIngredients' , 'POST' , 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 )
Parse Ingredients  # noqa: E501
Extract an ingredient from plain text.
Parse Ingredients # noqa : E501 Extract an ingredient from plain text .
# noqa: E501 """Parse Ingredients  # noqa: E501

        Extract an ingredient from plain text.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.parse_ingredients_with_http_info(ingredient_list, servings, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str ingredient_list: The ingredient list of the recipe, one ingredient per line. (required)
        :param float servings: The number of servings that you can make from the ingredients. (required)
        :param bool include_nutrition: Whether nutrition data should be added to correctly parsed ingredients.
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """ # noqa: E501 # verify the required parameter 'ingredient_list' is set # noqa: E501 # verify the required parameter 'servings' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501
self
ingredient_list
servings