summaryrefslogtreecommitdiff
path: root/kvmd/clients/kvmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/clients/kvmd.py')
-rw-r--r--kvmd/clients/kvmd.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/kvmd/clients/kvmd.py b/kvmd/clients/kvmd.py
index 0b33eb42..678f104e 100644
--- a/kvmd/clients/kvmd.py
+++ b/kvmd/clients/kvmd.py
@@ -89,6 +89,17 @@ class _StreamerClientPart(_BaseClientPart):
aiotools.raise_not_200(response)
+class _HidClientPart(_BaseClientPart):
+ async def print(self, user: str, passwd: str, text: str, limit: int) -> None:
+ async with self._make_session(user, passwd) as session:
+ async with session.post(
+ url=self._make_url("hid/print"),
+ params={"limit": limit},
+ data=text,
+ ) as response:
+ aiotools.raise_not_200(response)
+
+
class _AtxClientPart(_BaseClientPart):
async def get_state(self, user: str, passwd: str) -> Dict:
async with self._make_session(user, passwd) as session:
@@ -134,6 +145,7 @@ class KvmdClient(_BaseClientPart):
self.auth = _AuthClientPart(**kwargs)
self.streamer = _StreamerClientPart(**kwargs)
+ self.hid = _HidClientPart(**kwargs)
self.atx = _AtxClientPart(**kwargs)
@contextlib.asynccontextmanager