Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99aefa0cda |
@ -35,10 +35,12 @@ class Client:
|
|||||||
base_url: str = "/",
|
base_url: str = "/",
|
||||||
lang: str = "en-US",
|
lang: str = "en-US",
|
||||||
auth_store: BaseAuthStore | None = None,
|
auth_store: BaseAuthStore | None = None,
|
||||||
|
timeout: float = 120,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.base_url = base_url
|
self.base_url = base_url
|
||||||
self.lang = lang
|
self.lang = lang
|
||||||
self.auth_store = auth_store or BaseAuthStore() # LocalAuthStore()
|
self.auth_store = auth_store or BaseAuthStore() # LocalAuthStore()
|
||||||
|
self.timeout = timeout
|
||||||
# services
|
# services
|
||||||
self.admins = AdminService(self)
|
self.admins = AdminService(self)
|
||||||
self.collections = CollectionService(self)
|
self.collections = CollectionService(self)
|
||||||
@ -94,7 +96,7 @@ class Client:
|
|||||||
json=body,
|
json=body,
|
||||||
data=data,
|
data=data,
|
||||||
files=files,
|
files=files,
|
||||||
timeout=120,
|
timeout=self.timeout,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ClientResponseError(
|
raise ClientResponseError(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user