dominos/api.py
def add_pizza_to_basket(self, item, variant=VARIANT.MEDIUM, quantity=1):
        '''
        Add a pizza to the current basket.

        :param Item item: Item from menu.
        :param int variant: Item SKU id. Some defaults are defined in the VARIANT enum.
        :param int quantity: The quantity of pizza to be added.
        :return: A response having added a pizza to the current basket.
        :rtype: requests.Response
        '''
        item_variant = item[variant]
        ingredients = item_variant['ingredients'].update([36, 42])

        params = {
            'stepId': 0,
            'quantity': quantity,
            'sizeId': variant,
            'productId': item.item_id,
            'ingredients': ingredients,
            'productIdHalfTwo': 0,
            'ingredientsHalfTwo': [],
            'recipeReferrer': 0
        }

        return self.__post('/Basket/AddPizza', json=params)
def add_pizza_to_basket(self, item, variant=VARIANT.MEDIUM, quantity=1):
        '''
        Add a pizza to the current basket.

        :param Item item: Item from menu.
        :param int variant: Item SKU id. Some defaults are defined in the VARIANT enum.
        :param int quantity: The quantity of pizza to be added.
        :return: A response having added a pizza to the current basket.
        :rtype: requests.Response
        '''
        item_variant = item[variant]
        ingredients = item_variant['ingredients'].update([36, 42])

        params = {
            'stepId': 0,
            'quantity': quantity,
            'sizeId': variant,
            'productId': item.item_id,
            'ingredients': ingredients,
            'productIdHalfTwo': 0,
            'ingredientsHalfTwo': [],
            'recipeReferrer': 0
        }

        return self.__post('/Basket/AddPizza', json=params)
def add_pizza_to_basket ( self , item , variant = VARIANT . MEDIUM , quantity = 1 ) : item_variant = item [ variant ] ingredients = item_variant [ 'ingredients' ] . update ( [ 36 , 42 ] ) params = { 'stepId' : 0 , 'quantity' : quantity , 'sizeId' : variant , 'productId' : item . item_id , 'ingredients' : ingredients , 'productIdHalfTwo' : 0 , 'ingredientsHalfTwo' : [ ] , 'recipeReferrer' : 0 } return self . __post ( '/Basket/AddPizza' , json = params )
Add a pizza to the current basket.

        :param Item item: Item from menu.
        :param int variant: Item SKU id. Some defaults are defined in the VARIANT enum.
        :param int quantity: The quantity of pizza to be added.
        :return: A response having added a pizza to the current basket.
        :rtype: requests.Response
Add a pizza to the current basket .