Esempio n. 1
0
def station_next(code, lignesens):
    t = Timeo()
    times = t.get_arret(lignesens, code)

    line,direction = lignesens.split('_')
    return jsondump({
        "type": "next_stops",
        "station": code,
        "line": line,
        "direction": direction,
        "stops": times
    })
Esempio n. 2
0
def next_times(lignesens):
    t = Timeo()
    codes = t.getall_arrets(lignesens)

    times = {}
    for code in codes:
        times[code] = t.get_arret(lignesens, code)

    return jsondump({
        "type": "multiple_next_stops",
        "stops": times
    })