Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add new models to stats module #233

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Loading