Skip to content

Commit

Permalink
refactor: Update API resource URLs to use stop_id variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmedhossamdev committed Jul 13, 2024
1 parent 8e8f38a commit ea81ad9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/onebusaway/resources/arrival_and_departure.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def retrieve(
if not stop_id:
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
return self._get(
f"/api/where/arrival-and-departure-for-stop/stopID.json",
f"/api/where/arrival-and-departure-for-stop/{stop_id}.json",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -123,7 +123,7 @@ def list(
if not stop_id:
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
return self._get(
f"/api/where/arrivals-and-departures-for-stop/stopID.json",
f"/api/where/arrivals-and-departures-for-stop/{stop_id}.json",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -182,7 +182,7 @@ async def retrieve(
if not stop_id:
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
return await self._get(
f"/api/where/arrival-and-departure-for-stop/stopID.json",
f"/api/where/arrival-and-departure-for-stop/{stop_id}.json",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -237,7 +237,7 @@ async def list(
if not stop_id:
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}")
return await self._get(
f"/api/where/arrivals-and-departures-for-stop/stopID.json",
f"/api/where/arrivals-and-departures-for-stop/{stop_id}.json",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down

0 comments on commit ea81ad9

Please sign in to comment.