trackmania.matchmaking module
- class trackmania.matchmaking.MatchmakingLeaderboardPlayer(player_name: str, player_tag: str | None, player_id: str, rank: int, score: int, progression: int, division: int)[source]
Bases:
MatchmakingObjectRepresents a player on the Matchmaking leaderboards.
- Parameters
player_name (str) – The name of the player.
player_tag (str | None) – The tag of the player.
player_id (str) – The ID of the player.
rank (int) – The rank of the player.
score (int) – The score of the player.
progression (int) – The progression of the player.
- class trackmania.matchmaking.PlayerMatchmaking(matchmaking_type: str, type_id: int, progression: int, rank: int, score: int, division: int, min_points: int, max_points: int, player_id: Optional[str] = None)[source]
Bases:
MatchmakingObjectNew in version 0.1.0.
Class that represents the player matchmaking details
- Parameters
matchmaking_type (str) – The type of matchmaking, either “3v3” or “Royal”
type_id (int) – The type of matchmaking as 0 or 1, 0 for “3v3” and 1 for “Royal”
progression (int) – The progression of the player’s score in matchmaking
rank (int) – The rank of the player in matchmaking
score (int) – The score of the player in matchmaking
division (int) – The division of the player in matchmaking
division_str (str: str) – The division of the player in matchmaking as a string
min_points (int) – The points required to reach the current division.
max_points (int) – The points required to move up the rank.
player_id (str | None) – The player’s ID. Defaults to None
- async history(page: int = 0) list[trackmania.matchmaking.PlayerMatchmakingResult][source]
New in version 0.3.0.
Changed in version 0.4.0: Use _get_history() helper command.
History of recent matches in this matchmaking
- Parameters
page (int, optional) – The page number, by default 0
- Returns
The list of matchmaking results
- Return type
list[PlayerMatchmakingResult]- Raises
InvalidIDError – If the player_id is not set.
- property max_points
max points
- property min_points
min points
- async static top_matchmaking(page: int = 0, royal: bool = False) list[trackmania.matchmaking.MatchmakingLeaderboardPlayer][source]
New in version 0.3.0.
Top matchmaking players
- Parameters
page (int, optional) – The page number, by default 0
royal (bool, optional) – Whether to get the top matchmaking players for royal, by default False
- Returns
The top matchmaking players by score. Each page contains 50 players.
- Return type
list[MatchmakingLeaderboardPlayer]
- class trackmania.matchmaking.PlayerMatchmakingResult(after_score: int, leave: bool, live_id: str, mvp: bool, player_id: str | None, start_time: datetime, win: bool)[source]
Bases:
MatchmakingObjectNew in version 0.3.0.
Represent’s a player’s matchmaking result
- Parameters
after_score (int) – The player’s matchmaking score after the match
leave (bool) – Whether the player left the match
live_id (str) – The live id of the match
mvp (bool) – Whether the player was the mvp of the match
player_id (str | None) – The player’s ID
start_time (
datetime) – The date the match startedwin (bool) – Whether the player won the match