Exemplo n.º 1
0
def test_getstations():
    api = iRailAPI()
    r = api.get_stations()
    print "Version: " + r.version()
    print "Timestamp: " + r.timestamp()
    for station in r.stations():
        print station
Exemplo n.º 2
0
def test_getstations():
  api = iRailAPI()
  r = api.get_stations()
  print "Version: " + r.version()
  print "Timestamp: " + r.timestamp()
  for station in r.stations():
    print station
Exemplo n.º 3
0
def test_getvehicle():
    api = iRailAPI()
    schedule = api.get_vehicle_by_id("BE.NMBS.L584")
    print schedule
Exemplo n.º 4
0
def test_getliveboard():
    api = iRailAPI()
    schedule = api.get_liveboard_by_name("Gentbrugge")
    print schedule
Exemplo n.º 5
0
def test_getschedules():
    api = iRailAPI()
    schedules = api.get_schedules_by_names("Courtrai", "Leuven")
    for schedule in schedules.connections():
        print schedule
Exemplo n.º 6
0
def test_searchstations():
    api = iRailAPI()
    stations = api.search_stations("bru")
    print "--- Stations starting with bru ---"
    for station in stations:
        print station
Exemplo n.º 7
0
def test_getschedules():
  api = iRailAPI()
  schedules = api.get_schedules_by_names("Courtrai", "Leuven")
  for schedule in schedules.connections():
    print schedule
Exemplo n.º 8
0
def test_searchstations():
  api = iRailAPI()
  stations = api.search_stations("bru")
  print "--- Stations starting with bru ---"
  for station in stations:
    print station