Skip to content

Commit f267a9c

Browse files
refactor(api): update arrival and departure resource endpoints to use stop_id parameter
1 parent 643d71d commit f267a9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/onebusaway/resources/arrival_and_departure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def retrieve(
7070
if not stop_id:
7171
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
7272
return self._get(
73-
f"/api/where/arrival-and-departure-for-stop/stopID.json",
73+
f"/api/where/arrival-and-departure-for-stop/{stop_id}.json",
7474
options=make_request_options(
7575
extra_headers=extra_headers,
7676
extra_query=extra_query,
@@ -125,7 +125,7 @@ def list(
125125
if not stop_id:
126126
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
127127
return self._get(
128-
f"/api/where/arrivals-and-departures-for-stop/stopID.json",
128+
f"/api/where/arrivals-and-departures-for-stop/{stop_id}.json",
129129
options=make_request_options(
130130
extra_headers=extra_headers,
131131
extra_query=extra_query,
@@ -184,7 +184,7 @@ async def retrieve(
184184
if not stop_id:
185185
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
186186
return await self._get(
187-
f"/api/where/arrival-and-departure-for-stop/stopID.json",
187+
f"/api/where/arrival-and-departure-for-stop/{stop_id}.json",
188188
options=make_request_options(
189189
extra_headers=extra_headers,
190190
extra_query=extra_query,
@@ -239,7 +239,7 @@ async def list(
239239
if not stop_id:
240240
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
241241
return await self._get(
242-
f"/api/where/arrivals-and-departures-for-stop/stopID.json",
242+
f"/api/where/arrivals-and-departures-for-stop/{stop_id}.json",
243243
options=make_request_options(
244244
extra_headers=extra_headers,
245245
extra_query=extra_query,

0 commit comments

Comments
 (0)