From baae8d557053e03ff99c4973ec01d41d5051c60b Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 30 Dec 2023 10:27:18 +0800 Subject: [PATCH] :sparkles: Support starrail activity - SpaceZoo --- simnet/models/starrail/chronicle/activity.py | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/simnet/models/starrail/chronicle/activity.py b/simnet/models/starrail/chronicle/activity.py index c8d6a90..843fab2 100644 --- a/simnet/models/starrail/chronicle/activity.py +++ b/simnet/models/starrail/chronicle/activity.py @@ -288,6 +288,30 @@ class StarRailBoxingShow(StarRailActivityBase): info: StarRailBoxingShowInfo +class StarRailSpaceZooFeature(APIModel): + """Space Zoo Feature""" + + cur: int + max: int + channel: str + name_mi18n: str + + +class StarRailSpaceZooInfo(APIModel): + """Space Zoo Info""" + + cur_xyzw: int + max_xyzw: int + features: List[StarRailSpaceZooFeature] + level: int + + +class StarRailSpaceZoo(StarRailActivityBase): + """Space Zoo Activity""" + + info: StarRailSpaceZooInfo + + class StarRailActivity(APIModel): """Starrail chronicle activity.""" @@ -329,3 +353,8 @@ def fox_story(self) -> StarRailFoxStory: def boxing_show(self) -> StarRailBoxingShow: """Get the boxing show activity.""" return StarRailBoxingShow(**self.find_activity("boxing_show")) + + @property + def space_zoo(self) -> StarRailSpaceZoo: + """Get the space zoo activity.""" + return StarRailSpaceZoo(**self.find_activity("space_zoo"))