API Reference (pyrez.api)¶
The following section outlines the API of Pyrez.
PaladinsAPI¶
These methods are supported by PaladinsAPI object.
- class pyrez.api.PaladinsAPI(devId, authKey, *, response_format=Format.JSON, sessionId=None, storeSession=True, headers=None, cookies=None, raise_for_status=True, logger_name=None, debug_mode=True, is_async=False, loop=None)¶
Represents a client that connects to Paladins API.
Note
Any player with
Privacy Mode
enabled in-game will return a null dataset from methods that require a playerId or playerName.- Keyword Arguments
devId (
int
) – Used for authentication. This is the Developer ID that you receive from Hi-Rez Studios.authKey (
str
) – Used for authentication. This is the Authentication Key that you receive from Hi-Rez Studios.response_format (Optional
Format
) – The response format that will be used by default when making requests. Passing inNone
or an invalid value will use the default instead of the passed in value.sessionId (Optional
str
) – Manually sets an active sessionId. Passing inNone
or an invalid sessionId will use the default instead of the passed in value.storeSession (Optional
bool
) – Allows Pyrez to read and store sessionId in a .json file. Defaults toFalse
.
- Raises
pyrez.exceptions.UnauthorizedError – Raised when the
Developer ID
orAuthentication Key
is not specified.pyrez.exceptions.InvalidArgument – Raised when an invalid
Credentials
is passed.
- onSessionCreated¶
pyrez.events.Event
– A decorator that registers an event to listen to.
- statusPage¶
StatusPageAPI
– An object that representsStatusPageAPI
client.
- classmethod Async(devId, authKey, *, response_format=Format.JSON, sessionId=None, storeSession=True, headers=None, cookies=None, raise_for_status=True, logger_name=None, debug_mode=True, loop=None)¶
An asynchronous PaladinsAPI.
- Basic Usage:
>>> import pyrez >>> paladins = pyrez.PaladinsAPI.Async(devId, authKey) >>> player = await paladins.getPlayer('feyrazzle')
- Or as a context manager:
>>> import pyrez >>> async with pyrez.PaladinsAPI.Async(devId, authKey) as paladins: >>> return await paladins.getPlayer('feyrazzle')
- close()¶
Properly close the underlying HTTP session
- getChampionCards(godId, language=Language.English)¶
Returns all Champion cards.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
list
ofChampionCard
objects orNone
- Return type
- getChampionLeaderboard(godId, queueId=QueuePaladins.Live_Competitive_Keyboard)¶
Returns the current season’s leaderboard for a champion/queue combination.
- Parameters
queueId (Optional
int
orQueuePaladins
) – The id of the game mode. Passing inNone
will usepyrez.enumerations.QueuePaladins.Live_Competitive_Keyboard
instead of the passed in value.
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
list
ofpyrez.models.Smite.GodLeaderboard
objects orNone
- Return type
- getChampionRanks(playerId)¶
Returns the Rank and Worshippers value for each Champion a player has played.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getChampionSkins(godId, language=Language.English)¶
Returns all available skins for a particular Champion.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getChampions(language=Language.English)¶
Returns all Champions and their various attributes.
- Parameters
language (Optional
int
orLanguage
) – The language that you want results returned in. Passing inNone
will useLanguage.English
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getDataUsed()¶
Returns API Developer daily usage limits and the current status against those limits.
Note
Getting your data usage does contribute to your daily API limits.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
pyrez.models.DataUsed
object containing resources used orNone
.- Return type
pyrez.models.DataUsed
orNone
- getDemoDetails(matchId)¶
Returns information regarding a particular match.
Note
Rarely used in lieu of
getMatch()
.- Parameters
matchId (
int
) – The id of the match. Can be obtained fromgetMatchHistory()
,getTopMatches()
&getMatchIds()
.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getEsportsProLeague()¶
Returns the matchup information for each matchup for the current eSports Pro League season.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.
- getFriends(playerId)¶
Returns the User names of each of the player’s friends of one player.
- Parameters
playerId (
int
) –
Note
This method is PC only.
- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
List of pyrez.models.Friend objects
- getGodLeaderboard(godId, queueId)¶
Returns the current season’s leaderboard for a god/queue combination.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getGodRanks(playerId)¶
Returns the Rank and Worshippers value for each God a player has played.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
List of pyrez.models.GodRank objects
- getGodSkins(godId, language=Language.English)¶
Returns all available skins for a particular God.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getGods(language=Language.English)¶
Returns all Gods and their various attributes.
- Parameters
language (Optional
int
orLanguage
) – The language that you want results returned in. Passing inNone
will useLanguage.English
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
Returns a
list
ofpyrez.models.Paladins.Champion
objects
- getItems(language=Language.English)¶
Returns all Items and their various attributes.
- Parameters
language (Optional
int
orLanguage
) – The language that you want results returned in. Passing inNone
will useLanguage.English
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getLatestPatchNotes(language=Language.English)¶
- getLeagueLeaderboard(queueId, tier, split)¶
Returns the top players for a particular league (as indicated by the queue/tier/split parameters).
- Parameters
- Raises
TypeError – Raised when more than 3 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getLeagueSeasons(queueId)¶
Provides a list of seasons (including the single active season) for a match queue.
- Parameters
queueId (
int
) – The id of the game mode- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getMatch(match_id, is_live=False)¶
Returns the player information / statistics for a particular match.
There is three ways to call this method:
getMatch(match_id) #or getMatch([match_id, match_id, match_id, match_id, match_id]) #or getMatch(match_id, True)
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.Warning
There is a byte limit to the amount of data returned.
Please limit the match_id parameter to 5-10 matches for DB Performance reasons.
- getMatchHistory(playerId)¶
Gets recent matches and high level match statistics for a particular player.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getMatchIds(queueId, date=None, hour=- 1)¶
Lists all Match IDs for a particular Match Queue.
Useful for API developers interested in constructing data by Queue.
- Parameters
- Raises
TypeError – Raised when more than 3 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.Warning
To avoid HTTP timeouts in the getMatchIds() method, you can now specify a 10-minute window within the specified {hour} field to lessen the size of data returned by appending a “,mm” value to the end of {hour}.
For example, to get the match Ids for the first 10 minutes of hour 3, you would specify {hour} as “3,00”.
- This would only return the Ids between the time 3:00 to 3:09. Rules below:
Only valid values for mm are “00”, “10”, “20”, “30”, “40”, “50”.
To get the entire third hour worth of Match Ids, call getMatchIds() 6 times, specifying the following values for {hour}: “3,00”, “3,10”, “3,20”, “3,30”, “3,40”, “3,50”.
- getPatchInfo()¶
Function returns information about current deployed patch.
Note
Currently, this information only includes patch version.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
Object of pyrez.models.PatchInfo
- getPlayer(player, portalId=None)¶
Returns league and other high level data for a particular player.
- Parameters
player (
str
orint
) – playerName or playerId of the player you want to get info onportalId (Optional
int
orpyrez.enumerations.PortalId
) – The portalId that you want to looking for (Defaults toNone
)
- Raises
pyrez.exceptions.PlayerNotFound – Raised if the given player does not exist or it’s hidden.
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerAchievements(playerId)¶
Returns select achievement totals for the specified playerId.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerId(playerName, portalId=None, xboxOrSwitch=False)¶
Function returns a list of Hi-Rez playerId values.
- Parameters
portalId (Optional
int
orpyrez.enumerations.PortalId
) – Only returns a list of Hi-Rez playerId values for portalId provided. (Defaults toNone
)xboxOrSwitch (
bool
) –Meaningful only for the Paladins Xbox and Switch API.
Therefore a Paladins Gamer Tag value could be the same as a Paladins Switch Gamer Tag value.
Additionally, there could be multiple identical Paladins Switch Gamer Tag values. The purpose of this parameter is to return all Player ID data associated with the playerName (gamer tag) parameter. The expectation is that the unique player_id returned could then be used in subsequent method calls.
- Raises
TypeError – Raised when more than 3 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerLoadouts(playerId, language=Language.English)¶
Returns deck loadouts per Champion.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerStatus(playerId)¶
- Returns player status as follows:
0: Offline,
1: In Lobby,
2: God Selection,
3: In Game,
4: Online,
5: Player not found
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Object of pyrez.models.PlayerStatus containing player status
- Return type
- getQueueStats(playerId, queueId)¶
Returns match summary statistics for a (player, queue) combination grouped by gods played.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getServerStatus()¶
Function returns
UP
/DOWN
status for the primary game/platform environments.Note
Data is cached once a minute.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Object of pyrez.models.HiRezServerStatus
- Return type
pyrez.models.HiRezServerStatus
- getWebsitePost(language=Language.English, slug=None, query=None)¶
- makeRequest(api_method=None, params=())¶
Construct and make a HTTP request to Hi-Rez Studios API.
- Parameters
- Raises
pyrez.exceptions.RateLimitExceeded – Raised when the daily request limit is reached.
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
pyrez.exceptions.UnauthorizedError – Raised when a wrong
Credentials
is passed.pyrez.exceptions.RequestError – Raised when the server encountered an error processing the request.
pyrez.exceptions.NotFound – Raised when the requested endpoint is not found.
pyrez.exceptions.SessionLimitExceeded – Raised when the maximum number of active sessions is reached.
- ping()¶
A quick way of validating access (establish connectivity) to the Hi-Rez API.
You do not need to authenticate your ID or key to do this.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
pyrez.models.Ping
objects containing infos about the API.- Return type
- searchPlayers(playerName)¶
- Parameters
playerName (
str
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- coroutine sleep(seconds)¶
Sleep for the specified number of seconds.
- testSession(sessionId=None)¶
A means of validating that a session is established.
- Parameters
sessionId (Optional
str
) – A sessionId to validate. Passing inNone
will usesessionId
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns True if the given sessionId is valid, False otherwise.
- Return type
RealmRoyaleAPI¶
These methods are supported by RealmRoyaleAPI object.
- class pyrez.api.RealmRoyaleAPI(devId, authKey, *, response_format=Format.JSON, sessionId=None, storeSession=True, headers=None, cookies=None, raise_for_status=True, logger_name=None, debug_mode=True, is_async=False, loop=None)¶
Represents a client that connects to Realm Royale API.
Note
Any player with
Privacy Mode
enabled in-game will return a null dataset from methods that require a playerId or playerName.- Keyword Arguments
devId (
int
) – Used for authentication. This is the Developer ID that you receive from Hi-Rez Studios.authKey (
str
) – Used for authentication. This is the Authentication Key that you receive from Hi-Rez Studios.response_format (Optional
Format
) – The response format that will be used by default when making requests. Passing inNone
or an invalid value will use the default instead of the passed in value.sessionId (Optional
str
) – Manually sets an active sessionId. Passing inNone
or an invalid sessionId will use the default instead of the passed in value.storeSession (Optional
bool
) – Allows Pyrez to read and store sessionId in a .json file. Defaults toFalse
.
- Raises
pyrez.exceptions.UnauthorizedError – Raised when the
Developer ID
orAuthentication Key
is not specified.pyrez.exceptions.InvalidArgument – Raised when an invalid
Credentials
is passed.
- onSessionCreated¶
pyrez.events.Event
– A decorator that registers an event to listen to.
- statusPage¶
StatusPageAPI
– An object that representsStatusPageAPI
client.
- classmethod Async(devId, authKey, *, response_format=Format.JSON, sessionId=None, storeSession=True, headers=None, cookies=None, raise_for_status=True, logger_name=None, debug_mode=True, loop=None)¶
Asynchronous version of :class:.APIBase` with synchronous context management capabilities.
- close()¶
Properly close the underlying HTTP session
- getDataUsed()¶
Returns API Developer daily usage limits and the current status against those limits.
Note
Getting your data usage does contribute to your daily API limits.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
pyrez.models.DataUsed
object containing resources used orNone
.- Return type
pyrez.models.DataUsed
orNone
- getFriends(playerId)¶
Returns the User names of each of the player’s friends of one player.
- Parameters
playerId (
int
) –
Note
This method is PC only.
- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
List of pyrez.models.Friend objects
- getItems(language=Language.English)¶
Get all talents
- Parameters
language (Optional
int
orLanguage
) – The language that you want results returned in. Passing inNone
will useLanguage.English
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getLeaderboard(queueId, rankingCriteria)¶
- Parameters
rankingCriteria (
int
) – Can be: - 1: team_wins, - 2: team_average_placement (shown below), - 3: individual_average_kills, - 4. win_rate, possibly/probably others as desired
Note
for duo and quad queues/modes the individual’s placement results reflect their team/grouping; solo is self-explanatory
will limit results to the top 500 players (minimum 50 matches played per queue); we never like to expose weak/beginner players
players that select to be “private” will have their player_name and player_id values hidden
Warning
Expect this data to be cached on an hourly basis because the query to acquire the data will be expensive; don’t spam the calls
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getMatch(match_id, is_live=False)¶
Returns the player information / statistics for a particular match.
There is three ways to call this method:
getMatch(match_id) #or getMatch([match_id, match_id, match_id, match_id, match_id]) #or getMatch(match_id, True)
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.Warning
There is a byte limit to the amount of data returned.
Please limit the match_id parameter to 5-10 matches for DB Performance reasons.
- getMatchHistory(playerId, startDatetime=None)¶
Gets recent matches and high level match statistics for a particular player.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getMatchIds(queueId, date=None, hour=- 1)¶
Lists all Match IDs for a particular Match Queue.
Useful for API developers interested in constructing data by Queue.
- Parameters
- Raises
TypeError – Raised when more than 3 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.Warning
To avoid HTTP timeouts in the getMatchIds() method, you can now specify a 10-minute window within the specified {hour} field to lessen the size of data returned by appending a “,mm” value to the end of {hour}.
For example, to get the match Ids for the first 10 minutes of hour 3, you would specify {hour} as “3,00”.
- This would only return the Ids between the time 3:00 to 3:09. Rules below:
Only valid values for mm are “00”, “10”, “20”, “30”, “40”, “50”.
To get the entire third hour worth of Match Ids, call getMatchIds() 6 times, specifying the following values for {hour}: “3,00”, “3,10”, “3,20”, “3,30”, “3,40”, “3,50”.
- getPatchInfo()¶
Function returns information about current deployed patch.
Note
Currently, this information only includes patch version.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
Object of pyrez.models.PatchInfo
- getPlayer(player, platform=None)¶
Returns league and other high level data for a particular player.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerAchievements(playerId)¶
Returns select achievement totals for the specified playerId.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerId(playerName, portalId=None)¶
Function returns a list of Hi-Rez playerId values.
- Parameters
playerName (
int
orstr
) – Function returns a list of Hi-Rez playerId values (expected list size = 1) for playerName provided.portalId (Optional
int
orpyrez.enumerations.PortalId
) – Only returns a list of Hi-Rez playerId values for portalId provided. (Defaults toNone
)
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerStats(playerId)¶
- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerStatus(playerId)¶
- Returns player status as follows:
0: Offline,
1: In Lobby,
2: God Selection,
3: In Game,
4: Online,
5: Player not found
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Object of pyrez.models.PlayerStatus containing player status
- Return type
- getQueueStats(playerId, queueId)¶
Returns match summary statistics for a (player, queue) combination grouped by gods played.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getServerStatus()¶
Function returns
UP
/DOWN
status for the primary game/platform environments.Note
Data is cached once a minute.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Object of pyrez.models.HiRezServerStatus
- Return type
pyrez.models.HiRezServerStatus
- makeRequest(api_method=None, params=())¶
Construct and make a HTTP request to Hi-Rez Studios API.
- Parameters
- Raises
pyrez.exceptions.RateLimitExceeded – Raised when the daily request limit is reached.
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
pyrez.exceptions.UnauthorizedError – Raised when a wrong
Credentials
is passed.pyrez.exceptions.RequestError – Raised when the server encountered an error processing the request.
pyrez.exceptions.NotFound – Raised when the requested endpoint is not found.
pyrez.exceptions.SessionLimitExceeded – Raised when the maximum number of active sessions is reached.
- ping()¶
A quick way of validating access (establish connectivity) to the Hi-Rez API.
You do not need to authenticate your ID or key to do this.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
pyrez.models.Ping
objects containing infos about the API.- Return type
- searchPlayers(playerName)¶
- Parameters
playerName (
str
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- coroutine sleep(seconds)¶
Sleep for the specified number of seconds.
- testSession(sessionId=None)¶
A means of validating that a session is established.
- Parameters
sessionId (Optional
str
) – A sessionId to validate. Passing inNone
will usesessionId
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns True if the given sessionId is valid, False otherwise.
- Return type
SmiteAPI¶
These methods are supported by SmiteAPI object.
- class pyrez.api.SmiteAPI(devId, authKey, *, response_format=Format.JSON, sessionId=None, storeSession=True, headers=None, cookies=None, raise_for_status=True, logger_name=None, debug_mode=True, is_async=False, loop=None)¶
Represents a client that connects to Smite API.
Note
Any player with
Privacy Mode
enabled in-game will return a null dataset from methods that require a playerId or playerName.- Keyword Arguments
devId (
int
) – Used for authentication. This is the Developer ID that you receive from Hi-Rez Studios.authKey (
str
) – Used for authentication. This is the Authentication Key that you receive from Hi-Rez Studios.response_format (Optional
Format
) – The response format that will be used by default when making requests. Passing inNone
or an invalid value will use the default instead of the passed in value.sessionId (Optional
str
) – Manually sets an active sessionId. Passing inNone
or an invalid sessionId will use the default instead of the passed in value.storeSession (Optional
bool
) – Allows Pyrez to read and store sessionId in a .json file. Defaults toFalse
.
- Raises
pyrez.exceptions.UnauthorizedError – Raised when the
Developer ID
orAuthentication Key
is not specified.pyrez.exceptions.InvalidArgument – Raised when an invalid
Credentials
is passed.
- onSessionCreated¶
pyrez.events.Event
– A decorator that registers an event to listen to.
- statusPage¶
StatusPageAPI
– An object that representsStatusPageAPI
client.
- classmethod Async(devId, authKey, *, response_format=Format.JSON, sessionId=None, storeSession=True, headers=None, cookies=None, raise_for_status=True, logger_name=None, debug_mode=True, loop=None)¶
Asynchronous version of :class:.APIBase` with synchronous context management capabilities.
- close()¶
Properly close the underlying HTTP session
- getDataUsed()¶
Returns API Developer daily usage limits and the current status against those limits.
Note
Getting your data usage does contribute to your daily API limits.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
pyrez.models.DataUsed
object containing resources used orNone
.- Return type
pyrez.models.DataUsed
orNone
- getDemoDetails(matchId)¶
Returns information regarding a particular match.
Note
Rarely used in lieu of
getMatch()
.- Parameters
matchId (
int
) – The id of the match. Can be obtained fromgetMatchHistory()
,getTopMatches()
&getMatchIds()
.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getEsportsProLeague()¶
Returns the matchup information for each matchup for the current eSports Pro League season.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.
- getFriends(playerId)¶
Returns the User names of each of the player’s friends of one player.
- Parameters
playerId (
int
) –
Note
This method is PC only.
- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
List of pyrez.models.Friend objects
- getGodLeaderboard(godId, queueId)¶
Returns the current season’s leaderboard for a god/queue combination.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getGodRanks(playerId)¶
Returns the Rank and Worshippers value for each God a player has played.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
List of pyrez.models.GodRank objects
- getGodRecommendedItems(godId, language=Language.English)¶
Returns the Recommended Items for a particular God.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getGodSkins(godId, language=Language.English)¶
Returns all available skins for a particular God.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getGods(language=Language.English)¶
Returns all Gods and their various attributes.
- Parameters
language (Optional
int
orLanguage
) – The language that you want results returned in. Passing inNone
will useLanguage.English
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
List of pyrez.models.God or pyrez.models.Champion objects
- getItems(language=Language.English)¶
Returns all Items and their various attributes.
- Parameters
language (Optional
int
orLanguage
) – The language that you want results returned in. Passing inNone
will useLanguage.English
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getLeagueLeaderboard(queueId, tier, split)¶
Returns the top players for a particular league (as indicated by the queue/tier/split parameters).
- Parameters
- Raises
TypeError – Raised when more than 3 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getLeagueSeasons(queueId)¶
Provides a list of seasons (including the single active season) for a match queue.
- Parameters
queueId (
int
) – The id of the game mode- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getMatch(match_id, is_live=False)¶
Returns the player information / statistics for a particular match.
There is three ways to call this method:
getMatch(match_id) #or getMatch([match_id, match_id, match_id, match_id, match_id]) #or getMatch(match_id, True)
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.Warning
There is a byte limit to the amount of data returned.
Please limit the match_id parameter to 5-10 matches for DB Performance reasons.
- getMatchHistory(playerId)¶
Gets recent matches and high level match statistics for a particular player.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getMatchIds(queueId, date=None, hour=- 1)¶
Lists all Match IDs for a particular Match Queue.
Useful for API developers interested in constructing data by Queue.
- Parameters
- Raises
TypeError – Raised when more than 3 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.Warning
To avoid HTTP timeouts in the getMatchIds() method, you can now specify a 10-minute window within the specified {hour} field to lessen the size of data returned by appending a “,mm” value to the end of {hour}.
For example, to get the match Ids for the first 10 minutes of hour 3, you would specify {hour} as “3,00”.
- This would only return the Ids between the time 3:00 to 3:09. Rules below:
Only valid values for mm are “00”, “10”, “20”, “30”, “40”, “50”.
To get the entire third hour worth of Match Ids, call getMatchIds() 6 times, specifying the following values for {hour}: “3,00”, “3,10”, “3,20”, “3,30”, “3,40”, “3,50”.
- getMotd()¶
Returns information about the 20 most recent Match-of-the-Days.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.
- getPatchInfo()¶
Function returns information about current deployed patch.
Note
Currently, this information only includes patch version.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
- Return type
Object of pyrez.models.PatchInfo
- getPlayerAchievements(playerId)¶
Returns select achievement totals for the specified playerId.
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerId(playerName, portalId=None)¶
Function returns a list of Hi-Rez playerId values.
- Parameters
playerName (
int
orstr
) – Function returns a list of Hi-Rez playerId values (expected list size = 1) for playerName provided.portalId (Optional
int
orpyrez.enumerations.PortalId
) – Only returns a list of Hi-Rez playerId values for portalId provided. (Defaults toNone
)
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getPlayerStatus(playerId)¶
- Returns player status as follows:
0: Offline,
1: In Lobby,
2: God Selection,
3: In Game,
4: Online,
5: Player not found
- Parameters
playerId (
int
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Object of pyrez.models.PlayerStatus containing player status
- Return type
- getQueueStats(playerId, queueId)¶
Returns match summary statistics for a (player, queue) combination grouped by gods played.
- Parameters
- Raises
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- getServerStatus()¶
Function returns
UP
/DOWN
status for the primary game/platform environments.Note
Data is cached once a minute.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Object of pyrez.models.HiRezServerStatus
- Return type
pyrez.models.HiRezServerStatus
- getTeamDetails(clanId)¶
Lists the number of players and other high level details for a particular clan.
Note
This method raises
makeRequest()
exceptions.
- getTeamPlayers(clanId)¶
Lists the players for a particular clan.
Note
This method raises
makeRequest()
exceptions.
- getTopMatches()¶
Lists the 50 most watched / most recent recorded matches.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.
- makeRequest(api_method=None, params=())¶
Construct and make a HTTP request to Hi-Rez Studios API.
- Parameters
- Raises
pyrez.exceptions.RateLimitExceeded – Raised when the daily request limit is reached.
TypeError – Raised when more than 2 parameters or less than 1 parameter is passed.
pyrez.exceptions.UnauthorizedError – Raised when a wrong
Credentials
is passed.pyrez.exceptions.RequestError – Raised when the server encountered an error processing the request.
pyrez.exceptions.NotFound – Raised when the requested endpoint is not found.
pyrez.exceptions.SessionLimitExceeded – Raised when the maximum number of active sessions is reached.
- ping()¶
A quick way of validating access (establish connectivity) to the Hi-Rez API.
You do not need to authenticate your ID or key to do this.
- Raises
TypeError – Raised when passing any parameters.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns a
pyrez.models.Ping
objects containing infos about the API.- Return type
- searchPlayers(playerName)¶
- Parameters
playerName (
str
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- searchTeams(searchTeam)¶
Returns high level information for Clan names containing the
searchTeam
string.- Parameters
searchTeam (
str
) –- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.
- coroutine sleep(seconds)¶
Sleep for the specified number of seconds.
- testSession(sessionId=None)¶
A means of validating that a session is established.
- Parameters
sessionId (Optional
str
) – A sessionId to validate. Passing inNone
will usesessionId
instead of the passed in value.- Raises
TypeError – Raised when more (or less) than 1 parameter is passed.
Note
This method raises
makeRequest()
exceptions.- Returns
Returns True if the given sessionId is valid, False otherwise.
- Return type
StatusPageAPI¶
These methods are supported by StatusPageAPI object.
- class pyrez.api.StatusPageAPI¶
A wrapper for the Status Page API, exposing convenient actions useful for embedding your status anywhere.
- classmethod Async(headers=None, cookies=None, raise_for_status=True, logger_name=None, debug_mode=True, loop=None)¶
Asynchronous version of :class:.APIBase` with synchronous context management capabilities.
- close()¶
Properly close the underlying HTTP session
- getComponents()¶
Get the components for the Status Page.
Each component is listed along with its status - one of
operational
,degraded_performance
,partial_outage
, ormajor_outage
.
- getHistory(_format=Format.JSON)¶
Get the history for the Status Page.
- Parameters
_format (Optional
Format
) – Passing inNone
will use the default instead of the passed in value.
- getIncidents(unresolvedOnly=False)¶
Get a list of the 50 most recent incidents. This includes all unresolved incidents (
Investigating
,Identified
,Monitoring
,Resolved
, orPostmortem
).- Parameters
unresolvedOnly (Optional
bool
) – Only returns a list of unresolved incidents state (Investigating
,Identified
, orMonitoring
).
- getScheduledMaintenances(activeOnly=False, upcomingOnly=False)¶
Get a list of the 50 most recent scheduled maintenances. This includes all scheduled maintenances (
Scheduled
,In Progress
,Verifying
, orCompleted
).
- getStatus()¶
Get the status rollup for the whole Status Page.
This endpoint includes an indicator - one of none, minor, major, or critical, as well as a human description of the blended component status.
Examples of the blended status include
All Systems Operational
,Partial System Outage
, andMajor Service Outage
.
- getSummary()¶
Get a summary of the Status Page, including a status indicator, component statuses, unresolved incidents, and any upcoming or in-progress scheduled maintenances.
- coroutine sleep(seconds)¶
Sleep for the specified number of seconds.
Enums (pyrez.enumerations)¶
There are several enums used within Pyrez to make it easier for you to configure the library for use how you like.
- class pyrez.enumerations.Enum(value)¶
Represents a generic enum object. This is a sub-class of
enum.Enum
.Supported Operations:
Operation
Description
x == y
Checks if two Enum are equal.
x != y
Checks if two Enum are not equal.
hash(x)
Return the Enum’s hash.
str(x)
Returns the Enum’s name with discriminator.
int(x)
Return the Enum’s value as int.
- equal(other)¶
- getId()¶
- getName()¶
- class pyrez.enumerations.Champions(value)¶
Represents a Paladins Champion. This is a sub-class of
Enum
.Supported Operations:
Operation
Description
x == y
Checks if two Champions are equal.
x != y
Checks if two Champions are not equal.
hash(x)
Return the Champion’s hash.
str(x)
Returns the Champion’s name with discriminator.
int(x)
Return the Champion’s value as int.
- Androxus = 2205¶
- Ash = 2404¶
- Atlas = 2512¶
- Barik = 2073¶
- Bomb_King = 2281¶
- Buck = 2147¶
- Cassie = 2092¶
- Dredge = 2495¶
- Drogoz = 2277¶
- Evie = 2094¶
- Fernando = 2071¶
- Furia = 2491¶
- Grohk = 2093¶
- Grover = 2254¶
- Imani = 2509¶
- Inara = 2348¶
- Jenos = 2431¶
- Khan = 2479¶
- Kinessa = 2249¶
- Koga = 2493¶
- Lex = 2362¶
- Lian = 2417¶
- Maeve = 2338¶
- Makoa = 2288¶
- Mal_Damba = 2303¶
- Moji = 2481¶
- Pip = 2056¶
- Ruckus = 2149¶
- Seris = 2372¶
- Sha_Lin = 2307¶
- Skye = 2057¶
- Strix = 2438¶
- Talus = 2472¶
- Terminus = 2477¶
- Torvald = 2322¶
- Tyra = 2314¶
- Viktor = 2285¶
- Vivian = 2480¶
- Willo = 2393¶
- Ying = 2267¶
- Zhin = 2420¶
- property getHeader¶
- property getIcon¶
- property isDamage¶
- property isFlank¶
- property isFrontline¶
- property isSupport¶
- class pyrez.enumerations.Classes.Classes(value)¶
An enumeration.
- Assassin = 2496¶
- Engineer = 2495¶
- Hunter = 2493¶
- Mage = 2494¶
- Warrior = 2285¶
- class pyrez.enumerations.Endpoint(value)¶
Representing an endpoint that you want to access to retrieve information from.
- getEndpoint(_endpoint=None)¶
- switch(endpoint)¶
- HAND_OF_THE_GODS = 'http://api.handofthegods.com/handofthegodsapi.svc'¶
- HIREZ = 'https://api.hirezstudios.com'¶
- PALADINS = 'http://api.paladins.com/paladinsapi.svc'¶
- PALADINS_STRIKE = 'http://api.paladinsstrike.com/paladinsstrike.svc'¶
- REALM_ROYALE = 'http://api.realmroyale.com/realmapi.svc'¶
- SMITE = 'http://api.smitegame.com/smiteapi.svc'¶
- STATUS_PAGE = 'https://stk4xr7r1y0r.statuspage.io'¶
- class pyrez.enumerations.Format(value)¶
An enumeration.
- ATOM = 'atom'¶
- JSON = 'json'¶
- RSS = 'rss'¶
- XML = 'xml'¶
- class pyrez.enumerations.Gods(value)¶
An enumeration.
- Achilles = 3492¶
- Agni = 1737¶
- Ah_Muzen_Cab = 1956¶
- Ah_Puch = 2056¶
- Amaterasu = 2110¶
- Anhur = 1773¶
- Anubis = 1668¶
- Ao_Kuang = 2034¶
- Aphrodite = 1898¶
- Apollo = 1899¶
- Arachne = 1699¶
- Ares = 1782¶
- Artemis = 1748¶
- Artio = 3336¶
- Athena = 1919¶
- Awilix = 2037¶
- Bacchus = 1809¶
- Bakasura = 1755¶
- Baron_Samedi = 3518¶
- Bastet = 1678¶
- Bellona = 2047¶
- Cabrakan = 2008¶
- Camazotz = 2189¶
- Cerberus = 3419¶
- Cernunnos = 2268¶
- Chaac = 1966¶
- Change = 1921¶
- Chernobog = 3509¶
- Chiron = 2075¶
- Chronos = 1920¶
- Cu_Chulainn = 2319¶
- Cupid = 1778¶
- Da_Ji = 2270¶
- Discordia = 3377¶
- Erlang_Shen = 2138¶
- Fafnir = 2136¶
- Fenrir = 1843¶
- Freya = 1784¶
- Ganesha = 2269¶
- Geb = 1978¶
- Guan_Yu = 1763¶
- Hachiman = 3344¶
- Hades = 1676¶
- He_Bo = 1674¶
- Hel = 1718¶
- Hera = 3558¶
- Hercules = 1848¶
- Horus = 3611¶
- Hou_Yi = 2040¶
- Hun_Batz = 1673¶
- Isis = 1918¶
- Izanami = 2179¶
- Janus = 1999¶
- Jing_Wei = 2122¶
- Jormungandr = 3585¶
- Kali = 1649¶
- Khepri = 2066¶
- King_Arthur = 3565¶
- Kukulkan = 1677¶
- Kumbhakarna = 1993¶
- Kuzenbo = 2260¶
- Loki = 1797¶
- Medusa = 2051¶
- Mercury = 1941¶
- Merlin = 3566¶
- Ne_Zha = 1915¶
- Neith = 1872¶
- Nemesis = 1980¶
- Nike = 2214¶
- Nox = 2036¶
- Nu_Wa = 1958¶
- Odin = 1669¶
- Osiris = 2000¶
- Pele = 3543¶
- Poseidon = 1881¶
- Ra = 1698¶
- Raijin = 2113¶
- Rama = 2002¶
- Ratatoskr = 2063¶
- Ravana = 2065¶
- Scylla = 1988¶
- Serqet = 2005¶
- Set = 3612¶
- Skadi = 2107¶
- Sobek = 1747¶
- Sol = 2074¶
- Sun_Wukong = 1944¶
- Susano = 2123¶
- Sylvanus = 2030¶
- Terra = 2147¶
- Thanatos = 1943¶
- The_Morrigan = 2226¶
- Thor = 1779¶
- Thoth = 2203¶
- Tyr = 1924¶
- Ullr = 1991¶
- Vamana = 1723¶
- Vulcan = 1869¶
- Xbalanque = 1864¶
- Xing_Tian = 2072¶
- Ymir = 1670¶
- Zeus = 1672¶
- Zhong_Kui = 1926¶
- property getCard¶
- property getIcon¶
- property isAssassin¶
- property isGuardian¶
- property isHunter¶
- property isMage¶
- property isWarrior¶
- class pyrez.enumerations.Language(value)¶
An enumeration.
- Chinese = 5¶
- English = 1¶
- French = 3¶
- German = 2¶
- Polish = 12¶
- Portuguese = 10¶
- Russian = 11¶
- Spanish = 7¶
- Spanish_Latin_America = 9¶
- Turkish = 13¶
- class pyrez.enumerations.PortalId(value)¶
An enumeration.
- Discord = 25¶
- HiRez = 1¶
- Mixer = 14¶
- PS4 = 9¶
- Steam = 5¶
- Switch = 22¶
- Unknown = -1¶
- Xbox = 10¶
- class pyrez.enumerations.Region(value)¶
An enumeration.
- AUSTRALIA = 'Australia'¶
- BRAZIL = 'Brazil'¶
- EUROPE = 'Europe'¶
- LATIN_AMERICA_NORTH = 'Latin America North'¶
- NORTH_AMERICA = 'North America'¶
- SOUTHEAST_ASIA = 'Southeast Asia'¶
- UNKNOWN = ''¶
- class pyrez.enumerations.QueuePaladins(value)¶
An enumeration.
- Challenge_FP = 442¶
- Challenge_IP = 443¶
- Challenge_TP = 441¶
- Classic_Siege = 465¶
- Custom_Event_End_Times = 489¶
- Custom_Onslaught_Foreman_Rise = 462¶
- Custom_Onslaught_Magistrate_Archives = 464¶
- Custom_Onslaught_Marauders_Port = 483¶
- Custom_Onslaught_Primal_Court = 455¶
- Custom_Onslaught_Snowfall_Junction = 454¶
- Custom_Siege_Ascension_Peak = 473¶
- Custom_Siege_Bazaar = 426¶
- Custom_Siege_Brightmarsh = 458¶
- Custom_Siege_Fish_Market = 431¶
- Custom_Siege_Frog_Isle = 433¶
- Custom_Siege_Frozen_Guard = 432¶
- Custom_Siege_Ice_Mines = 439¶
- Custom_Siege_Jaguar_Falls = 438¶
- Custom_Siege_Serpeant_Beach = 440¶
- Custom_Siege_Shattered_Desert = 487¶
- Custom_Siege_Splitstone_Quarry = 459¶
- Custom_Siege_Stone_Keep = 423¶
- Custom_Siege_Timber_Mill = 430¶
- Custom_Siege_Warders_Gate = 485¶
- Custom_Team_Deathmatch_Abyss = 479¶
- Custom_Team_Deathmatch_Dragon_Arena = 484¶
- Custom_Team_Deathmatch_Foreman_Rise = 471¶
- Custom_Team_Deathmatch_Magistrates_Archives = 472¶
- Custom_Team_Deathmatch_Throne = 480¶
- Custom_Team_Deathmatch_Trade_District = 468¶
- Live_Battlegrounds_Duo = 475¶
- Live_Battlegrounds_Quad = 476¶
- Live_Battlegrounds_Solo = 474¶
- Live_Competitive_GamePad = 428¶
- Live_Competitive_Keyboard = 486¶
- Live_Event_Ascension_Peak = 477¶
- Live_Event_End_Times = 488¶
- Live_Event_Rise_Of_Furia = 478¶
- Live_Onslaught = 452¶
- Live_Pratice_Onslaught = 453¶
- Live_Pratice_Siege = 425¶
- Live_Pratice_Team_Deathmatch = 470¶
- Live_Siege = 424¶
- Live_Team_DeathMatch = 469¶
- Live_Test_Maps = 445¶
- Multi_Queue = 999¶
- Payload = 437¶
- Perf_Capture_Map = 435¶
- Practice = 427¶
- PvE_Hands_That_Bind = 446¶
- PvE_HnS = 449¶
- PvE_Survival = 451¶
- Shooting_Range = 434¶
- Tencent_Alpha_Test_Queue_Coop = 436¶
- Tutorial = 444¶
- WIPPvE_High_Rollers = 448¶
- WIPPvE_Leap_Frogs = 450¶
- WIPPvE_Los_Pollos_Fernandos = 447¶
- zzRETIRED = 429¶
- class pyrez.enumerations.QueueRealmRoyale(value)¶
An enumeration.
- Live_Duo = 475¶
- Live_Duo_Low_Level = 484¶
- Live_Duo_Mid_Level = 483¶
- Live_Solo = 474¶
- Live_Solo_Low_Level = 480¶
- Live_Solo_Mid_Level = 479¶
- Live_Squad = 476¶
- Live_Squad_Low_Level = 482¶
- Live_Squad_Mid_Level = 481¶
- Live_Tutorial = 478¶
- Live_Wars = 477¶
- class pyrez.enumerations.QueueSmite(value)¶
For Smite, queue_id’s 426, 435, 440, 445, 448, 451, 459, & 450 are the only ones considered for player win/loss stats from /getplayer.
- Adventure_CH10 = 500¶
- Adventure_Horde = 495¶
- Adventure_Joust = 499¶
- Arena_League = 452¶
- Arena_Practice_Easy = 443¶
- Arena_Practice_Medium = 472¶
- Arena_Queue = 435¶
- Arena_Training = 483¶
- Arena_Tutorial = 462¶
- Arena_vs_AI_Easy = 457¶
- Arena_vs_AI_Medium = 468¶
- Assault = 445¶
- Assault_Practice_Easy = 479¶
- Assault_Practice_Medium = 480¶
- Assault_vs_AI_Easy = 481¶
- Assault_vs_AI_Medium = 454¶
- Basic_Tutorial = 436¶
- Clash = 466¶
- Clash_Practice_Easy = 470¶
- Clash_Practice_Medium = 477¶
- Clash_Tutorial = 471¶
- Clash_vs_AI_Easy = 478¶
- Clash_vs_AI_Medium = 469¶
- Conquest = 426¶
- Conquest_5v5 = 423¶
- Conquest_Practice_Easy = 458¶
- Conquest_Practice_Medium = 475¶
- Conquest_Ranked_GamePad = 504¶
- Conquest_Ranked_Keyboard = 451¶
- Conquest_Tutorial = 463¶
- Conquest_vs_AI_Easy = 476¶
- Conquest_vs_AI_Medium = 461¶
- Custom_Arena = 438¶
- Custom_Assault = 446¶
- Custom_Clash = 467¶
- Custom_Conquest = 429¶
- Custom_Joust = 441¶
- Custom_Siege = 460¶
- Domination = 433¶
- Domination_Challenge = 439¶
- Joust_1v1_Ranked_GamePad = 502¶
- Joust_1v1_Ranked_Keyboard = 440¶
- Joust_3v3_Ranked_GamePad = 503¶
- Joust_3v3_Ranked_Keyboard = 450¶
- Joust_3v3_Training = 482¶
- Joust_Practice_Easy = 464¶
- Joust_Practice_Medium = 473¶
- Joust_Queue_3v3 = 448¶
- Joust_vs_AI_Easy = 474¶
- Joust_vs_AI_Medium = 456¶
- Jungle_Practice = 444¶
- Jungle_Practice_Presele_ = 496¶
- Loki_Dungeon = 501¶
- MOTD = 434¶
- Novice_Queue = 424¶
- Practice = 427¶
- Siege_4v4 = 459¶
- class pyrez.enumerations.Status(value)¶
Represents player status as follows:
0: Offline,
1: In Lobby,
2: God Selection,
3: In Game,
4: Online,
5: Player not found
- God_Selection = 2¶
- In_Game = 3¶
- In_Lobby = 1¶
- Not_Found = 5¶
- Offline = 0¶
- Online = 4¶
- property isInGame¶
- property isOnline¶
- class pyrez.enumerations.Tier(value)¶
An enumeration.
- Bronze_I = 5¶
- Bronze_II = 4¶
- Bronze_III = 3¶
- Bronze_IV = 2¶
- Bronze_V = 1¶
- Diamond_I = 25¶
- Diamond_II = 24¶
- Diamond_III = 23¶
- Diamond_IV = 22¶
- Diamond_V = 21¶
- Gold_I = 15¶
- Gold_II = 14¶
- Gold_III = 13¶
- Gold_IV = 12¶
- Gold_V = 11¶
- Grandmaster = 27¶
- Master = 26¶
- Platinum_I = 20¶
- Platinum_II = 19¶
- Platinum_III = 18¶
- Platinum_IV = 17¶
- Platinum_V = 16¶
- Silver_I = 10¶
- Silver_II = 9¶
- Silver_III = 8¶
- Silver_IV = 7¶
- Silver_V = 6¶
- Unranked = 0¶
Exceptions (pyrez.exceptions)¶
The following exceptions are thrown by the library.
- exception pyrez.exceptions.Deprecated(*args, **kwargs)¶
- exception pyrez.exceptions.InvalidArgument(*args, **kwargs)¶
- exception pyrez.exceptions.InvalidTime(*args, **kwargs)¶
Invalid timestamp
- exception pyrez.exceptions.MatchException(*args, **kwargs)¶
- exception pyrez.exceptions.NoResult(*args, **kwargs)¶
- exception pyrez.exceptions.NotFound(*args, **kwargs)¶
- exception pyrez.exceptions.NotSupported(*args, **kwargs)¶
- exception pyrez.exceptions.PaladinsOnly(*args, **kwargs)¶
- exception pyrez.exceptions.PlayerNotFound(*args, **kwargs)¶
Raises an error when a player does not exist via the API
- exception pyrez.exceptions.PyrezException(*args, **kwargs)¶
Base exception for this library, catch-all for most Pyrez issues.
- exception pyrez.exceptions.RateLimitExceeded(*args, **kwargs)¶
Request rejected due to the rate limit being exceeded.
- exception pyrez.exceptions.RealmRoyaleOnly(*args, **kwargs)¶
- exception pyrez.exceptions.RequestError(*args, **kwargs)¶
- exception pyrez.exceptions.SessionLimitExceeded(*args, **kwargs)¶
Raised when the maximum number of active sessions is reached.
- exception pyrez.exceptions.SmiteOnly(*args, **kwargs)¶
- exception pyrez.exceptions.UnauthorizedError(*args, **kwargs)¶
Raised when the current Credentials is invalid, blocked or missing
- exception pyrez.exceptions.UnexpectedException(*args, **kwargs)¶