-
Notifications
You must be signed in to change notification settings - Fork 13
/
main.py
35 lines (25 loc) · 883 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from api.amsterdam_api import AmsterdamApi
from api.ns_api import NSApi
def trash_bins():
amsterdam_api = AmsterdamApi()
list_trash_bins = amsterdam_api.get_trash_bins()
print("Overview of trash bins in Amsterdam")
for trash_bin in list_trash_bins:
print(
str(trash_bin['id']) + "\t" +
trash_bin['name'] + "\t" +
trash_bin['type'] + "\t" +
trash_bin['address']
)
def main():
print("NS API Test")
ns_api = NSApi()
# Get a list of train stations
#print(ns_api.get_train_stations())
# Get a list of disruptions
#print(ns_api.get_disruptions())
# Get all the departure trains from one train station (direction and delay in seconds)
# Use id from get_train_stations() as identifier.
#print(ns_api.get_departures("8400057"))
if __name__ == "__main__":
main()