Add document (again)

This commit is contained in:
M307 (Mac) 2023-02-07 15:28:37 +07:00
parent d08c255da7
commit 7162adc15d

View File

@ -12,16 +12,45 @@ from typing import Any
__all__ = ("EnkaNetworkResponse",)
class EnkaNetworkInfo(BaseModel):
""" Enka.Network response data
Attributes
------------
uid: :class:`str`
UID Player
url: :class:`str`
URL to Enka.Network profile
path: :class:`str`
Path to enter Enka.network profile
"""
uid: str = ""
url: str = ""
path: str = ""
class EnkaNetworkResponse(BaseModel):
""" Enka.Network response data
Attributes
------------
player: :class:`PlayerInfo`
Player info data. Please refers in `PlayerInfo` class (key: "playerInfo")
characters: List[:class:`CharacterInfo`]
List character. Please refers in `CharacterInfo` class (key: "avatarInfoList")
profile: :class:`EnkaNetworkInfo`
profile enka.network. Please refers in `EnkaNetworkInfo` class
owner: :class:`ProfileOwner`
Owner UID data. **subscriptions in Enka.Network**. Please refers in `ProfileOwner` class
ttl: :class:`int`
Cache timeout
uid: :class:`int`
UID Player
"""
player: PlayerInfo = Field(None, alias="playerInfo")
characters: List[CharacterInfo] = Field(None, alias="avatarInfoList")
profile: EnkaNetworkInfo = EnkaNetworkInfo()
owner: ProfileOwner = None
ttl: int = 0
uid: int = 0
def __init__(self, **data: Any) -> None:
super().__init__(**data)