Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"locale": self._locale,
},
)
self._client_established = True
resp: dict = await self._request(
"post",
f"clients/{self.client_uuid}/sessions",
data={"email": self._email, "password": self._password},
)
if not self.user_uuid:
self.user_uuid = resp["result"]["user"]["user_uuid"]
self._session_expiry = resp["result"]["session_expiration_timestamp"]
self.tiles = Tile(self._request, user_uuid=self.user_uuid)
self,
email: str,
password: str,
*,
session: Optional[ClientSession] = None,
client_uuid: Optional[str] = None,
locale: str = DEFAULT_LOCALE,
) -> None:
"""Initialize."""
self._client_established: bool = False
self._email: str = email
self._locale: str = locale
self._password: str = password
self._session: ClientSession = session
self._session_expiry: Optional[int] = None
self.tiles: Optional[Tile] = None
self.user_uuid: Optional[str] = None
self.client_uuid: str
if not client_uuid:
self.client_uuid = str(uuid4())
else:
self.client_uuid = client_uuid