From 7a1a1489e56119057d3b6fa16103f78ff3601276 Mon Sep 17 00:00:00 2001 From: "M307 (Mac)" Date: Sat, 19 Nov 2022 15:48:08 +0700 Subject: [PATCH] Pertty field - I think it should be fixed sooner :P --- enkanetwork/model/players.py | 6 +++--- example/player.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/enkanetwork/model/players.py b/enkanetwork/model/players.py index 98a8d3d..9e1ac43 100644 --- a/enkanetwork/model/players.py +++ b/enkanetwork/model/players.py @@ -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 diff --git a/example/player.py b/example/player.py index d7b23ea..dc92a8b 100644 --- a/example/player.py +++ b/example/player.py @@ -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}")