diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 31d8238..b8af36c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.28.0" + ".": "1.29.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 5a00449..1e6aa3d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 30 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit/open-transit-e8511c379642404d73fd2ff068f81d845054108160ccd58343021bbd0b444a37.yml -openapi_spec_hash: b8824d511c16ed314dc7cee996f4fd97 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit/open-transit-da4eecc88401fd486b0b8ac2a7b3f442748713e3128d878c7f3e24ea7f65f31d.yml +openapi_spec_hash: 8df6b1871782bcd2bd8fb1fb2bbc2694 config_hash: c28ddf5b7754155603d9fd1c5fcaeeff diff --git a/CHANGELOG.md b/CHANGELOG.md index f96750d..34872d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.29.0 (2026-07-11) + +Full Changelog: [v1.28.0...v1.29.0](https://github.com/OneBusAway/python-sdk/compare/v1.28.0...v1.29.0) + +### Features + +* **api:** api update ([552140a](https://github.com/OneBusAway/python-sdk/commit/552140acb1d9b4cf77c22d309794a5ee65ab120f)) + ## 1.28.0 (2026-07-09) Full Changelog: [v1.27.0...v1.28.0](https://github.com/OneBusAway/python-sdk/compare/v1.27.0...v1.28.0) diff --git a/pyproject.toml b/pyproject.toml index d1fb040..f6cca76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onebusaway" -version = "1.28.0" +version = "1.29.0" description = "The official Python library for the onebusaway-sdk API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/onebusaway/_version.py b/src/onebusaway/_version.py index fd2c2ba..2161133 100644 --- a/src/onebusaway/_version.py +++ b/src/onebusaway/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "onebusaway" -__version__ = "1.28.0" # x-release-please-version +__version__ = "1.29.0" # x-release-please-version diff --git a/src/onebusaway/resources/routes_for_location.py b/src/onebusaway/resources/routes_for_location.py index 76e466d..55a0803 100644 --- a/src/onebusaway/resources/routes_for_location.py +++ b/src/onebusaway/resources/routes_for_location.py @@ -44,9 +44,9 @@ def with_streaming_response(self) -> RoutesForLocationResourceWithStreamingRespo def list( self, *, - lat: float, - lon: float, + lat: float | Omit = omit, lat_span: float | Omit = omit, + lon: float | Omit = omit, lon_span: float | Omit = omit, query: str | Omit = omit, radius: float | Omit = omit, @@ -61,6 +61,10 @@ def list( routes-for-location Args: + lat: If omitted, defaults to 0.0. + + lon: If omitted, defaults to 0.0. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -79,8 +83,8 @@ def list( query=maybe_transform( { "lat": lat, - "lon": lon, "lat_span": lat_span, + "lon": lon, "lon_span": lon_span, "query": query, "radius": radius, @@ -115,9 +119,9 @@ def with_streaming_response(self) -> AsyncRoutesForLocationResourceWithStreaming async def list( self, *, - lat: float, - lon: float, + lat: float | Omit = omit, lat_span: float | Omit = omit, + lon: float | Omit = omit, lon_span: float | Omit = omit, query: str | Omit = omit, radius: float | Omit = omit, @@ -132,6 +136,10 @@ async def list( routes-for-location Args: + lat: If omitted, defaults to 0.0. + + lon: If omitted, defaults to 0.0. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -150,8 +158,8 @@ async def list( query=await async_maybe_transform( { "lat": lat, - "lon": lon, "lat_span": lat_span, + "lon": lon, "lon_span": lon_span, "query": query, "radius": radius, diff --git a/src/onebusaway/resources/stops_for_location.py b/src/onebusaway/resources/stops_for_location.py index ea17f45..885c38c 100644 --- a/src/onebusaway/resources/stops_for_location.py +++ b/src/onebusaway/resources/stops_for_location.py @@ -44,9 +44,9 @@ def with_streaming_response(self) -> StopsForLocationResourceWithStreamingRespon def list( self, *, - lat: float, - lon: float, + lat: float | Omit = omit, lat_span: float | Omit = omit, + lon: float | Omit = omit, lon_span: float | Omit = omit, query: str | Omit = omit, radius: float | Omit = omit, @@ -61,8 +61,12 @@ def list( stops-for-location Args: + lat: If omitted, defaults to 0.0. + lat_span: An alternative to radius to set the search bounding box (optional) + lon: If omitted, defaults to 0.0. + lon_span: An alternative to radius to set the search bounding box (optional) query: A search query string to filter the results @@ -87,8 +91,8 @@ def list( query=maybe_transform( { "lat": lat, - "lon": lon, "lat_span": lat_span, + "lon": lon, "lon_span": lon_span, "query": query, "radius": radius, @@ -123,9 +127,9 @@ def with_streaming_response(self) -> AsyncStopsForLocationResourceWithStreamingR async def list( self, *, - lat: float, - lon: float, + lat: float | Omit = omit, lat_span: float | Omit = omit, + lon: float | Omit = omit, lon_span: float | Omit = omit, query: str | Omit = omit, radius: float | Omit = omit, @@ -140,8 +144,12 @@ async def list( stops-for-location Args: + lat: If omitted, defaults to 0.0. + lat_span: An alternative to radius to set the search bounding box (optional) + lon: If omitted, defaults to 0.0. + lon_span: An alternative to radius to set the search bounding box (optional) query: A search query string to filter the results @@ -166,8 +174,8 @@ async def list( query=await async_maybe_transform( { "lat": lat, - "lon": lon, "lat_span": lat_span, + "lon": lon, "lon_span": lon_span, "query": query, "radius": radius, diff --git a/src/onebusaway/resources/trips_for_location.py b/src/onebusaway/resources/trips_for_location.py index a8f5778..39d8d5e 100644 --- a/src/onebusaway/resources/trips_for_location.py +++ b/src/onebusaway/resources/trips_for_location.py @@ -44,12 +44,12 @@ def with_streaming_response(self) -> TripsForLocationResourceWithStreamingRespon def list( self, *, - lat: float, lat_span: float, - lon: float, lon_span: float, include_schedule: bool | Omit = omit, include_trip: bool | Omit = omit, + lat: float | Omit = omit, + lon: float | Omit = omit, time: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -62,12 +62,8 @@ def list( Retrieve trips for a given location Args: - lat: The latitude coordinate of the search center - lat_span: Latitude span of the search bounding box - lon: The longitude coordinate of the search center - lon_span: Longitude span of the search bounding box include_schedule: Whether to include full schedule elements in the tripDetails section. Defaults @@ -76,6 +72,10 @@ def list( include_trip: Whether to include full trip elements in the references section. Defaults to true. + lat: The latitude coordinate of the search center. If omitted, defaults to 0.0. + + lon: The longitude coordinate of the search center. If omitted, defaults to 0.0. + time: Specific time for the query. Defaults to the current time. extra_headers: Send extra headers @@ -95,12 +95,12 @@ def list( timeout=timeout, query=maybe_transform( { - "lat": lat, "lat_span": lat_span, - "lon": lon, "lon_span": lon_span, "include_schedule": include_schedule, "include_trip": include_trip, + "lat": lat, + "lon": lon, "time": time, }, trips_for_location_list_params.TripsForLocationListParams, @@ -133,12 +133,12 @@ def with_streaming_response(self) -> AsyncTripsForLocationResourceWithStreamingR async def list( self, *, - lat: float, lat_span: float, - lon: float, lon_span: float, include_schedule: bool | Omit = omit, include_trip: bool | Omit = omit, + lat: float | Omit = omit, + lon: float | Omit = omit, time: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -151,12 +151,8 @@ async def list( Retrieve trips for a given location Args: - lat: The latitude coordinate of the search center - lat_span: Latitude span of the search bounding box - lon: The longitude coordinate of the search center - lon_span: Longitude span of the search bounding box include_schedule: Whether to include full schedule elements in the tripDetails section. Defaults @@ -165,6 +161,10 @@ async def list( include_trip: Whether to include full trip elements in the references section. Defaults to true. + lat: The latitude coordinate of the search center. If omitted, defaults to 0.0. + + lon: The longitude coordinate of the search center. If omitted, defaults to 0.0. + time: Specific time for the query. Defaults to the current time. extra_headers: Send extra headers @@ -184,12 +184,12 @@ async def list( timeout=timeout, query=await async_maybe_transform( { - "lat": lat, "lat_span": lat_span, - "lon": lon, "lon_span": lon_span, "include_schedule": include_schedule, "include_trip": include_trip, + "lat": lat, + "lon": lon, "time": time, }, trips_for_location_list_params.TripsForLocationListParams, diff --git a/src/onebusaway/types/routes_for_location_list_params.py b/src/onebusaway/types/routes_for_location_list_params.py index 033ec2a..a43e567 100644 --- a/src/onebusaway/types/routes_for_location_list_params.py +++ b/src/onebusaway/types/routes_for_location_list_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, Annotated, TypedDict +from typing_extensions import Annotated, TypedDict from .._utils import PropertyInfo @@ -10,12 +10,14 @@ class RoutesForLocationListParams(TypedDict, total=False): - lat: Required[float] - - lon: Required[float] + lat: float + """If omitted, defaults to 0.0.""" lat_span: Annotated[float, PropertyInfo(alias="latSpan")] + lon: float + """If omitted, defaults to 0.0.""" + lon_span: Annotated[float, PropertyInfo(alias="lonSpan")] query: str diff --git a/src/onebusaway/types/stops_for_location_list_params.py b/src/onebusaway/types/stops_for_location_list_params.py index 3174257..4cf861b 100644 --- a/src/onebusaway/types/stops_for_location_list_params.py +++ b/src/onebusaway/types/stops_for_location_list_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, Annotated, TypedDict +from typing_extensions import Annotated, TypedDict from .._utils import PropertyInfo @@ -10,13 +10,15 @@ class StopsForLocationListParams(TypedDict, total=False): - lat: Required[float] - - lon: Required[float] + lat: float + """If omitted, defaults to 0.0.""" lat_span: Annotated[float, PropertyInfo(alias="latSpan")] """An alternative to radius to set the search bounding box (optional)""" + lon: float + """If omitted, defaults to 0.0.""" + lon_span: Annotated[float, PropertyInfo(alias="lonSpan")] """An alternative to radius to set the search bounding box (optional)""" diff --git a/src/onebusaway/types/trips_for_location_list_params.py b/src/onebusaway/types/trips_for_location_list_params.py index 0fc08b8..15f3092 100644 --- a/src/onebusaway/types/trips_for_location_list_params.py +++ b/src/onebusaway/types/trips_for_location_list_params.py @@ -10,15 +10,9 @@ class TripsForLocationListParams(TypedDict, total=False): - lat: Required[float] - """The latitude coordinate of the search center""" - lat_span: Required[Annotated[float, PropertyInfo(alias="latSpan")]] """Latitude span of the search bounding box""" - lon: Required[float] - """The longitude coordinate of the search center""" - lon_span: Required[Annotated[float, PropertyInfo(alias="lonSpan")]] """Longitude span of the search bounding box""" @@ -34,5 +28,11 @@ class TripsForLocationListParams(TypedDict, total=False): Defaults to true. """ + lat: float + """The latitude coordinate of the search center. If omitted, defaults to 0.0.""" + + lon: float + """The longitude coordinate of the search center. If omitted, defaults to 0.0.""" + time: int """Specific time for the query. Defaults to the current time.""" diff --git a/tests/api_resources/test_routes_for_location.py b/tests/api_resources/test_routes_for_location.py index fda2be8..4f397b6 100644 --- a/tests/api_resources/test_routes_for_location.py +++ b/tests/api_resources/test_routes_for_location.py @@ -19,18 +19,15 @@ class TestRoutesForLocation: @parametrize def test_method_list(self, client: OnebusawaySDK) -> None: - routes_for_location = client.routes_for_location.list( - lat=0, - lon=0, - ) + routes_for_location = client.routes_for_location.list() assert_matches_type(RoutesForLocationListResponse, routes_for_location, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: routes_for_location = client.routes_for_location.list( lat=0, - lon=0, lat_span=0, + lon=0, lon_span=0, query="query", radius=0, @@ -39,10 +36,7 @@ def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: @parametrize def test_raw_response_list(self, client: OnebusawaySDK) -> None: - response = client.routes_for_location.with_raw_response.list( - lat=0, - lon=0, - ) + response = client.routes_for_location.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -51,10 +45,7 @@ def test_raw_response_list(self, client: OnebusawaySDK) -> None: @parametrize def test_streaming_response_list(self, client: OnebusawaySDK) -> None: - with client.routes_for_location.with_streaming_response.list( - lat=0, - lon=0, - ) as response: + with client.routes_for_location.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -71,18 +62,15 @@ class TestAsyncRoutesForLocation: @parametrize async def test_method_list(self, async_client: AsyncOnebusawaySDK) -> None: - routes_for_location = await async_client.routes_for_location.list( - lat=0, - lon=0, - ) + routes_for_location = await async_client.routes_for_location.list() assert_matches_type(RoutesForLocationListResponse, routes_for_location, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None: routes_for_location = await async_client.routes_for_location.list( lat=0, - lon=0, lat_span=0, + lon=0, lon_span=0, query="query", radius=0, @@ -91,10 +79,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySD @parametrize async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None: - response = await async_client.routes_for_location.with_raw_response.list( - lat=0, - lon=0, - ) + response = await async_client.routes_for_location.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -103,10 +88,7 @@ async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None @parametrize async def test_streaming_response_list(self, async_client: AsyncOnebusawaySDK) -> None: - async with async_client.routes_for_location.with_streaming_response.list( - lat=0, - lon=0, - ) as response: + async with async_client.routes_for_location.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_stops_for_location.py b/tests/api_resources/test_stops_for_location.py index 091e788..1d40367 100644 --- a/tests/api_resources/test_stops_for_location.py +++ b/tests/api_resources/test_stops_for_location.py @@ -19,18 +19,15 @@ class TestStopsForLocation: @parametrize def test_method_list(self, client: OnebusawaySDK) -> None: - stops_for_location = client.stops_for_location.list( - lat=0, - lon=0, - ) + stops_for_location = client.stops_for_location.list() assert_matches_type(StopsForLocationListResponse, stops_for_location, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: stops_for_location = client.stops_for_location.list( lat=0, - lon=0, lat_span=0, + lon=0, lon_span=0, query="query", radius=0, @@ -39,10 +36,7 @@ def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: @parametrize def test_raw_response_list(self, client: OnebusawaySDK) -> None: - response = client.stops_for_location.with_raw_response.list( - lat=0, - lon=0, - ) + response = client.stops_for_location.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -51,10 +45,7 @@ def test_raw_response_list(self, client: OnebusawaySDK) -> None: @parametrize def test_streaming_response_list(self, client: OnebusawaySDK) -> None: - with client.stops_for_location.with_streaming_response.list( - lat=0, - lon=0, - ) as response: + with client.stops_for_location.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -71,18 +62,15 @@ class TestAsyncStopsForLocation: @parametrize async def test_method_list(self, async_client: AsyncOnebusawaySDK) -> None: - stops_for_location = await async_client.stops_for_location.list( - lat=0, - lon=0, - ) + stops_for_location = await async_client.stops_for_location.list() assert_matches_type(StopsForLocationListResponse, stops_for_location, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None: stops_for_location = await async_client.stops_for_location.list( lat=0, - lon=0, lat_span=0, + lon=0, lon_span=0, query="query", radius=0, @@ -91,10 +79,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySD @parametrize async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None: - response = await async_client.stops_for_location.with_raw_response.list( - lat=0, - lon=0, - ) + response = await async_client.stops_for_location.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -103,10 +88,7 @@ async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None @parametrize async def test_streaming_response_list(self, async_client: AsyncOnebusawaySDK) -> None: - async with async_client.stops_for_location.with_streaming_response.list( - lat=0, - lon=0, - ) as response: + async with async_client.stops_for_location.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_trips_for_location.py b/tests/api_resources/test_trips_for_location.py index 236a09c..5921973 100644 --- a/tests/api_resources/test_trips_for_location.py +++ b/tests/api_resources/test_trips_for_location.py @@ -20,9 +20,7 @@ class TestTripsForLocation: @parametrize def test_method_list(self, client: OnebusawaySDK) -> None: trips_for_location = client.trips_for_location.list( - lat=0, lat_span=0, - lon=0, lon_span=0, ) assert_matches_type(TripsForLocationListResponse, trips_for_location, path=["response"]) @@ -30,12 +28,12 @@ def test_method_list(self, client: OnebusawaySDK) -> None: @parametrize def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: trips_for_location = client.trips_for_location.list( - lat=0, lat_span=0, - lon=0, lon_span=0, include_schedule=True, include_trip=True, + lat=0, + lon=0, time=0, ) assert_matches_type(TripsForLocationListResponse, trips_for_location, path=["response"]) @@ -43,9 +41,7 @@ def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: @parametrize def test_raw_response_list(self, client: OnebusawaySDK) -> None: response = client.trips_for_location.with_raw_response.list( - lat=0, lat_span=0, - lon=0, lon_span=0, ) @@ -57,9 +53,7 @@ def test_raw_response_list(self, client: OnebusawaySDK) -> None: @parametrize def test_streaming_response_list(self, client: OnebusawaySDK) -> None: with client.trips_for_location.with_streaming_response.list( - lat=0, lat_span=0, - lon=0, lon_span=0, ) as response: assert not response.is_closed @@ -79,9 +73,7 @@ class TestAsyncTripsForLocation: @parametrize async def test_method_list(self, async_client: AsyncOnebusawaySDK) -> None: trips_for_location = await async_client.trips_for_location.list( - lat=0, lat_span=0, - lon=0, lon_span=0, ) assert_matches_type(TripsForLocationListResponse, trips_for_location, path=["response"]) @@ -89,12 +81,12 @@ async def test_method_list(self, async_client: AsyncOnebusawaySDK) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None: trips_for_location = await async_client.trips_for_location.list( - lat=0, lat_span=0, - lon=0, lon_span=0, include_schedule=True, include_trip=True, + lat=0, + lon=0, time=0, ) assert_matches_type(TripsForLocationListResponse, trips_for_location, path=["response"]) @@ -102,9 +94,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySD @parametrize async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None: response = await async_client.trips_for_location.with_raw_response.list( - lat=0, lat_span=0, - lon=0, lon_span=0, ) @@ -116,9 +106,7 @@ async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None @parametrize async def test_streaming_response_list(self, async_client: AsyncOnebusawaySDK) -> None: async with async_client.trips_for_location.with_streaming_response.list( - lat=0, lat_span=0, - lon=0, lon_span=0, ) as response: assert not response.is_closed