-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Models for 0.2.0
- Loading branch information
Showing
15 changed files
with
471 additions
and
68 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
aoe2netwrapper.models | ||
--------------------- | ||
This subpackage contains the model objects used to encapsulate responses from the API. | ||
Each module therein contains the models for a specific API endpoint. | ||
""" | ||
from .last_match import LastMatchResponse | ||
from .leaderboard import LeaderBoardResponse | ||
from .lobbies import MatchLobby | ||
from .match import MatchLobby | ||
from .match_history import MatchLobby | ||
from .matches import MatchLobby | ||
from .num_online import NumOnlineResponse | ||
from .rating_history import RatingTimePoint | ||
from .strings import StringsResponse |
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,20 @@ | ||
""" | ||
aoe2netwrapper.models.lobbies | ||
----------------------------- | ||
This module contains the model objects to encapsulate the responses from the endpoint at | ||
https://aoe2.net/api/lobbies | ||
""" | ||
from typing import Optional | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
from aoe2netwrapper.models.lobbies import MatchLobby | ||
|
||
|
||
class LastMatchResponse(BaseModel): | ||
profile_id: Optional[int] = Field(None) | ||
steam_id: Optional[int] = Field(None) | ||
name: Optional[str] = Field(None) | ||
country: Optional[str] = Field(None) | ||
last_match: Optional[MatchLobby] = Field(None) |
Oops, something went wrong.