feat(api): Add /api/gui/state endpoint and live_gui integration tests

This commit is contained in:
2026-03-05 10:06:47 -05:00
parent 52838bc500
commit a783ee5165
4 changed files with 65 additions and 1 deletions

View File

@@ -84,6 +84,11 @@ class ApiHookClient:
"""Retrieves current MMA status (track, tickets, tier, etc.)"""
return self._make_request('GET', '/api/gui/mma_status')
def get_gui_state(self) -> dict | None:
"""Retrieves the current GUI state via /api/gui/state."""
resp = self._make_request("GET", "/api/gui/state")
return resp if resp else None
def push_event(self, event_type: str, payload: dict[str, Any]) -> dict[str, Any] | None:
"""Pushes an event to the GUI's AsyncEventQueue via the /api/gui endpoint."""
return self.post_gui({