2022-05-12 03:56:52 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Optional, Union
|
|
|
|
from nio import LoginResponse, LoginError, LogoutResponse, LogoutError
|
|
|
|
|
|
|
|
|
|
|
|
class ClientLogin:
|
2022-08-24 11:54:46 +00:00
|
|
|
async def login(
|
|
|
|
self,
|
|
|
|
password: Optional[str] = None,
|
|
|
|
device_name: Optional[str] = "",
|
|
|
|
token: Optional[str] = None,
|
|
|
|
) -> Union[LoginResponse, LoginError]:
|
2022-05-12 03:56:52 +00:00
|
|
|
return LoginError(message="Mocked failure")
|
|
|
|
|
|
|
|
|
|
|
|
class ClientLogout:
|
2022-08-24 11:54:46 +00:00
|
|
|
async def logout(
|
|
|
|
self, all_devices: bool = False
|
|
|
|
) -> Union[LogoutResponse, LogoutError]:
|
2022-05-12 03:56:52 +00:00
|
|
|
return LogoutError(message="Mocked failure")
|