diff --git a/enkanetwork/client.py b/enkanetwork/client.py index c1e9991..205d566 100644 --- a/enkanetwork/client.py +++ b/enkanetwork/client.py @@ -6,7 +6,7 @@ import logging import warnings from .http import HTTPClient -from .model import EnkaNetworkResponse +from .model.base import EnkaNetworkResponse from .assets import Assets from .enum import Language from .cache import Cache diff --git a/enkanetwork/model/__init__.py b/enkanetwork/model/__init__.py index d2a7a16..024b000 100644 --- a/enkanetwork/model/__init__.py +++ b/enkanetwork/model/__init__.py @@ -6,8 +6,3 @@ from .character import * from .equipments import * from .players import * from .stats import * - -class EnkaNetworkResponse(BaseModel): - player: PlayerInfo = Field(None, alias="playerInfo") - characters: List[CharacterInfo] = Field(None, alias="avatarInfoList") - ttl: int = 0 diff --git a/enkanetwork/model/base.py b/enkanetwork/model/base.py new file mode 100644 index 0000000..137bad7 --- /dev/null +++ b/enkanetwork/model/base.py @@ -0,0 +1,12 @@ +from pydantic import BaseModel, Field +from typing import List + +from .players import PlayerInfo +from .character import CharacterInfo + +__all__ = ("EnkaNetworkResponse",) + +class EnkaNetworkResponse(BaseModel): + player: PlayerInfo = Field(None, alias="playerInfo") + characters: List[CharacterInfo] = Field(None, alias="avatarInfoList") + ttl: int = 0 \ No newline at end of file