import requests


def get_drink_ingredients(idDrink):
    """
    A function to get all the ingredients of a cocktail given the idDrink.
    
    Parameters
    ----------
    idDrink: The unique cocktail ID that can conduct query properly.
    
    Returns
    ----------
    ingredients: A list of all the ingredients of this cocktail.
    
    Examples
    ----------
    >>> get_drink_ingredients(178358)
    [OUT] ['Lime','Mango','Mint','White Rum','Ice','Soda Water','Mango']
    """
    
    def get_drink(idDrink):
        url = f'http://www.thecocktaildb.com/api/json/v2/9973533/lookup.php?i={idDrink}'
        response=requests.get(url).json()
        return response
        
    drink_json = get_drink(idDrink)['drinks'][0]
    ingredients = []
    for i in range(1,16):
        ingredient = drink_json[f"strIngredient{i}"]
        if ingredient:
            ingredients.append(ingredient)
            
    return ingredients