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
andplatform
can be an empty string andPlatform.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.
-
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
-
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.
-
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
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
- 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
andPaladinsAPI.get_players
methods, as well as from upgrading aPartialPlayer
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
-
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.Unknown
for 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
0
indicates 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
Private
exception.
-
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_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
-
-
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
CacheObject
with 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
CacheObject
with 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
0
for non-Siege matches.- Type
-
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
-
party_number
¶ A number denoting the party the player belonged to.
0
means the player wasn’t in a party.- Type
-
disconnected
¶ Returns
True
if the player has disconnected during the match,False
otherwise.This is done by checking if either
damage_bot
orhealing_bot
are 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
.nan
is 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_mitigated
attribute.- Type
-
-
class
arez.
LivePlayer
[source]¶ Represents a live match player. You can find these on the
LiveMatch.team1
andLiveMatch.team2
attributes.-
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]
-
winrate
¶ The calculated winrate as a fraction.
nan
is returned if there was no matches played.- Type
-