python/spoonacular/com/spoonacular/default_api.py
def search_menu_items_with_http_info(self, query, **kwargs):  # noqa: E501
        """Search Menu Items  # noqa: E501

        Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha.  # 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_menu_items_with_http_info(query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str query: The search query. (required)
        :param float min_calories: The minimum amount of calories the menu item must have.
        :param float max_calories: The maximum amount of calories the menu item can have.
        :param float min_carbs: The minimum amount of carbohydrates in grams the menu item must have.
        :param float max_carbs: The maximum amount of carbohydrates in grams the menu item can have.
        :param float min_protein: The minimum amount of protein in grams the menu item must have.
        :param float max_protein: The maximum amount of protein in grams the menu item can have.
        :param float min_fat: The minimum amount of fat in grams the menu item must have.
        :param float max_fat: The maximum amount of fat in grams the menu item can have.
        :param float offset: The offset number for paging (between 0 and 990).
        :param float number: The number of expected results (between 1 and 10).
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['query', 'min_calories', 'max_calories', 'min_carbs', 'max_carbs', 'min_protein', 'max_protein', 'min_fat', 'max_fat', 'offset', 'number']  # 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_menu_items" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        # verify the required parameter 'query' is set
        if ('query' not in local_var_params or
                local_var_params['query'] is None):
            raise ApiValueError("Missing the required parameter `query` when calling `search_menu_items`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'query' in local_var_params:
            query_params.append(('query', local_var_params['query']))  # noqa: E501
        if 'min_calories' in local_var_params:
            query_params.append(('minCalories', local_var_params['min_calories']))  # noqa: E501
        if 'max_calories' in local_var_params:
            query_params.append(('maxCalories', local_var_params['max_calories']))  # noqa: E501
        if 'min_carbs' in local_var_params:
            query_params.append(('minCarbs', local_var_params['min_carbs']))  # noqa: E501
        if 'max_carbs' in local_var_params:
            query_params.append(('maxCarbs', local_var_params['max_carbs']))  # noqa: E501
        if 'min_protein' in local_var_params:
            query_params.append(('minProtein', local_var_params['min_protein']))  # noqa: E501
        if 'max_protein' in local_var_params:
            query_params.append(('maxProtein', local_var_params['max_protein']))  # noqa: E501
        if 'min_fat' in local_var_params:
            query_params.append(('minFat', local_var_params['min_fat']))  # noqa: E501
        if 'max_fat' in local_var_params:
            query_params.append(('maxFat', local_var_params['max_fat']))  # noqa: E501
        if 'offset' in local_var_params:
            query_params.append(('offset', local_var_params['offset']))  # noqa: E501
        if 'number' in local_var_params:
            query_params.append(('number', local_var_params['number']))  # 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(
            '/food/menuItems/search', '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 Menu Items  # noqa: E501

        Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha.  # 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_menu_items_with_http_info(query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str query: The search query. (required)
        :param float min_calories: The minimum amount of calories the menu item must have.
        :param float max_calories: The maximum amount of calories the menu item can have.
        :param float min_carbs: The minimum amount of carbohydrates in grams the menu item must have.
        :param float max_carbs: The maximum amount of carbohydrates in grams the menu item can have.
        :param float min_protein: The minimum amount of protein in grams the menu item must have.
        :param float max_protein: The maximum amount of protein in grams the menu item can have.
        :param float min_fat: The minimum amount of fat in grams the menu item must have.
        :param float max_fat: The maximum amount of fat in grams the menu item can have.
        :param float offset: The offset number for paging (between 0 and 990).
        :param float number: The number of expected results (between 1 and 10).
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        
Search Menu Items  # noqa: E501
Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha.  # noqa: E501
This method makes a synchronous HTTP request by default.

:param async_req bool
:param str query: The search query. (required)
:param float min_calories: The minimum amount of calories the menu item must have.
:param float max_calories: The maximum amount of calories the menu item can have.
:param float min_carbs: The minimum amount of carbohydrates in grams the menu item must have.
:param float max_carbs: The maximum amount of carbohydrates in grams the menu item can have.
:param float min_protein: The minimum amount of protein in grams the menu item must have.
:param float max_protein: The maximum amount of protein in grams the menu item can have.
:param float min_fat: The minimum amount of fat in grams the menu item must have.
:param float max_fat: The maximum amount of fat in grams the menu item can have.
:param float offset: The offset number for paging (between 0 and 990).
:param float number: The number of expected results (between 1 and 10).
:return: object
If the method is called asynchronously,
returns the request thread.
Search Menu Items # noqa : E501 Search over 115 000 menu items from over 800 fast food and chain restaurants . For example McDonald ' s Big Mac or Starbucks Mocha . # noqa : E501 This method makes a synchronous HTTP request by default . : param async_req bool : param str query : The search query . ( required ) : param float min_calories : The minimum amount of calories the menu item must have . : param float max_calories : The maximum amount of calories the menu item can have . : param float min_carbs : The minimum amount of carbohydrates in grams the menu item must have . : param float max_carbs : The maximum amount of carbohydrates in grams the menu item can have . : param float min_protein : The minimum amount of protein in grams the menu item must have . : param float max_protein : The maximum amount of protein in grams the menu item can have . : param float min_fat : The minimum amount of fat in grams the menu item must have . : param float max_fat : The maximum amount of fat in grams the menu item can have . : param float offset : The offset number for paging ( between 0 and 990 ) . : param float number : The number of expected results ( between 1 and 10 ) . : return : object If the method is called asynchronously returns the request thread .
def search_menu_items_with_http_info(self, query, **kwargs):  
        """Search Menu Items  
        Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha.  
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_menu_items_with_http_info(query, async_req=True)
        >>> result = thread.get()
        :param async_req bool
        :param str query: The search query. (required)
        :param float min_calories: The minimum amount of calories the menu item must have.
        :param float max_calories: The maximum amount of calories the menu item can have.
        :param float min_carbs: The minimum amount of carbohydrates in grams the menu item must have.
        :param float max_carbs: The maximum amount of carbohydrates in grams the menu item can have.
        :param float min_protein: The minimum amount of protein in grams the menu item must have.
        :param float max_protein: The maximum amount of protein in grams the menu item can have.
        :param float min_fat: The minimum amount of fat in grams the menu item must have.
        :param float max_fat: The maximum amount of fat in grams the menu item can have.
        :param float offset: The offset number for paging (between 0 and 990).
        :param float number: The number of expected results (between 1 and 10).
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        local_var_params = locals()
        all_params = ['query', 'min_calories', 'max_calories', 'min_carbs', 'max_carbs', 'min_protein', 'max_protein', 'min_fat', 'max_fat', 'offset', 'number']  
        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_menu_items" % key
                )
            local_var_params[key] = val
        del local_var_params['kwargs']
        if ('query' not in local_var_params or
                local_var_params['query'] is None):
            raise ApiValueError("Missing the required parameter `query` when calling `search_menu_items`")  
        collection_formats = {}
        path_params = {}
        query_params = []
        if 'query' in local_var_params:
            query_params.append(('query', local_var_params['query']))  
        if 'min_calories' in local_var_params:
            query_params.append(('minCalories', local_var_params['min_calories']))  
        if 'max_calories' in local_var_params:
            query_params.append(('maxCalories', local_var_params['max_calories']))  
        if 'min_carbs' in local_var_params:
            query_params.append(('minCarbs', local_var_params['min_carbs']))  
        if 'max_carbs' in local_var_params:
            query_params.append(('maxCarbs', local_var_params['max_carbs']))  
        if 'min_protein' in local_var_params:
            query_params.append(('minProtein', local_var_params['min_protein']))  
        if 'max_protein' in local_var_params:
            query_params.append(('maxProtein', local_var_params['max_protein']))  
        if 'min_fat' in local_var_params:
            query_params.append(('minFat', local_var_params['min_fat']))  
        if 'max_fat' in local_var_params:
            query_params.append(('maxFat', local_var_params['max_fat']))  
        if 'offset' in local_var_params:
            query_params.append(('offset', local_var_params['offset']))  
        if 'number' in local_var_params:
            query_params.append(('number', local_var_params['number']))  
        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(
            '/food/menuItems/search', '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_menu_items_with_http_info ( self , query , ** kwargs ) : local_var_params = locals ( ) all_params = [ 'query' , 'min_calories' , 'max_calories' , 'min_carbs' , 'max_carbs' , 'min_protein' , 'max_protein' , 'min_fat' , 'max_fat' , 'offset' , 'number' ] 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_menu_items" % key ) local_var_params [ key ] = val del local_var_params [ 'kwargs' ] if ( 'query' not in local_var_params or local_var_params [ 'query' ] is None ) : raise ApiValueError ( "Missing the required parameter `query` when calling `search_menu_items`" ) collection_formats = { } path_params = { } query_params = [ ] if 'query' in local_var_params : query_params . append ( ( 'query' , local_var_params [ 'query' ] ) ) if 'min_calories' in local_var_params : query_params . append ( ( 'minCalories' , local_var_params [ 'min_calories' ] ) ) if 'max_calories' in local_var_params : query_params . append ( ( 'maxCalories' , local_var_params [ 'max_calories' ] ) ) if 'min_carbs' in local_var_params : query_params . append ( ( 'minCarbs' , local_var_params [ 'min_carbs' ] ) ) if 'max_carbs' in local_var_params : query_params . append ( ( 'maxCarbs' , local_var_params [ 'max_carbs' ] ) ) if 'min_protein' in local_var_params : query_params . append ( ( 'minProtein' , local_var_params [ 'min_protein' ] ) ) if 'max_protein' in local_var_params : query_params . append ( ( 'maxProtein' , local_var_params [ 'max_protein' ] ) ) if 'min_fat' in local_var_params : query_params . append ( ( 'minFat' , local_var_params [ 'min_fat' ] ) ) if 'max_fat' in local_var_params : query_params . append ( ( 'maxFat' , local_var_params [ 'max_fat' ] ) ) if 'offset' in local_var_params : query_params . append ( ( 'offset' , local_var_params [ 'offset' ] ) ) if 'number' in local_var_params : query_params . append ( ( 'number' , local_var_params [ 'number' ] ) ) 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 ( '/food/menuItems/search' , '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 Menu Items  # noqa: E501
Search over 115,000 menu items from over 800 fast food and chain restaurants.
Search Menu Items # noqa : E501 Search over 115 000 menu items from over 800 fast food and chain restaurants .
# noqa: E501 """Search Menu Items  # noqa: E501

        Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha.  # 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_menu_items_with_http_info(query, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str query: The search query. (required)
        :param float min_calories: The minimum amount of calories the menu item must have.
        :param float max_calories: The maximum amount of calories the menu item can have.
        :param float min_carbs: The minimum amount of carbohydrates in grams the menu item must have.
        :param float max_carbs: The maximum amount of carbohydrates in grams the menu item can have.
        :param float min_protein: The minimum amount of protein in grams the menu item must have.
        :param float max_protein: The maximum amount of protein in grams the menu item can have.
        :param float min_fat: The minimum amount of fat in grams the menu item must have.
        :param float max_fat: The maximum amount of fat in grams the menu item can have.
        :param float offset: The offset number for paging (between 0 and 990).
        :param float number: The number of expected results (between 1 and 10).
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """ # noqa: E501 # verify the required parameter 'query' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # 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
query