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
nameandplatformcan be an empty string andPlatform.Unknownrespectively.To ensure all attributes are filled up correctly before processing, you can upgrade this object to the full
Playerone 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:
UnavailableThe API is currently unavailable.
LimitReachedYour daily limit of requests has been reached.
HTTPExceptionFetching the information requested failed due to connection problems.
-
await
__await__()¶ Upgrades this object to a full
Playerone, refreshing and ensuring information stored.Uses up a single request.
-
id¶ Unique ID of the player. A value of
0indicates a private player account, and shouldn’t be used to distinguish between different players.- Type
-
private¶ Checks to see if this profile is private or not.
Trying to fetch any information for a private profile will raise the
Privateexception.
-
await
get_status()[source]¶ Fetches the player’s current status.
Uses up a single request.
- Returns
The player’s status.
- Return type
- Raises
-
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
LookupGroupclass 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
Languageyou 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
Lookupclass 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
- 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
Languageyou 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_playerandPaladinsAPI.get_playersmethods, as well as from upgrading aPartialPlayerobject, 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.
Noneif 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
Nonefor 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
Nonefor 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
-
title¶ The player’s currently equipped title.
This will be an empty string without any title equipped.
- Type
-
loading_frame¶ The player’s currently equipped loading frame name.
This will be an empty string without any loading frame equipped.
- Type
-
region¶ The player’s currently set
Region.This can be
Region.Unknownfor accounts that are really old.- Type
-
ranked_keyboard¶ Player’s ranked keyboard statistics.
- Type
-
ranked_controller¶ Player’s ranked controller statistics.
- Type
-
id¶ Unique ID of the player. A value of
0indicates a private player account, and shouldn’t be used to distinguish between different players.- Type
-
private¶ Checks to see if this profile is private or not.
Trying to fetch any information for a private profile will raise the
Privateexception.
-
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
-
calculated_level¶ The calculated level of this profile.
This uses
total_experienceto 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
-
-
class
arez.MatchPlayer[source]¶ Represents a full match’s player.
-
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
CacheObjectwith the name and ID set.- Type
Union[Champion, CacheObject]
-
loadout¶ The loadout used by the player in this match.
- Type
-
skin¶ The skin the player had equipped for this match.
With incomplete cache, this will be a
CacheObjectwith the name and ID set.- Type
Union[Skin, CacheObject]
-
team_number¶ The team this player belongs to.
- Type
Literal[1, 2]
-
points_captured¶ The amount of times the player’s team captured the point.
This is
0for non-Siege matches.- Type
-
push_successes¶ The amount of times the player’s team successfully pushed the payload to the end.
This is
0for non-Siege matches.- Type
-
party_number¶ A number denoting the party the player belonged to.
0means the player wasn’t in a party.- Type
-
disconnected¶ Returns
Trueif the player has disconnected during the match,Falseotherwise.This is done by checking if either
damage_botorhealing_botare non zero.- Type
-
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
-
kda¶ The calculated KDA.
The formula is:
(kills + assists / 2) / deaths.nanis returned if there was no deaths.- Type
-
kda2¶ The calculated KDA.
The formula is:
(kills + assists / 2) / max(deaths, 1), treating 0 and 1 deaths the same, meaning this will never returnnan.- Type
-
kda_text¶ Kills, deaths and assists as a slash-delimited string.
The format is:
kills/deaths/assists, or1/2/3.- Type
-
shielding¶ This is an alias for the
damage_mitigatedattribute.- Type
-
-
class
arez.LivePlayer[source]¶ Represents a live match player. You can find these on the
LiveMatch.team1andLiveMatch.team2attributes.-
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
CacheObjectwith 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
CacheObjectwith 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]
-
winrate¶ The calculated winrate as a fraction.
nanis returned if there was no matches played.- Type
-