diff --git a/api.md b/api.md index 408a5c9..2a318ed 100755 --- a/api.md +++ b/api.md @@ -274,24 +274,24 @@ Methods: Types: ```python -from onebusaway.types import SearchForStopRetrieveResponse +from onebusaway.types import SearchForStopListResponse ``` Methods: -- client.search_for_stop.retrieve(\*\*params) -> SearchForStopRetrieveResponse +- client.search_for_stop.list(\*\*params) -> SearchForStopListResponse # SearchForRoute Types: ```python -from onebusaway.types import SearchForRouteRetrieveResponse +from onebusaway.types import SearchForRouteListResponse ``` Methods: -- client.search_for_route.retrieve(\*\*params) -> SearchForRouteRetrieveResponse +- client.search_for_route.list(\*\*params) -> SearchForRouteListResponse # Block diff --git a/src/onebusaway/resources/search_for_route.py b/src/onebusaway/resources/search_for_route.py index 455fd1a..b12e162 100755 --- a/src/onebusaway/resources/search_for_route.py +++ b/src/onebusaway/resources/search_for_route.py @@ -4,7 +4,7 @@ import httpx -from ..types import search_for_route_retrieve_params +from ..types import search_for_route_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -19,7 +19,7 @@ async_to_streamed_response_wrapper, ) from .._base_client import make_request_options -from ..types.search_for_route_retrieve_response import SearchForRouteRetrieveResponse +from ..types.search_for_route_list_response import SearchForRouteListResponse __all__ = ["SearchForRouteResource", "AsyncSearchForRouteResource"] @@ -33,7 +33,7 @@ def with_raw_response(self) -> SearchForRouteResourceWithRawResponse: def with_streaming_response(self) -> SearchForRouteResourceWithStreamingResponse: return SearchForRouteResourceWithStreamingResponse(self) - def retrieve( + def list( self, *, input: str, @@ -44,7 +44,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SearchForRouteRetrieveResponse: + ) -> SearchForRouteListResponse: """ Search for a route based on its name. @@ -73,10 +73,10 @@ def retrieve( "input": input, "max_count": max_count, }, - search_for_route_retrieve_params.SearchForRouteRetrieveParams, + search_for_route_list_params.SearchForRouteListParams, ), ), - cast_to=SearchForRouteRetrieveResponse, + cast_to=SearchForRouteListResponse, ) @@ -89,7 +89,7 @@ def with_raw_response(self) -> AsyncSearchForRouteResourceWithRawResponse: def with_streaming_response(self) -> AsyncSearchForRouteResourceWithStreamingResponse: return AsyncSearchForRouteResourceWithStreamingResponse(self) - async def retrieve( + async def list( self, *, input: str, @@ -100,7 +100,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SearchForRouteRetrieveResponse: + ) -> SearchForRouteListResponse: """ Search for a route based on its name. @@ -129,10 +129,10 @@ async def retrieve( "input": input, "max_count": max_count, }, - search_for_route_retrieve_params.SearchForRouteRetrieveParams, + search_for_route_list_params.SearchForRouteListParams, ), ), - cast_to=SearchForRouteRetrieveResponse, + cast_to=SearchForRouteListResponse, ) @@ -140,8 +140,8 @@ class SearchForRouteResourceWithRawResponse: def __init__(self, search_for_route: SearchForRouteResource) -> None: self._search_for_route = search_for_route - self.retrieve = to_raw_response_wrapper( - search_for_route.retrieve, + self.list = to_raw_response_wrapper( + search_for_route.list, ) @@ -149,8 +149,8 @@ class AsyncSearchForRouteResourceWithRawResponse: def __init__(self, search_for_route: AsyncSearchForRouteResource) -> None: self._search_for_route = search_for_route - self.retrieve = async_to_raw_response_wrapper( - search_for_route.retrieve, + self.list = async_to_raw_response_wrapper( + search_for_route.list, ) @@ -158,8 +158,8 @@ class SearchForRouteResourceWithStreamingResponse: def __init__(self, search_for_route: SearchForRouteResource) -> None: self._search_for_route = search_for_route - self.retrieve = to_streamed_response_wrapper( - search_for_route.retrieve, + self.list = to_streamed_response_wrapper( + search_for_route.list, ) @@ -167,6 +167,6 @@ class AsyncSearchForRouteResourceWithStreamingResponse: def __init__(self, search_for_route: AsyncSearchForRouteResource) -> None: self._search_for_route = search_for_route - self.retrieve = async_to_streamed_response_wrapper( - search_for_route.retrieve, + self.list = async_to_streamed_response_wrapper( + search_for_route.list, ) diff --git a/src/onebusaway/resources/search_for_stop.py b/src/onebusaway/resources/search_for_stop.py index 28a068e..8663227 100755 --- a/src/onebusaway/resources/search_for_stop.py +++ b/src/onebusaway/resources/search_for_stop.py @@ -4,7 +4,7 @@ import httpx -from ..types import search_for_stop_retrieve_params +from ..types import search_for_stop_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -19,7 +19,7 @@ async_to_streamed_response_wrapper, ) from .._base_client import make_request_options -from ..types.search_for_stop_retrieve_response import SearchForStopRetrieveResponse +from ..types.search_for_stop_list_response import SearchForStopListResponse __all__ = ["SearchForStopResource", "AsyncSearchForStopResource"] @@ -33,7 +33,7 @@ def with_raw_response(self) -> SearchForStopResourceWithRawResponse: def with_streaming_response(self) -> SearchForStopResourceWithStreamingResponse: return SearchForStopResourceWithStreamingResponse(self) - def retrieve( + def list( self, *, input: str, @@ -44,7 +44,7 @@ def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SearchForStopRetrieveResponse: + ) -> SearchForStopListResponse: """ Search for a stop based on its name. @@ -73,10 +73,10 @@ def retrieve( "input": input, "max_count": max_count, }, - search_for_stop_retrieve_params.SearchForStopRetrieveParams, + search_for_stop_list_params.SearchForStopListParams, ), ), - cast_to=SearchForStopRetrieveResponse, + cast_to=SearchForStopListResponse, ) @@ -89,7 +89,7 @@ def with_raw_response(self) -> AsyncSearchForStopResourceWithRawResponse: def with_streaming_response(self) -> AsyncSearchForStopResourceWithStreamingResponse: return AsyncSearchForStopResourceWithStreamingResponse(self) - async def retrieve( + async def list( self, *, input: str, @@ -100,7 +100,7 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SearchForStopRetrieveResponse: + ) -> SearchForStopListResponse: """ Search for a stop based on its name. @@ -129,10 +129,10 @@ async def retrieve( "input": input, "max_count": max_count, }, - search_for_stop_retrieve_params.SearchForStopRetrieveParams, + search_for_stop_list_params.SearchForStopListParams, ), ), - cast_to=SearchForStopRetrieveResponse, + cast_to=SearchForStopListResponse, ) @@ -140,8 +140,8 @@ class SearchForStopResourceWithRawResponse: def __init__(self, search_for_stop: SearchForStopResource) -> None: self._search_for_stop = search_for_stop - self.retrieve = to_raw_response_wrapper( - search_for_stop.retrieve, + self.list = to_raw_response_wrapper( + search_for_stop.list, ) @@ -149,8 +149,8 @@ class AsyncSearchForStopResourceWithRawResponse: def __init__(self, search_for_stop: AsyncSearchForStopResource) -> None: self._search_for_stop = search_for_stop - self.retrieve = async_to_raw_response_wrapper( - search_for_stop.retrieve, + self.list = async_to_raw_response_wrapper( + search_for_stop.list, ) @@ -158,8 +158,8 @@ class SearchForStopResourceWithStreamingResponse: def __init__(self, search_for_stop: SearchForStopResource) -> None: self._search_for_stop = search_for_stop - self.retrieve = to_streamed_response_wrapper( - search_for_stop.retrieve, + self.list = to_streamed_response_wrapper( + search_for_stop.list, ) @@ -167,6 +167,6 @@ class AsyncSearchForStopResourceWithStreamingResponse: def __init__(self, search_for_stop: AsyncSearchForStopResource) -> None: self._search_for_stop = search_for_stop - self.retrieve = async_to_streamed_response_wrapper( - search_for_stop.retrieve, + self.list = async_to_streamed_response_wrapper( + search_for_stop.list, ) diff --git a/src/onebusaway/types/__init__.py b/src/onebusaway/types/__init__.py index 5f9bda3..3d9dab0 100755 --- a/src/onebusaway/types/__init__.py +++ b/src/onebusaway/types/__init__.py @@ -10,32 +10,32 @@ from .shape_retrieve_response import ShapeRetrieveResponse as ShapeRetrieveResponse from .agency_retrieve_response import AgencyRetrieveResponse as AgencyRetrieveResponse from .config_retrieve_response import ConfigRetrieveResponse as ConfigRetrieveResponse +from .search_for_stop_list_params import SearchForStopListParams as SearchForStopListParams from .stops_for_route_list_params import StopsForRouteListParams as StopsForRouteListParams from .trip_detail_retrieve_params import TripDetailRetrieveParams as TripDetailRetrieveParams from .trips_for_route_list_params import TripsForRouteListParams as TripsForRouteListParams +from .search_for_route_list_params import SearchForRouteListParams as SearchForRouteListParams +from .search_for_stop_list_response import SearchForStopListResponse as SearchForStopListResponse from .stops_for_route_list_response import StopsForRouteListResponse as StopsForRouteListResponse from .trip_detail_retrieve_response import TripDetailRetrieveResponse as TripDetailRetrieveResponse from .trips_for_route_list_response import TripsForRouteListResponse as TripsForRouteListResponse from .current_time_retrieve_response import CurrentTimeRetrieveResponse as CurrentTimeRetrieveResponse +from .search_for_route_list_response import SearchForRouteListResponse as SearchForRouteListResponse from .stops_for_location_list_params import StopsForLocationListParams as StopsForLocationListParams from .trips_for_location_list_params import TripsForLocationListParams as TripsForLocationListParams from .routes_for_agency_list_response import RoutesForAgencyListResponse as RoutesForAgencyListResponse from .routes_for_location_list_params import RoutesForLocationListParams as RoutesForLocationListParams -from .search_for_stop_retrieve_params import SearchForStopRetrieveParams as SearchForStopRetrieveParams from .vehicles_for_agency_list_params import VehiclesForAgencyListParams as VehiclesForAgencyListParams -from .search_for_route_retrieve_params import SearchForRouteRetrieveParams as SearchForRouteRetrieveParams from .stops_for_location_list_response import StopsForLocationListResponse as StopsForLocationListResponse from .trip_for_vehicle_retrieve_params import TripForVehicleRetrieveParams as TripForVehicleRetrieveParams from .trips_for_location_list_response import TripsForLocationListResponse as TripsForLocationListResponse from .arrival_and_departure_list_params import ArrivalAndDepartureListParams as ArrivalAndDepartureListParams from .routes_for_location_list_response import RoutesForLocationListResponse as RoutesForLocationListResponse from .schedule_for_stop_retrieve_params import ScheduleForStopRetrieveParams as ScheduleForStopRetrieveParams -from .search_for_stop_retrieve_response import SearchForStopRetrieveResponse as SearchForStopRetrieveResponse from .stop_ids_for_agency_list_response import StopIDsForAgencyListResponse as StopIDsForAgencyListResponse from .vehicles_for_agency_list_response import VehiclesForAgencyListResponse as VehiclesForAgencyListResponse from .route_ids_for_agency_list_response import RouteIDsForAgencyListResponse as RouteIDsForAgencyListResponse from .schedule_for_route_retrieve_params import ScheduleForRouteRetrieveParams as ScheduleForRouteRetrieveParams -from .search_for_route_retrieve_response import SearchForRouteRetrieveResponse as SearchForRouteRetrieveResponse from .trip_for_vehicle_retrieve_response import TripForVehicleRetrieveResponse as TripForVehicleRetrieveResponse from .arrival_and_departure_list_response import ArrivalAndDepartureListResponse as ArrivalAndDepartureListResponse from .schedule_for_stop_retrieve_response import ScheduleForStopRetrieveResponse as ScheduleForStopRetrieveResponse diff --git a/src/onebusaway/types/search_for_route_list_params.py b/src/onebusaway/types/search_for_route_list_params.py new file mode 100755 index 0000000..76f767b --- /dev/null +++ b/src/onebusaway/types/search_for_route_list_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["SearchForRouteListParams"] + + +class SearchForRouteListParams(TypedDict, total=False): + input: Required[str] + """The string to search for.""" + + max_count: Annotated[int, PropertyInfo(alias="maxCount")] + """The max number of results to return. Defaults to 20.""" diff --git a/src/onebusaway/types/search_for_route_list_response.py b/src/onebusaway/types/search_for_route_list_response.py new file mode 100755 index 0000000..e54153a --- /dev/null +++ b/src/onebusaway/types/search_for_route_list_response.py @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .shared.references import References +from .shared.response_wrapper import ResponseWrapper + +__all__ = ["SearchForRouteListResponse", "SearchForRouteListResponseData", "SearchForRouteListResponseDataList"] + + +class SearchForRouteListResponseDataList(BaseModel): + id: str + + agency_id: str = FieldInfo(alias="agencyId") + + type: int + + color: Optional[str] = None + + description: Optional[str] = None + + long_name: Optional[str] = FieldInfo(alias="longName", default=None) + + null_safe_short_name: Optional[str] = FieldInfo(alias="nullSafeShortName", default=None) + + short_name: Optional[str] = FieldInfo(alias="shortName", default=None) + + text_color: Optional[str] = FieldInfo(alias="textColor", default=None) + + url: Optional[str] = None + + +class SearchForRouteListResponseData(BaseModel): + limit_exceeded: bool = FieldInfo(alias="limitExceeded") + + list: List[SearchForRouteListResponseDataList] + + out_of_range: bool = FieldInfo(alias="outOfRange") + + references: References + + +class SearchForRouteListResponse(ResponseWrapper): + data: Optional[SearchForRouteListResponseData] = None diff --git a/src/onebusaway/types/search_for_stop_list_params.py b/src/onebusaway/types/search_for_stop_list_params.py new file mode 100755 index 0000000..012f802 --- /dev/null +++ b/src/onebusaway/types/search_for_stop_list_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["SearchForStopListParams"] + + +class SearchForStopListParams(TypedDict, total=False): + input: Required[str] + """The string to search for.""" + + max_count: Annotated[int, PropertyInfo(alias="maxCount")] + """The max number of results to return. Defaults to 20.""" diff --git a/src/onebusaway/types/search_for_stop_list_response.py b/src/onebusaway/types/search_for_stop_list_response.py new file mode 100755 index 0000000..e5a4e29 --- /dev/null +++ b/src/onebusaway/types/search_for_stop_list_response.py @@ -0,0 +1,49 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .shared.references import References +from .shared.response_wrapper import ResponseWrapper + +__all__ = ["SearchForStopListResponse", "SearchForStopListResponseData", "SearchForStopListResponseDataList"] + + +class SearchForStopListResponseDataList(BaseModel): + id: str + + code: str + + lat: float + + lon: float + + name: str + + direction: Optional[str] = None + + location_type: Optional[int] = FieldInfo(alias="locationType", default=None) + + parent: Optional[str] = None + + route_ids: Optional[List[str]] = FieldInfo(alias="routeIds", default=None) + + static_route_ids: Optional[List[str]] = FieldInfo(alias="staticRouteIds", default=None) + + wheelchair_boarding: Optional[str] = FieldInfo(alias="wheelchairBoarding", default=None) + + +class SearchForStopListResponseData(BaseModel): + limit_exceeded: bool = FieldInfo(alias="limitExceeded") + + list: List[SearchForStopListResponseDataList] + + out_of_range: bool = FieldInfo(alias="outOfRange") + + references: References + + +class SearchForStopListResponse(ResponseWrapper): + data: Optional[SearchForStopListResponseData] = None diff --git a/tests/api_resources/test_search_for_route.py b/tests/api_resources/test_search_for_route.py index e598023..76114f6 100755 --- a/tests/api_resources/test_search_for_route.py +++ b/tests/api_resources/test_search_for_route.py @@ -9,7 +9,7 @@ from onebusaway import OnebusawaySDK, AsyncOnebusawaySDK from tests.utils import assert_matches_type -from onebusaway.types import SearchForRouteRetrieveResponse +from onebusaway.types import SearchForRouteListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,41 +18,41 @@ class TestSearchForRoute: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_retrieve(self, client: OnebusawaySDK) -> None: - search_for_route = client.search_for_route.retrieve( + def test_method_list(self, client: OnebusawaySDK) -> None: + search_for_route = client.search_for_route.list( input="input", ) - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) @parametrize - def test_method_retrieve_with_all_params(self, client: OnebusawaySDK) -> None: - search_for_route = client.search_for_route.retrieve( + def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: + search_for_route = client.search_for_route.list( input="input", max_count=0, ) - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) @parametrize - def test_raw_response_retrieve(self, client: OnebusawaySDK) -> None: - response = client.search_for_route.with_raw_response.retrieve( + def test_raw_response_list(self, client: OnebusawaySDK) -> None: + response = client.search_for_route.with_raw_response.list( input="input", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_route = response.parse() - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) @parametrize - def test_streaming_response_retrieve(self, client: OnebusawaySDK) -> None: - with client.search_for_route.with_streaming_response.retrieve( + def test_streaming_response_list(self, client: OnebusawaySDK) -> None: + with client.search_for_route.with_streaming_response.list( input="input", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_route = response.parse() - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -61,40 +61,40 @@ class TestAsyncSearchForRoute: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_retrieve(self, async_client: AsyncOnebusawaySDK) -> None: - search_for_route = await async_client.search_for_route.retrieve( + async def test_method_list(self, async_client: AsyncOnebusawaySDK) -> None: + search_for_route = await async_client.search_for_route.list( input="input", ) - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None: - search_for_route = await async_client.search_for_route.retrieve( + async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None: + search_for_route = await async_client.search_for_route.list( input="input", max_count=0, ) - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncOnebusawaySDK) -> None: - response = await async_client.search_for_route.with_raw_response.retrieve( + async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None: + response = await async_client.search_for_route.with_raw_response.list( input="input", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_route = await response.parse() - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncOnebusawaySDK) -> None: - async with async_client.search_for_route.with_streaming_response.retrieve( + async def test_streaming_response_list(self, async_client: AsyncOnebusawaySDK) -> None: + async with async_client.search_for_route.with_streaming_response.list( input="input", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_route = await response.parse() - assert_matches_type(SearchForRouteRetrieveResponse, search_for_route, path=["response"]) + assert_matches_type(SearchForRouteListResponse, search_for_route, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_search_for_stop.py b/tests/api_resources/test_search_for_stop.py index c2af009..bed17ea 100755 --- a/tests/api_resources/test_search_for_stop.py +++ b/tests/api_resources/test_search_for_stop.py @@ -9,7 +9,7 @@ from onebusaway import OnebusawaySDK, AsyncOnebusawaySDK from tests.utils import assert_matches_type -from onebusaway.types import SearchForStopRetrieveResponse +from onebusaway.types import SearchForStopListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,41 +18,41 @@ class TestSearchForStop: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_retrieve(self, client: OnebusawaySDK) -> None: - search_for_stop = client.search_for_stop.retrieve( + def test_method_list(self, client: OnebusawaySDK) -> None: + search_for_stop = client.search_for_stop.list( input="input", ) - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) @parametrize - def test_method_retrieve_with_all_params(self, client: OnebusawaySDK) -> None: - search_for_stop = client.search_for_stop.retrieve( + def test_method_list_with_all_params(self, client: OnebusawaySDK) -> None: + search_for_stop = client.search_for_stop.list( input="input", max_count=0, ) - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) @parametrize - def test_raw_response_retrieve(self, client: OnebusawaySDK) -> None: - response = client.search_for_stop.with_raw_response.retrieve( + def test_raw_response_list(self, client: OnebusawaySDK) -> None: + response = client.search_for_stop.with_raw_response.list( input="input", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_stop = response.parse() - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) @parametrize - def test_streaming_response_retrieve(self, client: OnebusawaySDK) -> None: - with client.search_for_stop.with_streaming_response.retrieve( + def test_streaming_response_list(self, client: OnebusawaySDK) -> None: + with client.search_for_stop.with_streaming_response.list( input="input", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_stop = response.parse() - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) assert cast(Any, response.is_closed) is True @@ -61,40 +61,40 @@ class TestAsyncSearchForStop: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_retrieve(self, async_client: AsyncOnebusawaySDK) -> None: - search_for_stop = await async_client.search_for_stop.retrieve( + async def test_method_list(self, async_client: AsyncOnebusawaySDK) -> None: + search_for_stop = await async_client.search_for_stop.list( input="input", ) - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None: - search_for_stop = await async_client.search_for_stop.retrieve( + async def test_method_list_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None: + search_for_stop = await async_client.search_for_stop.list( input="input", max_count=0, ) - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncOnebusawaySDK) -> None: - response = await async_client.search_for_stop.with_raw_response.retrieve( + async def test_raw_response_list(self, async_client: AsyncOnebusawaySDK) -> None: + response = await async_client.search_for_stop.with_raw_response.list( input="input", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_stop = await response.parse() - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncOnebusawaySDK) -> None: - async with async_client.search_for_stop.with_streaming_response.retrieve( + async def test_streaming_response_list(self, async_client: AsyncOnebusawaySDK) -> None: + async with async_client.search_for_stop.with_streaming_response.list( input="input", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" search_for_stop = await response.parse() - assert_matches_type(SearchForStopRetrieveResponse, search_for_stop, path=["response"]) + assert_matches_type(SearchForStopListResponse, search_for_stop, path=["response"]) assert cast(Any, response.is_closed) is True