Support starrail activity - SpaceZoo

This commit is contained in:
xtaodada 2023-12-30 10:27:18 +08:00
parent 8a1ac17eda
commit baae8d5570
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -288,6 +288,30 @@ class StarRailBoxingShow(StarRailActivityBase):
info: StarRailBoxingShowInfo 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): class StarRailActivity(APIModel):
"""Starrail chronicle activity.""" """Starrail chronicle activity."""
@ -329,3 +353,8 @@ class StarRailActivity(APIModel):
def boxing_show(self) -> StarRailBoxingShow: def boxing_show(self) -> StarRailBoxingShow:
"""Get the boxing show activity.""" """Get the boxing show activity."""
return StarRailBoxingShow(**self.find_activity("boxing_show")) 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"))