-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from OneBusAway/release-please--branches--main…
…--changes--next release: 0.1.0-alpha.3
- Loading branch information
Showing
15 changed files
with
357 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.1.0-alpha.2" | ||
".": "0.1.0-alpha.3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 13 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-6c051801071707e025c582891048beeb3c06d10d13c852f8401a71604b81ac5d.yml | ||
configured_endpoints: 14 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-44ff52d3676ae12480b775507fe3af8a229d94d6490297ad319f4e37ffef437d.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
|
||
import onebusaway | ||
|
||
|
||
def main_sync() -> None: | ||
client = onebusaway.OnebusawaySDK(api_key="TEST") | ||
stop = client.stop.retrieve("1_75403") | ||
|
||
if stop.data and stop.data.entry: | ||
print(stop.data.entry) | ||
else: | ||
print("stop not found") | ||
|
||
if __name__ == "__main__": | ||
main_sync() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" | |
|
||
# Run prism mock on the given spec | ||
if [ "$1" == "--daemon" ]; then | ||
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log & | ||
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL" &> .prism.log & | ||
|
||
# Wait for server to come online | ||
echo -n "Waiting for server" | ||
|
@@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then | |
|
||
echo | ||
else | ||
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" | ||
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.2" # x-release-please-version | ||
__version__ = "0.1.0-alpha.3" # x-release-please-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
import httpx | ||
|
||
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven | ||
from .._compat import cached_property | ||
from .._resource import SyncAPIResource, AsyncAPIResource | ||
from .._response import ( | ||
to_raw_response_wrapper, | ||
to_streamed_response_wrapper, | ||
async_to_raw_response_wrapper, | ||
async_to_streamed_response_wrapper, | ||
) | ||
from .._base_client import make_request_options | ||
from ..types.stop_retrieve_response import StopRetrieveResponse | ||
|
||
__all__ = ["StopResource", "AsyncStopResource"] | ||
|
||
|
||
class StopResource(SyncAPIResource): | ||
@cached_property | ||
def with_raw_response(self) -> StopResourceWithRawResponse: | ||
return StopResourceWithRawResponse(self) | ||
|
||
@cached_property | ||
def with_streaming_response(self) -> StopResourceWithStreamingResponse: | ||
return StopResourceWithStreamingResponse(self) | ||
|
||
def retrieve( | ||
self, | ||
stop_id: str, | ||
*, | ||
# 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. | ||
extra_headers: Headers | None = None, | ||
extra_query: Query | None = None, | ||
extra_body: Body | None = None, | ||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, | ||
) -> StopRetrieveResponse: | ||
""" | ||
Get details of a specific stop | ||
Args: | ||
extra_headers: Send extra headers | ||
extra_query: Add additional query parameters to the request | ||
extra_body: Add additional JSON properties to the request | ||
timeout: Override the client-level default timeout for this request, in seconds | ||
""" | ||
if not stop_id: | ||
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}") | ||
return self._get( | ||
f"/api/where/stop/{stop_id}.json", | ||
options=make_request_options( | ||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout | ||
), | ||
cast_to=StopRetrieveResponse, | ||
) | ||
|
||
|
||
class AsyncStopResource(AsyncAPIResource): | ||
@cached_property | ||
def with_raw_response(self) -> AsyncStopResourceWithRawResponse: | ||
return AsyncStopResourceWithRawResponse(self) | ||
|
||
@cached_property | ||
def with_streaming_response(self) -> AsyncStopResourceWithStreamingResponse: | ||
return AsyncStopResourceWithStreamingResponse(self) | ||
|
||
async def retrieve( | ||
self, | ||
stop_id: str, | ||
*, | ||
# 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. | ||
extra_headers: Headers | None = None, | ||
extra_query: Query | None = None, | ||
extra_body: Body | None = None, | ||
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, | ||
) -> StopRetrieveResponse: | ||
""" | ||
Get details of a specific stop | ||
Args: | ||
extra_headers: Send extra headers | ||
extra_query: Add additional query parameters to the request | ||
extra_body: Add additional JSON properties to the request | ||
timeout: Override the client-level default timeout for this request, in seconds | ||
""" | ||
if not stop_id: | ||
raise ValueError(f"Expected a non-empty value for `stop_id` but received {stop_id!r}") | ||
return await self._get( | ||
f"/api/where/stop/{stop_id}.json", | ||
options=make_request_options( | ||
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout | ||
), | ||
cast_to=StopRetrieveResponse, | ||
) | ||
|
||
|
||
class StopResourceWithRawResponse: | ||
def __init__(self, stop: StopResource) -> None: | ||
self._stop = stop | ||
|
||
self.retrieve = to_raw_response_wrapper( | ||
stop.retrieve, | ||
) | ||
|
||
|
||
class AsyncStopResourceWithRawResponse: | ||
def __init__(self, stop: AsyncStopResource) -> None: | ||
self._stop = stop | ||
|
||
self.retrieve = async_to_raw_response_wrapper( | ||
stop.retrieve, | ||
) | ||
|
||
|
||
class StopResourceWithStreamingResponse: | ||
def __init__(self, stop: StopResource) -> None: | ||
self._stop = stop | ||
|
||
self.retrieve = to_streamed_response_wrapper( | ||
stop.retrieve, | ||
) | ||
|
||
|
||
class AsyncStopResourceWithStreamingResponse: | ||
def __init__(self, stop: AsyncStopResource) -> None: | ||
self._stop = stop | ||
|
||
self.retrieve = async_to_streamed_response_wrapper( | ||
stop.retrieve, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.