Skip to content

Commit

Permalink
feat: Add new models to stats module (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanioooook authored Jan 7, 2025
1 parent 111e3b6 commit 2dcda48
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions genshin/models/zzz/chronicle/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"ZZZBaseBangboo",
"ZZZStats",
"ZZZUserStats",
"ZZZCatNote",
"ZZZGameData"
)


Expand Down Expand Up @@ -41,6 +43,25 @@ def __unnest_hia_coin(
) -> typing.Optional[typing.Dict[str, typing.Any]]:
return v[0] if v else None

class ZZZCatNote(APIModel):
"""ZZZ Cat note model."""

icon: str
id: int
is_lock: bool
name: str
num: int
total: int

class ZZZGameData(APIModel):
"""ZZZ game data model."""

personal_title: str
title_main_color: str
title_bottom_color: str
title_bg_url: str
medal_list: typing.Sequence[str]
card_url: str

class ZZZBaseBangboo(APIModel):
"""Base bangboo (buddy) model."""
Expand All @@ -60,3 +81,5 @@ class ZZZUserStats(APIModel):
agents: typing.Sequence[ZZZPartialAgent] = Aliased("avatar_list")
bangboos: typing.Sequence[ZZZBaseBangboo] = Aliased("buddy_list")
in_game_avatar: str = Aliased("cur_head_icon_url")
cat_notes: typing.Sequence[ZZZCatNote] = Aliased("cat_notes_list")
in_game_data: ZZZGameData = Aliased("game_data_show")

0 comments on commit 2dcda48

Please sign in to comment.