SIMNet/simnet/models/starrail/chronicle/stats.py

50 lines
966 B
Python
Raw Normal View History

2023-06-09 14:55:51 +00:00
"""Starrail chronicle stats."""
import typing
2023-05-01 12:50:48 +00:00
from pydantic import Field
2023-06-09 14:55:51 +00:00
2023-05-01 12:50:48 +00:00
from simnet.models.base import APIModel
2023-06-09 14:55:51 +00:00
from .. import character
__all__ = [
"PartialStarRailUserStats",
"StarRailUserInfo",
"StarRailUserStats",
"StarRailStats",
]
2023-05-01 12:50:48 +00:00
2023-06-09 14:55:51 +00:00
class StarRailStats(APIModel):
"""Overall user stats."""
2023-05-01 12:50:48 +00:00
active_days: int
avatar_num: int
achievement_num: int
chest_num: int
abyss_process: str
class PartialStarRailUserStats(APIModel):
2023-06-09 14:55:51 +00:00
"""User stats with characters without equipment."""
2023-05-01 12:50:48 +00:00
2023-06-09 14:55:51 +00:00
stats: StarRailStats
characters: typing.Sequence[character.StarRailPartialCharacter] = Field(alias="avatar_list")
2023-05-01 12:50:48 +00:00
class StarRailUserInfo(APIModel):
2023-06-09 14:55:51 +00:00
"""User info."""
nickname: str
server: str = Field(alias="region")
level: int
avatar: str
2023-05-01 12:50:48 +00:00
class StarRailUserStats(PartialStarRailUserStats):
2023-06-09 14:55:51 +00:00
"""User stats."""
info: StarRailUserInfo
2023-09-06 13:24:38 +00:00
cur_head_icon_url: str
phone_background_image_url: str