From The Compiler, 6 Years ago, written in Python.
Embed
  1. Python 3.2.3 (default, Apr 23 2012, 23:14:44)
  2. [GCC 4.7.0 20120414 (prerelease)] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import pytransportapi
  5. >>> client = pytransportapi.TransportClient()
  6. >>> conn = client.connections("Winterthur", "Hittnau", via=['Wetzikon', 'Pfäffikon'])
  7. >>> conn[0].sections[0].journey.name
  8. 'S8 18871'
  9. >>> conn[0].to.station.name
  10. 'Hittnau, Furt'
  11. >>> conn[0].to.station.coordinates.lon
  12. 47.360657
  13. >>> conn[0].duration
  14. datetime.timedelta(0, 8940)
  15. >>> conn[0].to.arrival
  16. datetime.datetime(2012, 7, 6, 19, 40, tzinfo=tzoffset(None, 7200))