2525)
2626from ._version import __version__
2727from ._streaming import Stream as Stream , AsyncStream as AsyncStream
28- from ._exceptions import APIStatusError , OneBusAwayError
28+ from ._exceptions import APIStatusError , OnebusawaySDKError
2929from ._base_client import (
3030 DEFAULT_MAX_RETRIES ,
3131 SyncAPIClient ,
3838 "ProxiesTypes" ,
3939 "RequestOptions" ,
4040 "resources" ,
41- "OneBusAway " ,
42- "AsyncOneBusAway " ,
41+ "OnebusawaySDK " ,
42+ "AsyncOnebusawaySDK " ,
4343 "Client" ,
4444 "AsyncClient" ,
4545]
4646
4747
48- class OneBusAway (SyncAPIClient ):
48+ class OnebusawaySDK (SyncAPIClient ):
4949 agencies_with_coverage : resources .AgenciesWithCoverageResource
5050 config : resources .ConfigResource
5151 current_time : resources .CurrentTimeResource
5252 stops_for_location : resources .StopsForLocationResource
5353 arrival_and_departure_for_stop : resources .ArrivalAndDepartureForStopResource
5454 arrivals_and_departures_for_stop : resources .ArrivalsAndDeparturesForStopResource
55- with_raw_response : OneBusAwayWithRawResponse
56- with_streaming_response : OneBusAwayWithStreamedResponse
55+ with_raw_response : OnebusawaySDKWithRawResponse
56+ with_streaming_response : OnebusawaySDKWithStreamedResponse
5757
5858 # client options
5959 api_key : str
@@ -81,20 +81,20 @@ def __init__(
8181 # part of our public interface in the future.
8282 _strict_response_validation : bool = False ,
8383 ) -> None :
84- """Construct a new synchronous OneBusAway client instance.
84+ """Construct a new synchronous onebusaway-sdk client instance.
8585
8686 This automatically infers the `api_key` argument from the `ONEBUSAWAY_API_KEY` environment variable if it is not provided.
8787 """
8888 if api_key is None :
8989 api_key = os .environ .get ("ONEBUSAWAY_API_KEY" )
9090 if api_key is None :
91- raise OneBusAwayError (
91+ raise OnebusawaySDKError (
9292 "The api_key client option must be set either by passing api_key to the client or by setting the ONEBUSAWAY_API_KEY environment variable"
9393 )
9494 self .api_key = api_key
9595
9696 if base_url is None :
97- base_url = os .environ .get ("ONE_BUS_AWAY_BASE_URL " )
97+ base_url = os .environ .get ("ONEBUSAWAY_SDK_BASE_URL " )
9898 if base_url is None :
9999 base_url = f"https://api.pugetsound.onebusaway.org"
100100
@@ -115,8 +115,8 @@ def __init__(
115115 self .stops_for_location = resources .StopsForLocationResource (self )
116116 self .arrival_and_departure_for_stop = resources .ArrivalAndDepartureForStopResource (self )
117117 self .arrivals_and_departures_for_stop = resources .ArrivalsAndDeparturesForStopResource (self )
118- self .with_raw_response = OneBusAwayWithRawResponse (self )
119- self .with_streaming_response = OneBusAwayWithStreamedResponse (self )
118+ self .with_raw_response = OnebusawaySDKWithRawResponse (self )
119+ self .with_streaming_response = OnebusawaySDKWithStreamedResponse (self )
120120
121121 @property
122122 @override
@@ -230,15 +230,15 @@ def _make_status_error(
230230 return APIStatusError (err_msg , response = response , body = body )
231231
232232
233- class AsyncOneBusAway (AsyncAPIClient ):
233+ class AsyncOnebusawaySDK (AsyncAPIClient ):
234234 agencies_with_coverage : resources .AsyncAgenciesWithCoverageResource
235235 config : resources .AsyncConfigResource
236236 current_time : resources .AsyncCurrentTimeResource
237237 stops_for_location : resources .AsyncStopsForLocationResource
238238 arrival_and_departure_for_stop : resources .AsyncArrivalAndDepartureForStopResource
239239 arrivals_and_departures_for_stop : resources .AsyncArrivalsAndDeparturesForStopResource
240- with_raw_response : AsyncOneBusAwayWithRawResponse
241- with_streaming_response : AsyncOneBusAwayWithStreamedResponse
240+ with_raw_response : AsyncOnebusawaySDKWithRawResponse
241+ with_streaming_response : AsyncOnebusawaySDKWithStreamedResponse
242242
243243 # client options
244244 api_key : str
@@ -266,20 +266,20 @@ def __init__(
266266 # part of our public interface in the future.
267267 _strict_response_validation : bool = False ,
268268 ) -> None :
269- """Construct a new async OneBusAway client instance.
269+ """Construct a new async onebusaway-sdk client instance.
270270
271271 This automatically infers the `api_key` argument from the `ONEBUSAWAY_API_KEY` environment variable if it is not provided.
272272 """
273273 if api_key is None :
274274 api_key = os .environ .get ("ONEBUSAWAY_API_KEY" )
275275 if api_key is None :
276- raise OneBusAwayError (
276+ raise OnebusawaySDKError (
277277 "The api_key client option must be set either by passing api_key to the client or by setting the ONEBUSAWAY_API_KEY environment variable"
278278 )
279279 self .api_key = api_key
280280
281281 if base_url is None :
282- base_url = os .environ .get ("ONE_BUS_AWAY_BASE_URL " )
282+ base_url = os .environ .get ("ONEBUSAWAY_SDK_BASE_URL " )
283283 if base_url is None :
284284 base_url = f"https://api.pugetsound.onebusaway.org"
285285
@@ -300,8 +300,8 @@ def __init__(
300300 self .stops_for_location = resources .AsyncStopsForLocationResource (self )
301301 self .arrival_and_departure_for_stop = resources .AsyncArrivalAndDepartureForStopResource (self )
302302 self .arrivals_and_departures_for_stop = resources .AsyncArrivalsAndDeparturesForStopResource (self )
303- self .with_raw_response = AsyncOneBusAwayWithRawResponse (self )
304- self .with_streaming_response = AsyncOneBusAwayWithStreamedResponse (self )
303+ self .with_raw_response = AsyncOnebusawaySDKWithRawResponse (self )
304+ self .with_streaming_response = AsyncOnebusawaySDKWithStreamedResponse (self )
305305
306306 @property
307307 @override
@@ -415,8 +415,8 @@ def _make_status_error(
415415 return APIStatusError (err_msg , response = response , body = body )
416416
417417
418- class OneBusAwayWithRawResponse :
419- def __init__ (self , client : OneBusAway ) -> None :
418+ class OnebusawaySDKWithRawResponse :
419+ def __init__ (self , client : OnebusawaySDK ) -> None :
420420 self .agencies_with_coverage = resources .AgenciesWithCoverageResourceWithRawResponse (
421421 client .agencies_with_coverage
422422 )
@@ -431,8 +431,8 @@ def __init__(self, client: OneBusAway) -> None:
431431 )
432432
433433
434- class AsyncOneBusAwayWithRawResponse :
435- def __init__ (self , client : AsyncOneBusAway ) -> None :
434+ class AsyncOnebusawaySDKWithRawResponse :
435+ def __init__ (self , client : AsyncOnebusawaySDK ) -> None :
436436 self .agencies_with_coverage = resources .AsyncAgenciesWithCoverageResourceWithRawResponse (
437437 client .agencies_with_coverage
438438 )
@@ -447,8 +447,8 @@ def __init__(self, client: AsyncOneBusAway) -> None:
447447 )
448448
449449
450- class OneBusAwayWithStreamedResponse :
451- def __init__ (self , client : OneBusAway ) -> None :
450+ class OnebusawaySDKWithStreamedResponse :
451+ def __init__ (self , client : OnebusawaySDK ) -> None :
452452 self .agencies_with_coverage = resources .AgenciesWithCoverageResourceWithStreamingResponse (
453453 client .agencies_with_coverage
454454 )
@@ -463,8 +463,8 @@ def __init__(self, client: OneBusAway) -> None:
463463 )
464464
465465
466- class AsyncOneBusAwayWithStreamedResponse :
467- def __init__ (self , client : AsyncOneBusAway ) -> None :
466+ class AsyncOnebusawaySDKWithStreamedResponse :
467+ def __init__ (self , client : AsyncOnebusawaySDK ) -> None :
468468 self .agencies_with_coverage = resources .AsyncAgenciesWithCoverageResourceWithStreamingResponse (
469469 client .agencies_with_coverage
470470 )
@@ -483,6 +483,6 @@ def __init__(self, client: AsyncOneBusAway) -> None:
483483 )
484484
485485
486- Client = OneBusAway
486+ Client = OnebusawaySDK
487487
488- AsyncClient = AsyncOneBusAway
488+ AsyncClient = AsyncOnebusawaySDK
0 commit comments