mirror of
https://github.com/MelisaDev/melisa.git
synced 2024-11-11 19:07:28 +03:00
feat(user): add description
This commit is contained in:
parent
51249168c1
commit
a8c25264c0
1 changed files with 7 additions and 0 deletions
|
@ -201,6 +201,13 @@ class User(APIModelBase):
|
|||
|
||||
@classmethod
|
||||
def from_dict(cls, data: Dict[str, Any]) -> User:
|
||||
"""Generate a user from the given data.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
data: :class:`dict`
|
||||
The dictionary to convert into a user.
|
||||
"""
|
||||
self: User = super().__new__(cls)
|
||||
|
||||
self.id = int(data["id"])
|
||||
|
|
Loading…
Reference in a new issue