def get_direction_time(direction, travelling_mode):
    """Get the duration of the journey

    Arguments:
        - direction      : (list) information about the journey
        - travelling_mode: (str) conveyance

    Returns:
        - time : (str) duration of the journey
    """
    time = None
    if travelling_mode == 'driving':
        time = \
            direction[0]['legs'][0]['duration_in_traffic']['text']
    else:
        time = \
            direction[0]['legs'][0]['duration']['text']
    return time