Skip to content

Commit d60f5d7

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#34)
1 parent a9cd996 commit d60f5d7

4 files changed

Lines changed: 8 additions & 28 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 17
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-160e2615de51b1febaeb9f4a2fbbb7e70939e1ebec74946e7ec1e026868fed7e.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-912f1aea248013c509e8c8dc1021bbe3d421d4ff8f46773c4a93a48995146eba.yml

src/onebusaway/resources/stops_for_location.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def with_streaming_response(self) -> StopsForLocationResourceWithStreamingRespon
3636
def retrieve(
3737
self,
3838
*,
39-
key: str,
4039
lat: float | NotGiven = NOT_GIVEN,
4140
lon: float | NotGiven = NOT_GIVEN,
4241
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -67,7 +66,6 @@ def retrieve(
6766
timeout=timeout,
6867
query=maybe_transform(
6968
{
70-
"key": key,
7169
"lat": lat,
7270
"lon": lon,
7371
},
@@ -90,7 +88,6 @@ def with_streaming_response(self) -> AsyncStopsForLocationResourceWithStreamingR
9088
async def retrieve(
9189
self,
9290
*,
93-
key: str,
9491
lat: float | NotGiven = NOT_GIVEN,
9592
lon: float | NotGiven = NOT_GIVEN,
9693
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -121,7 +118,6 @@ async def retrieve(
121118
timeout=timeout,
122119
query=await async_maybe_transform(
123120
{
124-
"key": key,
125121
"lat": lat,
126122
"lon": lon,
127123
},

src/onebusaway/types/stops_for_location_retrieve_params.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, TypedDict
5+
from typing_extensions import TypedDict
66

77
__all__ = ["StopsForLocationRetrieveParams"]
88

99

1010
class StopsForLocationRetrieveParams(TypedDict, total=False):
11-
key: Required[str]
12-
1311
lat: float
1412

1513
lon: float

tests/api_resources/test_stops_for_location.py

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,20 @@ class TestStopsForLocation:
1919

2020
@parametrize
2121
def test_method_retrieve(self, client: OnebusawaySDK) -> None:
22-
stops_for_location = client.stops_for_location.retrieve(
23-
key="key",
24-
)
22+
stops_for_location = client.stops_for_location.retrieve()
2523
assert_matches_type(StopsForLocationRetrieveResponse, stops_for_location, path=["response"])
2624

2725
@parametrize
2826
def test_method_retrieve_with_all_params(self, client: OnebusawaySDK) -> None:
2927
stops_for_location = client.stops_for_location.retrieve(
30-
key="key",
3128
lat=0,
3229
lon=0,
3330
)
3431
assert_matches_type(StopsForLocationRetrieveResponse, stops_for_location, path=["response"])
3532

3633
@parametrize
3734
def test_raw_response_retrieve(self, client: OnebusawaySDK) -> None:
38-
response = client.stops_for_location.with_raw_response.retrieve(
39-
key="key",
40-
)
35+
response = client.stops_for_location.with_raw_response.retrieve()
4136

4237
assert response.is_closed is True
4338
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -46,9 +41,7 @@ def test_raw_response_retrieve(self, client: OnebusawaySDK) -> None:
4641

4742
@parametrize
4843
def test_streaming_response_retrieve(self, client: OnebusawaySDK) -> None:
49-
with client.stops_for_location.with_streaming_response.retrieve(
50-
key="key",
51-
) as response:
44+
with client.stops_for_location.with_streaming_response.retrieve() as response:
5245
assert not response.is_closed
5346
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
5447

@@ -63,25 +56,20 @@ class TestAsyncStopsForLocation:
6356

6457
@parametrize
6558
async def test_method_retrieve(self, async_client: AsyncOnebusawaySDK) -> None:
66-
stops_for_location = await async_client.stops_for_location.retrieve(
67-
key="key",
68-
)
59+
stops_for_location = await async_client.stops_for_location.retrieve()
6960
assert_matches_type(StopsForLocationRetrieveResponse, stops_for_location, path=["response"])
7061

7162
@parametrize
7263
async def test_method_retrieve_with_all_params(self, async_client: AsyncOnebusawaySDK) -> None:
7364
stops_for_location = await async_client.stops_for_location.retrieve(
74-
key="key",
7565
lat=0,
7666
lon=0,
7767
)
7868
assert_matches_type(StopsForLocationRetrieveResponse, stops_for_location, path=["response"])
7969

8070
@parametrize
8171
async def test_raw_response_retrieve(self, async_client: AsyncOnebusawaySDK) -> None:
82-
response = await async_client.stops_for_location.with_raw_response.retrieve(
83-
key="key",
84-
)
72+
response = await async_client.stops_for_location.with_raw_response.retrieve()
8573

8674
assert response.is_closed is True
8775
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -90,9 +78,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOnebusawaySDK) ->
9078

9179
@parametrize
9280
async def test_streaming_response_retrieve(self, async_client: AsyncOnebusawaySDK) -> None:
93-
async with async_client.stops_for_location.with_streaming_response.retrieve(
94-
key="key",
95-
) as response:
81+
async with async_client.stops_for_location.with_streaming_response.retrieve() as response:
9682
assert not response.is_closed
9783
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
9884

0 commit comments

Comments
 (0)