Matches

class arez.PartialMatch[source]

Represents a match from a single player’s perspective only.

This partial object is returned by the PartialPlayer.get_match_history player’s method. To obtain an object with all match information, try awaiting on this object like so:

match = await partial_match
id

The match ID.

Type

int

queue

The queue this match was played in.

Type

Queue

region

The region this match was played in.

Type

Region

timestamp

A timestamp of when this match happened.

Type

datetime.datetime

duration

The duration of the match.

Type

Duration

map_name

The name of the map played.

Type

str

score

The match’s ending score.

The first value is always the allied-team score, while the second one - enemy team score.

Type

Tuple[int, int]

winning_team

The winning team of this match.

Type

Literal[1, 2]

player

The player who participated in this match.

This is usually a new partial player object.

All attributes, Name, ID and Platform, should be present.

Type

Union[PartialPlayer, Player]

champion

The champion used by the player in this match.

With incomplete cache, this will be a CacheObject with the name and ID set.

Type

Union[Champion, CacheObject]

loadout

The loadout used by the player in this match.

Type

MatchLoadout

items

A list of items bought by the player during this match.

Type

List[MatchItem]

credits

The amount of credits earned this match.

Type

int

experience

The base amount of experience gained from this match.

Type

int

kills

The amount of kills.

Type

int

deaths

The amount of deaths.

Type

int

assists

The amount of assists.

Type

int

damage_done

The amount of damage dealt.

Type

int

damage_bot

The amount of damage done by the player’s bot after they disconnected.

Type

int

damage_taken

The amount of damage taken.

Type

int

damage_mitigated

The amount of damage mitigated (shielding).

Type

int

healing_done

The amount of healing done to other players.

Type

int

healing_bot

The amount of healing done by the player’s bot after they disconnected.

Type

int

healing_self

The amount of healing done to self (self-sustain).

Type

int

objective_time

The amount of objective time the player got, in seconds.

Type

int

multikill_max

The maximum multikill player did during the match.

Type

int

skin

The skin the player had equipped for this match.

With incomplete cache, this will be a CacheObject with the name and ID set.

Type

Union[Skin, CacheObject]

team_number

The team this player belongs to.

Type

Literal[1, 2]

team_score

The score of the player’s team.

Type

int

winner

True if the player won this match, False otherwise.

Type

bool

await __await__()

Upgrades this object into a full Match one, containing all match players and information.

Uses up a single request.

Returns

The full match object.

Return type

Match

Raises

NotFound – The match could not be found.

disconnected

Returns True if the player has disconnected during the match, False otherwise.

This is done by checking if either damage_bot or healing_bot are non zero.

Type

bool

df

The Dominance Factor.

The formula is: kills * 2 + deaths * -3 + assists.

The value signifies how “useful” the person was to the team overall. Best used when scaled and compared between team members in a match (allied and enemy).

Type

int

kda

The calculated KDA.

The formula is: (kills + assists / 2) / deaths.

nan is returned if there was no deaths.

Type

float

kda2

The calculated KDA.

The formula is: (kills + assists / 2) / max(deaths, 1), treating 0 and 1 deaths the same, meaning this will never return nan.

Type

float

kda_text

Kills, deaths and assists as a slash-delimited string.

The format is: kills/deaths/assists, or 1/2/3.

Type

str

shielding

This is an alias for the damage_mitigated attribute.

Type

int

class arez.Match[source]

Represents already-played full match information.

You can get this from the PaladinsAPI.get_match and PaladinsAPI.get_matches methods, as well as from upgrading a PartialMatch object.

id

The match ID.

Type

int

queue

The queue this match was played in.

Type

Queue

region

The region this match was played in.

Type

Region

timestamp

A timestamp of when this match happened.

Type

datetime.datetime

duration

The duration of the match.

Type

Duration

map_name

The name of the map played.

Type

str

score

The match’s ending score.

The first value is the team1 score, while the second value - team2 score.

Type

Tuple[int, int]

winning_team

The winning team of this match.

Type

Literal[1, 2]

replay_available

True if this match has a replay that you can watch, False otherwise.

Type

bool

bans

A list of champions banned in this match.

With incomplete cache, the list will contain CacheObject objects with the name and ID set.

This will be an empty list for non-ranked matches.

None indicates there was no ban.

Type

List[Optional[Union[Champion, CacheObject]]]

team1

A list of players in the first team.

Type

List[MatchPlayer]

team2

A list of players in the second team.

Type

List[MatchPlayer]

players

A generator that iterates over all match players in the match.

Type

Generator[MatchPlayer]

await expand_players()[source]

Makes partial player objects in the containing match player objects be expanded into full Player objects, if possible.

Uses up a single request to do the expansion.

class arez.LiveMatch[source]

Represents an on-going live match. You can get this from the PlayerStatus.get_live_match method.

id

The match ID.

Type

int

map_name

The name of the map played.

Type

str

queue

The queue the match is being played in.

Type

Queue

region

The region this match is being played in.

Type

Region

team1

A list of live players in the first team.

Type

List[LivePlayer]

team2

A list of live players in the second team.

Type

List[LivePlayer]

players

A generator that iterates over all live match players in the match.

Type

Generator[LivePlayer]

await expand_players()[source]

Makes partial player objects in the containing match player objects be expanded into full Player objects, if possible.

Uses up a single request to do the expansion.