Skip to content

Commit

Permalink
Merge pull request #100 from OneBusAway/release-please--branches--mai…
Browse files Browse the repository at this point in the history
…n--changes--next

release: 0.1.0-alpha.19
  • Loading branch information
Ahmedhossamdev authored Aug 24, 2024
2 parents bb7b458 + c2f5413 commit 885c8f9
Show file tree
Hide file tree
Showing 16 changed files with 237 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.18"
".": "0.1.0-alpha.19"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.19 (2024-08-24)

Full Changelog: [v0.1.0-alpha.18...v0.1.0-alpha.19](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.18...v0.1.0-alpha.19)

### Features

* **api:** OpenAPI spec update via Stainless API ([#99](https://github.com/OneBusAway/python-sdk/issues/99)) ([e2d03b3](https://github.com/OneBusAway/python-sdk/commit/e2d03b34d459ca5954c40af72c0a8ec13ca19f7e))

## 0.1.0-alpha.18 (2024-08-20)

Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/OneBusAway/python-sdk/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
Expand Down
8 changes: 4 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,24 +274,24 @@ Methods:
Types:

```python
from onebusaway.types import SearchForStopRetrieveResponse
from onebusaway.types import SearchForStopListResponse
```

Methods:

- <code title="get /api/where/search/stop.json">client.search_for_stop.<a href="./src/onebusaway/resources/search_for_stop.py">retrieve</a>(\*\*<a href="src/onebusaway/types/search_for_stop_retrieve_params.py">params</a>) -> <a href="./src/onebusaway/types/search_for_stop_retrieve_response.py">SearchForStopRetrieveResponse</a></code>
- <code title="get /api/where/search/stop.json">client.search_for_stop.<a href="./src/onebusaway/resources/search_for_stop.py">list</a>(\*\*<a href="src/onebusaway/types/search_for_stop_list_params.py">params</a>) -> <a href="./src/onebusaway/types/search_for_stop_list_response.py">SearchForStopListResponse</a></code>

# SearchForRoute

Types:

```python
from onebusaway.types import SearchForRouteRetrieveResponse
from onebusaway.types import SearchForRouteListResponse
```

Methods:

- <code title="get /api/where/search/route.json">client.search_for_route.<a href="./src/onebusaway/resources/search_for_route.py">retrieve</a>(\*\*<a href="src/onebusaway/types/search_for_route_retrieve_params.py">params</a>) -> <a href="./src/onebusaway/types/search_for_route_retrieve_response.py">SearchForRouteRetrieveResponse</a></code>
- <code title="get /api/where/search/route.json">client.search_for_route.<a href="./src/onebusaway/resources/search_for_route.py">list</a>(\*\*<a href="src/onebusaway/types/search_for_route_list_params.py">params</a>) -> <a href="./src/onebusaway/types/search_for_route_list_response.py">SearchForRouteListResponse</a></code>

# Block

Expand Down
2 changes: 1 addition & 1 deletion examples/search_for_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
search_input = "crystal"

# Retrieve the search results.
response = oba.search_for_route.retrieve(input=search_input)
response = oba.search_for_route.list(input=search_input)

print(response.data)
2 changes: 1 addition & 1 deletion examples/search_for_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
search_input = "crystal"

# Retrieve the search results.
response = oba.search_for_stop.retrieve(input=search_input, max_count=5)
response = oba.search_for_stop.list(input=search_input, max_count=5)

print(response.data)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "onebusaway"
version = "0.1.0-alpha.18"
version = "0.1.0-alpha.19"
description = "The official Python library for the onebusaway-sdk API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/onebusaway/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "onebusaway"
__version__ = "0.1.0-alpha.18" # x-release-please-version
__version__ = "0.1.0-alpha.19" # x-release-please-version
36 changes: 18 additions & 18 deletions src/onebusaway/resources/search_for_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"]

Expand All @@ -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,
Expand All @@ -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.
Expand Down Expand Up @@ -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,
)


Expand All @@ -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,
Expand All @@ -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.
Expand Down Expand Up @@ -129,44 +129,44 @@ 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,
)


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,
)


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,
)


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,
)


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,
)
36 changes: 18 additions & 18 deletions src/onebusaway/resources/search_for_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"]

Expand All @@ -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,
Expand All @@ -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.
Expand Down Expand Up @@ -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,
)


Expand All @@ -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,
Expand All @@ -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.
Expand Down Expand Up @@ -129,44 +129,44 @@ 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,
)


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,
)


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,
)


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,
)


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,
)
8 changes: 4 additions & 4 deletions src/onebusaway/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions src/onebusaway/types/search_for_route_list_params.py
Original file line number Diff line number Diff line change
@@ -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."""
Loading

0 comments on commit 885c8f9

Please sign in to comment.