Update API specifications with fern api update (#2951)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -7,8 +7,16 @@ from .http_client import AsyncHttpClient
|
||||
|
||||
|
||||
class BaseClientWrapper:
|
||||
def __init__(self, *, api_key: typing.Optional[str] = None, base_url: str, timeout: typing.Optional[float] = None):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
api_key: typing.Optional[str] = None,
|
||||
x_api_key: str,
|
||||
base_url: str,
|
||||
timeout: typing.Optional[float] = None,
|
||||
):
|
||||
self._api_key = api_key
|
||||
self.x_api_key = x_api_key
|
||||
self._base_url = base_url
|
||||
self._timeout = timeout
|
||||
|
||||
@@ -16,10 +24,11 @@ class BaseClientWrapper:
|
||||
headers: typing.Dict[str, str] = {
|
||||
"X-Fern-Language": "Python",
|
||||
"X-Fern-SDK-Name": "skyvern",
|
||||
"X-Fern-SDK-Version": "0.1.86",
|
||||
"X-Fern-SDK-Version": "0.2.2",
|
||||
}
|
||||
if self._api_key is not None:
|
||||
headers["x-api-key"] = self._api_key
|
||||
headers["x-api-key"] = self.x_api_key
|
||||
return headers
|
||||
|
||||
def get_base_url(self) -> str:
|
||||
@@ -34,11 +43,12 @@ class SyncClientWrapper(BaseClientWrapper):
|
||||
self,
|
||||
*,
|
||||
api_key: typing.Optional[str] = None,
|
||||
x_api_key: str,
|
||||
base_url: str,
|
||||
timeout: typing.Optional[float] = None,
|
||||
httpx_client: httpx.Client,
|
||||
):
|
||||
super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
|
||||
super().__init__(api_key=api_key, x_api_key=x_api_key, base_url=base_url, timeout=timeout)
|
||||
self.httpx_client = HttpClient(
|
||||
httpx_client=httpx_client,
|
||||
base_headers=self.get_headers,
|
||||
@@ -52,11 +62,12 @@ class AsyncClientWrapper(BaseClientWrapper):
|
||||
self,
|
||||
*,
|
||||
api_key: typing.Optional[str] = None,
|
||||
x_api_key: str,
|
||||
base_url: str,
|
||||
timeout: typing.Optional[float] = None,
|
||||
httpx_client: httpx.AsyncClient,
|
||||
):
|
||||
super().__init__(api_key=api_key, base_url=base_url, timeout=timeout)
|
||||
super().__init__(api_key=api_key, x_api_key=x_api_key, base_url=base_url, timeout=timeout)
|
||||
self.httpx_client = AsyncHttpClient(
|
||||
httpx_client=httpx_client,
|
||||
base_headers=self.get_headers,
|
||||
|
||||
Reference in New Issue
Block a user