forked from MetaCubeX/mihomo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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.
- Loading branch information
Showing
15 changed files
with
634 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .base import * | ||
from .character import * | ||
from .combat import * | ||
from .equipment import * | ||
from .player import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
from pydantic import BaseModel, Field | ||
|
||
from .character import Character | ||
from .player import Player, PlayerSpaceInfo | ||
from .player import Player | ||
|
||
|
||
class StarrailInfoParsed(BaseModel): | ||
""" | ||
Mihomo parsed data | ||
Attributes: | ||
- player (`Player`): The player's basic info. | ||
- player_details (`PlayerSpaceInfo`): The player's details. | ||
- player (`Player`): The player's info. | ||
- 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""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.