@staticmethod
def get_dialogflow_slot_value(data, slot=None):
    """Gets slots' values from the interaction model.

        Args:
            data: Response received from Google Home.
            slot (str): Name of the slot. If a name is not specified, all slots will be returned
                as a dictionary. If a name is specified but is not found, ``None`` will be returned.

        Returns:
            A string representing the value of the slot from the interaction model, or a hash of slots.

        Examples:
            >>> beer_type = ADAPI.get_dialogflow_intent(data, "beer_type")
            >>> all_slots = ADAPI.get_dialogflow_intent(data)

        """
    if 'result' in data:
        contexts = data['result']['contexts'][0]
        if contexts:
            parameters = contexts.get('parameters')
        else:
            parameters = data['result']['parameters']
        if slot is None:
            return parameters
        elif slot in parameters:
            return parameters[slot]
        else:
            return None
    elif 'queryResult' in data:
        contexts = data['queryResult']['outputContexts'][0]
        if contexts:
            parameters = contexts.get('parameters')
        else:
            parameters = data['queryResult']['parameters']
        if slot is None:
            return parameters
        elif slot in parameters:
            return parameters[slot]
        else:
            return None
    else:
        return None
