mirror of
https://github.com/PaiGramTeam/EnkaNetwork.py.git
synced 2024-11-16 03:45:28 +00:00
Pertty field
- I think it should be fixed sooner :P
This commit is contained in:
parent
69d9fdacf1
commit
7a1a1489e5
@ -26,7 +26,7 @@ class ProfilePicture(BaseModel):
|
||||
"""
|
||||
Custom add data
|
||||
"""
|
||||
url: IconAsset = None
|
||||
icon: IconAsset = None
|
||||
|
||||
def __init__(self, **data: Any) -> None:
|
||||
super().__init__(**data)
|
||||
@ -43,7 +43,7 @@ class ProfilePicture(BaseModel):
|
||||
if not icon:
|
||||
return
|
||||
|
||||
self.url = icon.icon
|
||||
self.icon = icon.icon
|
||||
|
||||
|
||||
class showAvatar(BaseModel):
|
||||
@ -129,7 +129,7 @@ class PlayerInfo(BaseModel):
|
||||
nickname: str = ""
|
||||
signature: str = ""
|
||||
world_level: int = Field(1, alias="worldLevel")
|
||||
icon: ProfilePicture = Field(None, alias="profilePicture")
|
||||
avatar: ProfilePicture = Field(None, alias="profilePicture")
|
||||
# Avatars
|
||||
characters_preview: List[showAvatar] = Field([], alias="showAvatarInfoList")
|
||||
# Abyss floor
|
||||
|
@ -10,7 +10,7 @@ async def main():
|
||||
print("=== Player Info ===")
|
||||
print(f"Nickname: {data.player.nickname}")
|
||||
print(f"Level: {data.player.level}")
|
||||
print(f"Icon: {data.player.icon.url}")
|
||||
print(f"Icon: {data.player.avatar.icon.url}")
|
||||
print(f"Signature: {data.player.signature}")
|
||||
print(f"Achievement: {data.player.achievement}")
|
||||
print(f"Abyss floor: {data.player.abyss_floor} - {data.player.abyss_room}")
|
||||
|
Loading…
Reference in New Issue
Block a user