Players

class arez.PartialPlayer[source]

This object stores basic information about a player, such as their Player ID, Player Name and their Platform. Depending on the way it was created, only the Player ID is guaranteed to exist - both name and platform can be an empty string and Platform.Unknown respectively.

To ensure all attributes are filled up correctly before processing, you can upgrade this object to the full Player one first, by awaiting on it and using the result:

player = await partial_player

Note

In addition to the exceptions specified below, each API request can result in the following exceptions being raised:

Unavailable

The API is currently unavailable.

LimitReached

Your daily limit of requests has been reached.

HTTPException

Fetching the information requested failed due to connection problems.

await __await__()

Upgrades this object to a full Player one, refreshing and ensuring information stored.

Uses up a single request.

Returns

A full player object with all fields filled up, for the same player.

Return type

Player

Raises
  • NotFound – The player’s profile doesn’t exist / couldn’t be found.

  • Private – The player’s profile was private.

id

Unique ID of the player. A value of 0 indicates a private player account, and shouldn’t be used to distinguish between different players.

Type

int

name

Name of the player.

Type

str

platform

The player’s platform.

Type

Platform

private

Checks to see if this profile is private or not.

Trying to fetch any information for a private profile will raise the Private exception.

Returns

True if this player profile is considered private, False otherwise.

Return type

bool

await get_status()[source]

Fetches the player’s current status.

Uses up a single request.

Returns

The player’s status.

Return type

PlayerStatus

Raises
  • Private – The player’s profile was private.

  • NotFound – The player’s status couldn’t be found.

await get_friends()[source]

Fetches the player’s friend list.

Uses up a single request.

Returns

A list of players this player is friends with.

Some players might be missing if their profile is set as private.

Return type

List[PartialPlayer]

Raises

Private – The player’s profile was private.

await get_loadouts(language=None)[source]

Fetches the player’s loadouts.

Uses up a single request.

Note

The LookupGroup class provides an easy way of searching for loadouts for a particular champion, based on the champion’s name or ID. You can also obtain a list of all loadouts instead.

Please see the example code below:

player: PartialPlayer
loadouts: LookupGroup[Champion, Loadout] = await player.get_loadouts()

# obtain a list of all loadouts (for all champions)
list_loadouts = list(loadouts)
# get a list of loadouts for a particular champion
champion_loadouts = loadouts.get("Androxus")
# fuzzy name matching
champion_loadouts = loadouts.get_fuzzy("andro")
Parameters

language (Optional[Language]) –

The Language you want to fetch the information in.

Default language is used if not provided.

Returns

An object that lets you iterate over and lookup player’s loadouts for each champion.

Return type

LookupGroup[Union[Champion, CacheObject], Loadout]

Raises

Private – The player’s profile was private.

await get_champion_stats(language=None, *, queue=None)[source]

Fetches the player’s champion statistics.

Uses up a single request.

Note

The Lookup class provides an easy way of searching for particular statistics, based on their associated champion’s name or ID. You can also obtain a list of all champion statistics instead.

Please see the example code below:

player: PartialPlayer
stats: Lookup[Champion, ChampionStats] = await player.get_champion_stats()

# obtain a list of stats for all champion
list_stats = list(stats)
# get the stats object for a particular champion
champion_stats = stats.get("Androxus")
# fuzzy name matching
champion_stats = stats.get_fuzzy("andro")
Parameters
  • language (Optional[Language]) –

    The Language you want to fetch the information in.

    Default language is used if not provided.

  • queue (Optional[Queue]) –

    The queue you want to filter the returned stats to.

    Defaults to all queues.

Returns

An object that lets you iterate over and lookup each champion’s statistics, one for each played champion.

Some statistics may be missing for champions the player haven’t played yet.

Return type

Lookup[Union[Champion, CacheObject], ChampionStats]

Raises

Private – The player’s profile was private.

await get_match_history(language=None)[source]

Fetches player’s match history.

Uses up a single request.

Note

The returned list can be empty (or contain less elements) if the player haven’t played any matches yet, or their last played match is over 30 days old.

Parameters

language (Optional[Language]) –

The Language you want to fetch the information in.

Default language is used if not provided.

Returns

A list of up to 50 partial matches, containing statistics for the current player only.

Return type

List[PartialMatch]

Raises

Private – The player’s profile was private.

class arez.Player[source]

A full Player object, containing all information about a player. You can get this from the PaladinsAPI.get_player and PaladinsAPI.get_players methods, as well as from upgrading a PartialPlayer object, by awaiting on it.

Note

This class inherits from PartialPlayer, so all of it’s methods should be present here as well.

active_player

The current active player between merged profiles.

None if the current profile is the active profile.

Type

Optional[PartialPlayer]

merged_players

A list of all merged profiles.

Only ID and platform are present.

Type

List[PartialPlayer]

created_at

A timestamp of the profile’s creation date.

This can be None for accounts that are really old.

Type

Optional[datetime.datetime]

last_login

A timestamp of the profile’s last successful in-game login.

This can be None for accounts that are really old.

Type

Optional[datetime.datetime]

platform_name

The platform name of this profile. This is usually identical to name, except in cases where the platform allows nicknames (Steam profiles).

Type

str

title

The player’s currently equipped title.

This will be an empty string without any title equipped.

Type

str

avatar_id

The player’s curremtly equipped avatar ID.

Type

int

avatar_url

The player’s currently equipped avatar URL.

Type

str

loading_frame

The player’s currently equipped loading frame name.

This will be an empty string without any loading frame equipped.

Type

str

level

The in-game level of this profile.

Type

int

playtime

The amount of time spent playing on this profile.

Type

Duration

champion_count

The amount of champions this player has unlocked.

Type

int

region

The player’s currently set Region.

This can be Region.Unknown for accounts that are really old.

Type

Region

total_achievements

The amount of achievements the player has.

Type

int

total_experience

The total amount of experience the player has.

Type

int

casual

Player’s casual statistics.

Type

Stats

ranked_keyboard

Player’s ranked keyboard statistics.

Type

RankedStats

ranked_controller

Player’s ranked controller statistics.

Type

RankedStats

id

Unique ID of the player. A value of 0 indicates a private player account, and shouldn’t be used to distinguish between different players.

Type

int

name

Name of the player.

Type

str

platform

The player’s platform.

Type

Platform

private

Checks to see if this profile is private or not.

Trying to fetch any information for a private profile will raise the Private exception.

Returns

True if this player profile is considered private, False otherwise.

Return type

bool

ranked_best

Player’s best ranked statistics, between the keyboard and controller ones.

If the rank is the same, winrate is used to determine the one returned.

Type

RankedStats

calculated_level

The calculated level of this profile.

This uses total_experience to calculate the player’s level, instead of relying on the value returned from the API. It also allows you to calculate the theorethical level beyond the 999th level cap.

Type

int

class arez.MatchPlayer[source]

Represents a full match’s player.

match

The match this player belongs to.

Type

Match

player

The player itself 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]

rank

The player’s rank.

Warning

Due to API limitations, this is only available for matches played in ranked queues.

For other queues, this attribute will be None.

Type

Optional[Rank]

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 player 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

points_captured

The amount of times the player’s team captured the point.

This is 0 for non-Siege matches.

Type

int

push_successes

The amount of times the player’s team successfully pushed the payload to the end.

This is 0 for non-Siege matches.

Type

int

kills_bot

The amount of bot kills.

Type

int

account_level

The player’s account level.

Type

int

mastery_level

The player’s champion mastery level.

Type

int

party_number

A number denoting the party the player belonged to.

0 means the player wasn’t in a party.

Type

int

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.LivePlayer[source]

Represents a live match player. You can find these on the LiveMatch.team1 and LiveMatch.team2 attributes.

match

The match this player belongs to.

Type

LiveMatch

player

The actual player playing in this match.

Type

Union[PartialPlayer, Player]

champion

The champion the player is using in this match.

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

Type

Union[Champion, CacheObject]

skin

The skin the player has equipped for this match.

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

Type

Union[Skin, CacheObject]

rank

The player’s rank.

Warning

Due to API limitations, this is only available for matches played in ranked queues.

For other queues, this attribute will be None.

Type

Optional[Rank]

account_level

The player’s account level.

Type

int

mastery_level

The player’s champion mastery level.

Type

int

wins

The amount of wins.

Type

int

losses

The amount of losses.

Type

int

matches_played

The amount of matches played. This is just wins + losses.

Type

int

winrate

The calculated winrate as a fraction.

nan is returned if there was no matches played.

Type

float

winrate_text

The calculated winrate as a percentage string of up to 3 decimal places accuracy.

The format is: "48.213%"

"N/A" is returned if there was no matches played.

Type

str