rankade.models.Player

Module Contents

Classes

Player

Represents a single player returned by the Rankade API.

Players

Represents a list of player objects returned by the Rankade server. Individual player objects returned by the server can be accessed in the same way as a regular list.

API

class Player[source]

Bases: rankade.models.Base.RankadeObject

Represents a single player returned by the Rankade API.

id: str = None

Player id

ghost: bool = None

True if player is a ghost

displayName: str = None

Player display name

icon: str = None

Player Icon URL

username: Optional[str] = None

Player username, will be None if player is a ghost

__post_init__()[source]
property is_ghost

Convenience method returns self.ghost

class Players(initlist=None)[source]

Bases: rankade.models.Base.Page[rankade.models.Player.Player]

Represents a list of player objects returned by the Rankade server. Individual player objects returned by the server can be accessed in the same way as a regular list.

Initialization

totalPlayers: int = 'field(...)'

Total matches on all pages.

_content_class: ClassVar[Type[RankadeObject]] = None

Classvar to allow the an object in the list to be created from a dict returned from the server.

property ids: List[str]

Player & ghost ids

property ghosts: List[Player]

All ghost players.

property display_names: List[str]

Display names for players & ghosts. Ghost display names have a ‘*’ prefix.

property display_names_clean: List[str]

Display names for players & ghosts. Ghost display names will be returned without ‘*’ prefix.

property usernames: List[str | None]

Usernames for all players, ghosts not included.

property icons: Dict[str, str]

All icon URIs for players & ghosts (if set.)