mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-09-12 11:52:33 +00:00
- Add UserNotFound and InvalidParams exception. - The API has changed its data format. - Updated the model to accommodate the new format. - Old format models have been moved to "models.v1". - Use the "fetch_user_v1" function to retrieve data in the old format.
22 lines
642 B
Python
22 lines
642 B
Python
from pydantic import BaseModel, Field
|
|
|
|
from .character import Character
|
|
from .player import Player, PlayerSpaceInfo
|
|
|
|
|
|
class StarrailInfoParsedV1(BaseModel):
|
|
"""
|
|
Mihomo parsed data V1
|
|
|
|
Attributes:
|
|
- player (`Player`): The player's basic info.
|
|
- player_details (`PlayerSpaceInfo`): The player's details.
|
|
- characters (list[`Character`]): The list of characters.
|
|
"""
|
|
|
|
player: Player
|
|
"""Player's basic info"""
|
|
player_details: PlayerSpaceInfo = Field(..., alias="PlayerSpaceInfo")
|
|
"""Player's details"""
|
|
characters: list[Character]
|
|
"""The list of characters"""
|