trackmania.trophy module
- class trackmania.trophy.PlayerTrophies(echelon: int, last_change: datetime, points: int, trophies: list[int], player_id: Optional[str] = None)[source]
Bases:
TrophyObjectNew in version 0.1.0.
Represents Player Trophies
- Parameters
echelon (int) – The trophy echelon of the player.
last_change (str) – The date of the last change of the player’s self.
points (ints: int) – The number of points of the player.
trophies (
list[int]) – The number of trophies of the player.player_id (str |
NoneType, optional) – The Trackmania ID of the player
- async history(page: int = 0) dict[source]
New in version 0.3.0.
Retrieves Trophy Gain and Loss history of a player.
- Parameters
page (int, optional) – page number of trophy history, by default 0
- Returns
Trophy history data.
- Return type
dict- Raises
InvalidIDError – If an ID has not been set for the object.
InvalidIDError – If an invalid id has been set for the object.
- property last_change
Last change property.
- property player_id
player_id property
- score() int[source]
New in version 0.3.0.
Returns the total trophy score of the player.
- Returns
The total score.
- Return type
int
- async static top_trophies(page: int = 0) list[trackmania.trophy.TrophyLeaderboardPlayer][source]
New in version 0.3.0.
Get’s the top players ranked by trophies
- Parameters
page (int, optional) – The page of the leaderboards, by default 0
- Returns
The players as a list of
TrophyLeaderboardPlayerobjects.- Return type
list[TrophyLeaderboardPlayer]
- class trackmania.trophy.TrophyLeaderboardPlayer(player_name: str, club_tag: str | None, player_id: str, rank: int, score: str, zones: list)[source]
Bases:
TrophyObjectNew in version 0.4.0.
Represents a player on the trophy leaderboards
- Parameters
player_name (str) – The player’s name
club_tag (str | None) – The player’s club tag
player_id (str) – The player’s ID
rank (int) – The player’s rank
score (str) – The player’s score
zones (list[PlayerZone]) – The player’s zones