rankade.models.Faction

Module Contents

Classes

Faction

Represents a faction used within a Match.

Factions

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

API

class Faction[source]

Bases: rankade.models.Base.RankadeObject

Represents a faction used within a Match.

name: str = None

Faction Name

points: str = None

Faction points/score,

rank: int = None

Faction ranking compared to other factions.

bot: bool = False

returns true if faction is bot faction.

winner: bool = False

returns true if faction is winning faction.

players: Players = None

List of faction players.

countPlayers: int = 0

Number of players in the faction.

__post_init__()[source]
property is_bot: bool

Convenience attribute - returns true if faction is bot faction.

property is_winner: bool

Convenience attribute - returns true if faction is winning faction.

as_dict() rankade.api.Api.JSON[source]

Returns a custom dictionary for new match server post request.

class Factions(initlist=None)[source]

Bases: rankade.models.Base.ResultList[rankade.models.Faction.Faction]

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

Initialization

_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.