Fix type dosen't not show

This commit is contained in:
M307 (Mac) 2022-11-19 12:36:05 +07:00
parent a90c2c8276
commit 284cf32880
3 changed files with 13 additions and 6 deletions

View File

@ -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

View File

@ -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

12
enkanetwork/model/base.py Normal file
View File

@ -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