Skip to content

Commit

Permalink
feat(api): update via SDK Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Jun 19, 2024
1 parent db3e659 commit 0809c44
Show file tree
Hide file tree
Showing 14 changed files with 221 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 6
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-27b1f9e5b37005e5040a5dd1be219f28a16f7e3a334e1b7919766b12fe34b33b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-de59b04e05ad7bd97ac268e9768eeb75370b6411c79fb4f129ea91aec14dd371.yml
12 changes: 6 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ from onebusaway.types import ResponseWrapper
Types:

```python
from onebusaway.types import AgenciesWithCoverageListResponse
from onebusaway.types import AgenciesWithCoverageRetrieveResponse
```

Methods:

- <code title="get /api/where/agencies-with-coverage.json">client.agencies_with_coverage.<a href="./src/onebusaway/resources/agencies_with_coverage.py">list</a>() -> <a href="./src/onebusaway/types/agencies_with_coverage_list_response.py">AgenciesWithCoverageListResponse</a></code>
- <code title="get /api/where/agencies-with-coverage.json">client.agencies_with_coverage.<a href="./src/onebusaway/resources/agencies_with_coverage.py">retrieve</a>() -> <a href="./src/onebusaway/types/agencies_with_coverage_retrieve_response.py">AgenciesWithCoverageRetrieveResponse</a></code>

# Config

Expand Down Expand Up @@ -45,12 +45,12 @@ Methods:
Types:

```python
from onebusaway.types import StopsForLocationListResponse
from onebusaway.types import StopsForLocationRetrieveResponse
```

Methods:

- <code title="get /api/where/stops-for-location.json">client.stops_for_location.<a href="./src/onebusaway/resources/stops_for_location.py">list</a>(\*\*<a href="src/onebusaway/types/stops_for_location_list_params.py">params</a>) -> <a href="./src/onebusaway/types/stops_for_location_list_response.py">StopsForLocationListResponse</a></code>
- <code title="get /api/where/stops-for-location.json">client.stops_for_location.<a href="./src/onebusaway/resources/stops_for_location.py">retrieve</a>(\*\*<a href="src/onebusaway/types/stops_for_location_retrieve_params.py">params</a>) -> <a href="./src/onebusaway/types/stops_for_location_retrieve_response.py">StopsForLocationRetrieveResponse</a></code>

# ArrivalAndDepartureForStop

Expand All @@ -69,9 +69,9 @@ Methods:
Types:

```python
from onebusaway.types import ArrivalsAndDeparturesForStopListResponse
from onebusaway.types import ArrivalsAndDeparturesForStopRetrieveResponse
```

Methods:

- <code title="get /api/where/arrivals-and-departures-for-stop/{stopID}.json">client.arrivals_and_departures_for_stop.<a href="./src/onebusaway/resources/arrivals_and_departures_for_stop.py">list</a>(stop_id) -> <a href="./src/onebusaway/types/arrivals_and_departures_for_stop_list_response.py">ArrivalsAndDeparturesForStopListResponse</a></code>
- <code title="get /api/where/arrivals-and-departures-for-stop/{stopID}.json">client.arrivals_and_departures_for_stop.<a href="./src/onebusaway/resources/arrivals_and_departures_for_stop.py">retrieve</a>(stop_id) -> <a href="./src/onebusaway/types/arrivals_and_departures_for_stop_retrieve_response.py">ArrivalsAndDeparturesForStopRetrieveResponse</a></code>
4 changes: 2 additions & 2 deletions src/onebusaway/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def __init__(
@property
@override
def qs(self) -> Querystring:
return Querystring(array_format="comma")
return Querystring(array_format="repeat")

@property
def auth_headers(self) -> httpx.Auth:
Expand Down Expand Up @@ -306,7 +306,7 @@ def __init__(
@property
@override
def qs(self) -> Querystring:
return Querystring(array_format="comma")
return Querystring(array_format="repeat")

@property
def auth_headers(self) -> httpx.Auth:
Expand Down
30 changes: 15 additions & 15 deletions src/onebusaway/resources/agencies_with_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .._base_client import (
make_request_options,
)
from ..types.agencies_with_coverage_list_response import AgenciesWithCoverageListResponse
from ..types.agencies_with_coverage_retrieve_response import AgenciesWithCoverageRetrieveResponse

__all__ = ["AgenciesWithCoverageResource", "AsyncAgenciesWithCoverageResource"]

Expand All @@ -30,7 +30,7 @@ def with_raw_response(self) -> AgenciesWithCoverageResourceWithRawResponse:
def with_streaming_response(self) -> AgenciesWithCoverageResourceWithStreamingResponse:
return AgenciesWithCoverageResourceWithStreamingResponse(self)

def list(
def retrieve(
self,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -39,14 +39,14 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AgenciesWithCoverageListResponse:
) -> AgenciesWithCoverageRetrieveResponse:
"""Retrieve Agencies with Coverage"""
return self._get(
"/api/where/agencies-with-coverage.json",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AgenciesWithCoverageListResponse,
cast_to=AgenciesWithCoverageRetrieveResponse,
)


Expand All @@ -59,7 +59,7 @@ def with_raw_response(self) -> AsyncAgenciesWithCoverageResourceWithRawResponse:
def with_streaming_response(self) -> AsyncAgenciesWithCoverageResourceWithStreamingResponse:
return AsyncAgenciesWithCoverageResourceWithStreamingResponse(self)

async def list(
async def retrieve(
self,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -68,48 +68,48 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AgenciesWithCoverageListResponse:
) -> AgenciesWithCoverageRetrieveResponse:
"""Retrieve Agencies with Coverage"""
return await self._get(
"/api/where/agencies-with-coverage.json",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AgenciesWithCoverageListResponse,
cast_to=AgenciesWithCoverageRetrieveResponse,
)


class AgenciesWithCoverageResourceWithRawResponse:
def __init__(self, agencies_with_coverage: AgenciesWithCoverageResource) -> None:
self._agencies_with_coverage = agencies_with_coverage

self.list = to_raw_response_wrapper(
agencies_with_coverage.list,
self.retrieve = to_raw_response_wrapper(
agencies_with_coverage.retrieve,
)


class AsyncAgenciesWithCoverageResourceWithRawResponse:
def __init__(self, agencies_with_coverage: AsyncAgenciesWithCoverageResource) -> None:
self._agencies_with_coverage = agencies_with_coverage

self.list = async_to_raw_response_wrapper(
agencies_with_coverage.list,
self.retrieve = async_to_raw_response_wrapper(
agencies_with_coverage.retrieve,
)


class AgenciesWithCoverageResourceWithStreamingResponse:
def __init__(self, agencies_with_coverage: AgenciesWithCoverageResource) -> None:
self._agencies_with_coverage = agencies_with_coverage

self.list = to_streamed_response_wrapper(
agencies_with_coverage.list,
self.retrieve = to_streamed_response_wrapper(
agencies_with_coverage.retrieve,
)


class AsyncAgenciesWithCoverageResourceWithStreamingResponse:
def __init__(self, agencies_with_coverage: AsyncAgenciesWithCoverageResource) -> None:
self._agencies_with_coverage = agencies_with_coverage

self.list = async_to_streamed_response_wrapper(
agencies_with_coverage.list,
self.retrieve = async_to_streamed_response_wrapper(
agencies_with_coverage.retrieve,
)
34 changes: 17 additions & 17 deletions src/onebusaway/resources/arrivals_and_departures_for_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .._base_client import (
make_request_options,
)
from ..types.arrivals_and_departures_for_stop_list_response import ArrivalsAndDeparturesForStopListResponse
from ..types.arrivals_and_departures_for_stop_retrieve_response import ArrivalsAndDeparturesForStopRetrieveResponse

__all__ = ["ArrivalsAndDeparturesForStopResource", "AsyncArrivalsAndDeparturesForStopResource"]

Expand All @@ -30,7 +30,7 @@ def with_raw_response(self) -> ArrivalsAndDeparturesForStopResourceWithRawRespon
def with_streaming_response(self) -> ArrivalsAndDeparturesForStopResourceWithStreamingResponse:
return ArrivalsAndDeparturesForStopResourceWithStreamingResponse(self)

def list(
def retrieve(
self,
stop_id: str,
*,
Expand All @@ -40,9 +40,9 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ArrivalsAndDeparturesForStopListResponse:
) -> ArrivalsAndDeparturesForStopRetrieveResponse:
"""
arrival-and-departure-for-stop
arrivals-and-departures-for-stop
Args:
extra_headers: Send extra headers
Expand All @@ -60,7 +60,7 @@ def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ArrivalsAndDeparturesForStopListResponse,
cast_to=ArrivalsAndDeparturesForStopRetrieveResponse,
)


Expand All @@ -73,7 +73,7 @@ def with_raw_response(self) -> AsyncArrivalsAndDeparturesForStopResourceWithRawR
def with_streaming_response(self) -> AsyncArrivalsAndDeparturesForStopResourceWithStreamingResponse:
return AsyncArrivalsAndDeparturesForStopResourceWithStreamingResponse(self)

async def list(
async def retrieve(
self,
stop_id: str,
*,
Expand All @@ -83,9 +83,9 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> ArrivalsAndDeparturesForStopListResponse:
) -> ArrivalsAndDeparturesForStopRetrieveResponse:
"""
arrival-and-departure-for-stop
arrivals-and-departures-for-stop
Args:
extra_headers: Send extra headers
Expand All @@ -103,41 +103,41 @@ async def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ArrivalsAndDeparturesForStopListResponse,
cast_to=ArrivalsAndDeparturesForStopRetrieveResponse,
)


class ArrivalsAndDeparturesForStopResourceWithRawResponse:
def __init__(self, arrivals_and_departures_for_stop: ArrivalsAndDeparturesForStopResource) -> None:
self._arrivals_and_departures_for_stop = arrivals_and_departures_for_stop

self.list = to_raw_response_wrapper(
arrivals_and_departures_for_stop.list,
self.retrieve = to_raw_response_wrapper(
arrivals_and_departures_for_stop.retrieve,
)


class AsyncArrivalsAndDeparturesForStopResourceWithRawResponse:
def __init__(self, arrivals_and_departures_for_stop: AsyncArrivalsAndDeparturesForStopResource) -> None:
self._arrivals_and_departures_for_stop = arrivals_and_departures_for_stop

self.list = async_to_raw_response_wrapper(
arrivals_and_departures_for_stop.list,
self.retrieve = async_to_raw_response_wrapper(
arrivals_and_departures_for_stop.retrieve,
)


class ArrivalsAndDeparturesForStopResourceWithStreamingResponse:
def __init__(self, arrivals_and_departures_for_stop: ArrivalsAndDeparturesForStopResource) -> None:
self._arrivals_and_departures_for_stop = arrivals_and_departures_for_stop

self.list = to_streamed_response_wrapper(
arrivals_and_departures_for_stop.list,
self.retrieve = to_streamed_response_wrapper(
arrivals_and_departures_for_stop.retrieve,
)


class AsyncArrivalsAndDeparturesForStopResourceWithStreamingResponse:
def __init__(self, arrivals_and_departures_for_stop: AsyncArrivalsAndDeparturesForStopResource) -> None:
self._arrivals_and_departures_for_stop = arrivals_and_departures_for_stop

self.list = async_to_streamed_response_wrapper(
arrivals_and_departures_for_stop.list,
self.retrieve = async_to_streamed_response_wrapper(
arrivals_and_departures_for_stop.retrieve,
)
36 changes: 18 additions & 18 deletions src/onebusaway/resources/stops_for_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import httpx

from ..types import stops_for_location_list_params
from ..types import stops_for_location_retrieve_params
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._utils import (
maybe_transform,
Expand All @@ -21,7 +21,7 @@
from .._base_client import (
make_request_options,
)
from ..types.stops_for_location_list_response import StopsForLocationListResponse
from ..types.stops_for_location_retrieve_response import StopsForLocationRetrieveResponse

__all__ = ["StopsForLocationResource", "AsyncStopsForLocationResource"]

Expand All @@ -35,7 +35,7 @@ def with_raw_response(self) -> StopsForLocationResourceWithRawResponse:
def with_streaming_response(self) -> StopsForLocationResourceWithStreamingResponse:
return StopsForLocationResourceWithStreamingResponse(self)

def list(
def retrieve(
self,
*,
key: str,
Expand All @@ -47,7 +47,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> StopsForLocationListResponse:
) -> StopsForLocationRetrieveResponse:
"""
stops-for-location
Expand All @@ -73,10 +73,10 @@ def list(
"lat": lat,
"lon": lon,
},
stops_for_location_list_params.StopsForLocationListParams,
stops_for_location_retrieve_params.StopsForLocationRetrieveParams,
),
),
cast_to=StopsForLocationListResponse,
cast_to=StopsForLocationRetrieveResponse,
)


Expand All @@ -89,7 +89,7 @@ def with_raw_response(self) -> AsyncStopsForLocationResourceWithRawResponse:
def with_streaming_response(self) -> AsyncStopsForLocationResourceWithStreamingResponse:
return AsyncStopsForLocationResourceWithStreamingResponse(self)

async def list(
async def retrieve(
self,
*,
key: str,
Expand All @@ -101,7 +101,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> StopsForLocationListResponse:
) -> StopsForLocationRetrieveResponse:
"""
stops-for-location
Expand All @@ -127,44 +127,44 @@ async def list(
"lat": lat,
"lon": lon,
},
stops_for_location_list_params.StopsForLocationListParams,
stops_for_location_retrieve_params.StopsForLocationRetrieveParams,
),
),
cast_to=StopsForLocationListResponse,
cast_to=StopsForLocationRetrieveResponse,
)


class StopsForLocationResourceWithRawResponse:
def __init__(self, stops_for_location: StopsForLocationResource) -> None:
self._stops_for_location = stops_for_location

self.list = to_raw_response_wrapper(
stops_for_location.list,
self.retrieve = to_raw_response_wrapper(
stops_for_location.retrieve,
)


class AsyncStopsForLocationResourceWithRawResponse:
def __init__(self, stops_for_location: AsyncStopsForLocationResource) -> None:
self._stops_for_location = stops_for_location

self.list = async_to_raw_response_wrapper(
stops_for_location.list,
self.retrieve = async_to_raw_response_wrapper(
stops_for_location.retrieve,
)


class StopsForLocationResourceWithStreamingResponse:
def __init__(self, stops_for_location: StopsForLocationResource) -> None:
self._stops_for_location = stops_for_location

self.list = to_streamed_response_wrapper(
stops_for_location.list,
self.retrieve = to_streamed_response_wrapper(
stops_for_location.retrieve,
)


class AsyncStopsForLocationResourceWithStreamingResponse:
def __init__(self, stops_for_location: AsyncStopsForLocationResource) -> None:
self._stops_for_location = stops_for_location

self.list = async_to_streamed_response_wrapper(
stops_for_location.list,
self.retrieve = async_to_streamed_response_wrapper(
stops_for_location.retrieve,
)
Loading

0 comments on commit 0809c44

Please sign in to comment.