File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1-
2-
31import onebusaway
42
53
@@ -12,5 +10,6 @@ def main_sync() -> None:
1210 else :
1311 print ("Agency data or entry is None." )
1412
13+
1514if __name__ == "__main__" :
1615 main_sync ()
Original file line number Diff line number Diff line change 1-
2-
31import onebusaway
42
53
@@ -12,5 +10,6 @@ def main_sync() -> None:
1210 else :
1311 print ("stop not found" )
1412
13+
1514if __name__ == "__main__" :
1615 main_sync ()
Original file line number Diff line number Diff line change 1-
2-
31import onebusaway
42
53
64def main_sync () -> None :
75 client = onebusaway .OnebusawaySDK (api_key = "TEST" )
8- agency_id = "40" ;
6+ agency_id = "40"
97 stop_ids = client .stop_ids_for_agency .list (agency_id )
10- if stop_ids .data :
8+ if stop_ids .data and stop_ids . data . list is not None :
119 for stop_id in stop_ids .data .list :
1210 print (stop_id )
1311
Original file line number Diff line number Diff line change 1-
2-
31import onebusaway
42
53
64def main_sync () -> None :
75 client = onebusaway .OnebusawaySDK (api_key = "TEST" )
86
9- trip_id = ' 40_608344966'
7+ trip_id = " 40_608344966"
108 trip = client .trip .retrieve (trip_id )
119
1210 if trip .data and trip .data .entry :
1311 print (trip .data .entry )
1412 else :
1513 print ("trip data or entry is None." )
1614
15+
1716if __name__ == "__main__" :
1817 main_sync ()
You can’t perform that action at this time.
0 commit comments