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
|
|
|
|
|
|
|
|
2023-05-17 08:06:52 +00:00
|
|
|
class StarRailUserInfo(APIModel):
|
2023-06-09 14:55:51 +00:00
|
|
|
"""User info."""
|
2023-05-17 08:06:52 +00:00
|
|
|
|
|
|
|
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."""
|
2023-05-17 08:06:52 +00:00
|
|
|
|
|
|
|
info: StarRailUserInfo
|