trackmania.club module
- class trackmania.club.Club(background: str, created_at: datetime, decal: str, description: str, featured: bool, club_id: int, logo: str, member_count: int, name: str, popularity: int, state: str, tag: str | None, creator_id: str)[source]
Bases:
ClubObjectRepresents a Club in Trackmania 2020.
- Parameters
background (str) – The club’s background url.
created_at (datetime) – The club’s created date.
decal (str) – The club decal URL
description (str) – The club’s description
featured (bool) – Whether the club is featured or not.
club_id (int) – The club’s ID.
logo (str) – The club’s logo URL.
member_count (int) – The club’s member count.
name (str) – The club’s name.
popularity (int) – The club popularity level
state (str) – The club’s state. Is either Private or Public.
tag (str) – The club tag
- async creator() Player[source]
New in version 0.5.
Gets the creator of the club.
- Returns
The creator of the club.
- Return type
Player
- async get_activities(page: int = 0) list[trackmania.club.ClubActivity][source]
New in version 0.5.
Gets the activities of the club.
- Parameters
page (int) – The page number, by default 0
- Returns
The list of activities of the club.
- Return type
list[ClubActivity]
- async classmethod get_club(club_id: int) Optional[Self][source]
New in version 0.5.
Gets a club based on its club id. Returns None if the club_id is 0
- Parameters
club_id (int) – The club’s id.
- Returns
Returns a Club class if a club exists with the given class id. Otherwise returns None.
- Return type
Club| None- Raises
TMIOException – If the club doesn’t exist or if an unexpected error occurs on TMIO’s side.
- async get_members(page: int = 0) list[trackmania.club.ClubMember][source]
New in version 0.5.
Gets the members of the club.
- Parameters
page (int, optional) – The page number, by default 0
- Returns
The list of members of the club.
- Return type
list[Player]
- class trackmania.club.ClubActivity(name: str, type: str, activity_id: int, target_activity_id: int, position: int, public: bool, media: str, password: bool)[source]
Bases:
ClubObjectNew in version 0.5.
Represents an activity of the club.
- Parameters
name (str) – The name of the activity.
type (str) – What type of activity it is.
activity_id (int) – The activity’s ID.
target_activity_id (int) – The activity’s target ID.
position (int) – The position of the activity within the club.
public (bool) – Whether the activity is public or club-member only.
media (str) – The media of the activity.
password (bool) – Whether the activity is password-protected.
- class trackmania.club.ClubMember(name: str, tag: str | None, player_id: str, join_time: datetime, role: str, vip: bool)[source]
Bases:
ClubObjectNew in version 0.5.
Represents a member of a club.
- Parameters
name (str) – The name of the player.
tag (str | None) – The club tab of the player.
player_id (str) – The ID of the player.
join_time (datetime) – When the player joined the club.
role (str) – The role of the player inside the club
vip (bool) – Whether the player is a VIP.
- async player() Player[source]
New in version 0.5.
Gets the player who is this specific club member. (IDK wtf to put here xD)
- Returns
The player who is the club member.
- Return type
Player- Raises
TMIOException – If there is a problem with the TMIO API.