python/spoonacular/com/spoonacular/default_api.py
def detect_food_in_text_with_http_info(self, text, **kwargs):  # noqa: E501
        """Detect Food in Text  # noqa: E501

        Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detect_food_in_text_with_http_info(text, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str text: The text in which food items, such as dish names and ingredients, should be detected in. (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'text' in local_var_params:
            form_params.append(('text', local_var_params['text']))  # 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(
            '/food/detect', '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)
Detect Food in Text  # noqa: E501

        Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detect_food_in_text_with_http_info(text, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str text: The text in which food items, such as dish names and ingredients, should be detected in. (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        
Detect Food in Text  # noqa: E501
Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.  # noqa: E501
This method makes a synchronous HTTP request by default.

:param async_req bool
:param str text: The text in which food items, such as dish names and ingredients, should be detected in. (required)
:return: object
If the method is called asynchronously,
returns the request thread.
Detect Food in Text # noqa : E501 Take any text and find all mentions of food contained within it . This task is also called Named Entity Recognition ( NER ) . In this case the entities are foods . Either dishes such as pizza or cheeseburger or ingredients such as cucumber or almonds . # noqa : E501 This method makes a synchronous HTTP request by default . : param async_req bool : param str text : The text in which food items such as dish names and ingredients should be detected in . ( required ) : return : object If the method is called asynchronously returns the request thread .
def detect_food_in_text_with_http_info(self, text, **kwargs):  
        """Detect Food in Text  
        Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.  
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detect_food_in_text_with_http_info(text, async_req=True)
        >>> result = thread.get()
        :param async_req bool
        :param str text: The text in which food items, such as dish names and ingredients, should be detected in. (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        local_var_params = locals()
        all_params = ['text']  
        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 detect_food_in_text" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        if ('text' not in local_var_params or
                local_var_params['text'] is None):
            raise ApiValueError("Missing the required parameter `text` when calling `detect_food_in_text`")  
        collection_formats = {}
        path_params = {}
        query_params = []
        header_params = {}
        form_params = []
        local_var_files = {}
        if 'text' in local_var_params:
            form_params.append(('text', local_var_params['text']))  
        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(
            '/food/detect', '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 detect_food_in_text_with_http_info ( self , text , ** kwargs ) : local_var_params = locals ( ) all_params = [ 'text' ] 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 detect_food_in_text" % key ) local_var_params [ key ] = val del local_var_params [ 'kwargs' ] if ( 'text' not in local_var_params or local_var_params [ 'text' ] is None ) : raise ApiValueError ( "Missing the required parameter `text` when calling `detect_food_in_text`" ) collection_formats = { } path_params = { } query_params = [ ] header_params = { } form_params = [ ] local_var_files = { } if 'text' in local_var_params : form_params . append ( ( 'text' , local_var_params [ 'text' ] ) ) 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 ( '/food/detect' , '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 )
Detect Food in Text  # noqa: E501
Take any text and find all mentions of food contained within it.
Detect Food in Text # noqa : E501 Take any text and find all mentions of food contained within it .
# noqa: E501 """Detect Food in Text  # noqa: E501

        Take any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are foods. Either dishes, such as pizza or cheeseburger, or ingredients, such as cucumber or almonds.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.detect_food_in_text_with_http_info(text, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str text: The text in which food items, such as dish names and ingredients, should be detected in. (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """ # noqa: E501 # verify the required parameter 'text' is set # 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
text