diff --git a/example.py b/example.py new file mode 100644 index 0000000..fca8595 --- /dev/null +++ b/example.py @@ -0,0 +1,20 @@ +""" +Copyright (c) 2015-2017 Fabian Affolter + +Licensed under MIT. All rights reserved. +""" +from opendata_transport import OpendataTransport + +data = OpendataTransport('Bern', 'Biel') + +# Get the data +data.get_data() + +# Print the start and the destination name +print("Train connections:", data.from_name, "->", data.to_name) + +# Print the next three connections +print(data.connections) + +# Print the details of the next connection +print(data.connections[0])