Example #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
Example #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
Example #3
0
def test_getvehicle():
    api = iRailAPI()
    schedule = api.get_vehicle_by_id("BE.NMBS.L584")
    print schedule
Example #4
0
def test_getliveboard():
    api = iRailAPI()
    schedule = api.get_liveboard_by_name("Gentbrugge")
    print schedule
Example #5
0
def test_getschedules():
    api = iRailAPI()
    schedules = api.get_schedules_by_names("Courtrai", "Leuven")
    for schedule in schedules.connections():
        print schedule
Example #6
0
def test_searchstations():
    api = iRailAPI()
    stations = api.search_stations("bru")
    print "--- Stations starting with bru ---"
    for station in stations:
        print station
Example #7
0
def test_getschedules():
  api = iRailAPI()
  schedules = api.get_schedules_by_names("Courtrai", "Leuven")
  for schedule in schedules.connections():
    print schedule
Example #8
0
def test_searchstations():
  api = iRailAPI()
  stations = api.search_stations("bru")
  print "--- Stations starting with bru ---"
  for station in stations:
    print station