Skip to content

Commit d63f079

Browse files
committed
feat: add UIProfile enum generation from Overkiz API
- Implemented `generate_ui_profiles` function to fetch and generate UIProfile enums. - Added error handling for fetching profile details. - Included detailed comments for commands and states in the generated enum. - Updated the main generation function to include UIProfile generation.
1 parent d36d26a commit d63f079

File tree

4 files changed

+2014
-1
lines changed

4 files changed

+2014
-1
lines changed

pyoverkiz/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ async def get_reference_ui_profile(self, profile_name: str) -> JSON:
705705
)
706706

707707
@retry_on_auth_error
708-
async def get_reference_ui_profile_names(self) -> JSON:
708+
async def get_reference_ui_profile_names(self) -> list[str]:
709709
"""Get a list of all defined UI profiles (and form-factor variants)."""
710710
return await self.__get("reference/ui/profileNames")
711711

pyoverkiz/enums/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from pyoverkiz.enums import server as _server
1414
from pyoverkiz.enums import state as _state
1515
from pyoverkiz.enums import ui as _ui
16+
from pyoverkiz.enums import ui_profile as _ui_profile
1617
from pyoverkiz.enums.command import *
1718
from pyoverkiz.enums.execution import *
1819
from pyoverkiz.enums.gateway import *
@@ -22,6 +23,7 @@
2223
from pyoverkiz.enums.server import *
2324
from pyoverkiz.enums.state import *
2425
from pyoverkiz.enums.ui import *
26+
from pyoverkiz.enums.ui_profile import *
2527

2628
__all__ = sorted(
2729
{
@@ -36,6 +38,7 @@
3638
_server,
3739
_state,
3840
_ui,
41+
_ui_profile,
3942
)
4043
for name, obj in vars(module).items()
4144
if isinstance(obj, type) and issubclass(obj, Enum)

0 commit comments

Comments
 (0)