-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53b9646
commit 1b6c42f
Showing
3 changed files
with
29 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""This module contains the class that represents common objects.""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Literal | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
|
||
class UserIcon(BaseModel): | ||
"""A class that represents the icons of a user.""" | ||
|
||
small: str | ||
large: str | ||
|
||
|
||
class EssentialUser(BaseModel): | ||
"""A class that represents an essential user object.""" | ||
|
||
type_: Literal["essential"] = Field(..., alias="type") | ||
is_premium: bool = Field(..., alias="isPremium") | ||
description: str | ||
stripped_description: str = Field(..., alias="strippedDescription") | ||
short_description: str = Field(..., alias="shortDescription") | ||
id_: int = Field(..., alias="id") | ||
nickname: str | ||
icons: UserIcon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters