@@ -42,12 +42,12 @@ class Isaacus(SyncAPIClient):
4242 with_streaming_response : IsaacusWithStreamedResponse
4343
4444 # client options
45- bearer_token : str
45+ api_key : str
4646
4747 def __init__ (
4848 self ,
4949 * ,
50- bearer_token : str | None = None ,
50+ api_key : str | None = None ,
5151 base_url : str | httpx .URL | None = None ,
5252 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
5353 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -69,15 +69,15 @@ def __init__(
6969 ) -> None :
7070 """Construct a new synchronous isaacus client instance.
7171
72- This automatically infers the `bearer_token ` argument from the `ISAACUS_API_KEY` environment variable if it is not provided.
72+ This automatically infers the `api_key ` argument from the `ISAACUS_API_KEY` environment variable if it is not provided.
7373 """
74- if bearer_token is None :
75- bearer_token = os .environ .get ("ISAACUS_API_KEY" )
76- if bearer_token is None :
74+ if api_key is None :
75+ api_key = os .environ .get ("ISAACUS_API_KEY" )
76+ if api_key is None :
7777 raise IsaacusError (
78- "The bearer_token client option must be set either by passing bearer_token to the client or by setting the ISAACUS_API_KEY environment variable"
78+ "The api_key client option must be set either by passing api_key to the client or by setting the ISAACUS_API_KEY environment variable"
7979 )
80- self .bearer_token = bearer_token
80+ self .api_key = api_key
8181
8282 if base_url is None :
8383 base_url = os .environ .get ("ISAACUS_BASE_URL" )
@@ -107,8 +107,8 @@ def qs(self) -> Querystring:
107107 @property
108108 @override
109109 def auth_headers (self ) -> dict [str , str ]:
110- bearer_token = self .bearer_token
111- return {"Authorization" : f"Bearer { bearer_token } " }
110+ api_key = self .api_key
111+ return {"Authorization" : f"Bearer { api_key } " }
112112
113113 @property
114114 @override
@@ -122,7 +122,7 @@ def default_headers(self) -> dict[str, str | Omit]:
122122 def copy (
123123 self ,
124124 * ,
125- bearer_token : str | None = None ,
125+ api_key : str | None = None ,
126126 base_url : str | httpx .URL | None = None ,
127127 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
128128 http_client : httpx .Client | None = None ,
@@ -156,7 +156,7 @@ def copy(
156156
157157 http_client = http_client or self ._client
158158 return self .__class__ (
159- bearer_token = bearer_token or self .bearer_token ,
159+ api_key = api_key or self .api_key ,
160160 base_url = base_url or self .base_url ,
161161 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
162162 http_client = http_client ,
@@ -210,12 +210,12 @@ class AsyncIsaacus(AsyncAPIClient):
210210 with_streaming_response : AsyncIsaacusWithStreamedResponse
211211
212212 # client options
213- bearer_token : str
213+ api_key : str
214214
215215 def __init__ (
216216 self ,
217217 * ,
218- bearer_token : str | None = None ,
218+ api_key : str | None = None ,
219219 base_url : str | httpx .URL | None = None ,
220220 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
221221 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -237,15 +237,15 @@ def __init__(
237237 ) -> None :
238238 """Construct a new async isaacus client instance.
239239
240- This automatically infers the `bearer_token ` argument from the `ISAACUS_API_KEY` environment variable if it is not provided.
240+ This automatically infers the `api_key ` argument from the `ISAACUS_API_KEY` environment variable if it is not provided.
241241 """
242- if bearer_token is None :
243- bearer_token = os .environ .get ("ISAACUS_API_KEY" )
244- if bearer_token is None :
242+ if api_key is None :
243+ api_key = os .environ .get ("ISAACUS_API_KEY" )
244+ if api_key is None :
245245 raise IsaacusError (
246- "The bearer_token client option must be set either by passing bearer_token to the client or by setting the ISAACUS_API_KEY environment variable"
246+ "The api_key client option must be set either by passing api_key to the client or by setting the ISAACUS_API_KEY environment variable"
247247 )
248- self .bearer_token = bearer_token
248+ self .api_key = api_key
249249
250250 if base_url is None :
251251 base_url = os .environ .get ("ISAACUS_BASE_URL" )
@@ -275,8 +275,8 @@ def qs(self) -> Querystring:
275275 @property
276276 @override
277277 def auth_headers (self ) -> dict [str , str ]:
278- bearer_token = self .bearer_token
279- return {"Authorization" : f"Bearer { bearer_token } " }
278+ api_key = self .api_key
279+ return {"Authorization" : f"Bearer { api_key } " }
280280
281281 @property
282282 @override
@@ -290,7 +290,7 @@ def default_headers(self) -> dict[str, str | Omit]:
290290 def copy (
291291 self ,
292292 * ,
293- bearer_token : str | None = None ,
293+ api_key : str | None = None ,
294294 base_url : str | httpx .URL | None = None ,
295295 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
296296 http_client : httpx .AsyncClient | None = None ,
@@ -324,7 +324,7 @@ def copy(
324324
325325 http_client = http_client or self ._client
326326 return self .__class__ (
327- bearer_token = bearer_token or self .bearer_token ,
327+ api_key = api_key or self .api_key ,
328328 base_url = base_url or self .base_url ,
329329 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
330330 http_client = http_client ,
0 commit comments