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+ import onebusaway
2+
3+
4+ def main_sync () -> None :
5+ client = onebusaway .OnebusawaySDK (api_key = "TEST" )
6+
7+ agency_id = "40"
8+ agency = client .vehicles_for_agency .list (agency_id )
9+
10+ if agency .data and agency .data .list :
11+ print (agency .data .list )
12+ else :
13+ print ("Agency data or list is None." )
14+
15+
16+ if __name__ == "__main__" :
17+ main_sync ()
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def list(
6262 if not agency_id :
6363 raise ValueError (f"Expected a non-empty value for `agency_id` but received { agency_id !r} " )
6464 return self ._get (
65- f"/api/where/vehicles-for-agency/agencyID .json" ,
65+ f"/api/where/vehicles-for-agency/{ agency_id } .json" ,
6666 options = make_request_options (
6767 extra_headers = extra_headers ,
6868 extra_query = extra_query ,
@@ -112,7 +112,7 @@ async def list(
112112 if not agency_id :
113113 raise ValueError (f"Expected a non-empty value for `agency_id` but received { agency_id !r} " )
114114 return await self ._get (
115- f"/api/where/vehicles-for-agency/agencyID .json" ,
115+ f"/api/where/vehicles-for-agency/{ agency_id } .json" ,
116116 options = make_request_options (
117117 extra_headers = extra_headers ,
118118 extra_query = extra_query ,
You can’t perform that action at this time.
0 commit comments