mirror of
https://github.com/PaiGramTeam/EnkaNetwork.py.git
synced 2024-11-16 03:45:28 +00:00
Add document (again)
This commit is contained in:
parent
d08c255da7
commit
7162adc15d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user