Welcome to Pyrez’s documentation!¶
Pyrez is an open-source wrapper for Hi-Rez Studios API that supports Paladins, Realm Royale and Smite, written in Python.
Getting Started¶
Registration¶
A Credentials that will provide access to Hi-Rez Studios API.
If you don’t already have a Credentials, click here to become developer.
Attention
If your application is accepted, you will receive an e-mail from Hi-Rez Studios containing your personal Credentials within a few days.
Credentials¶
To access the API you’ll need your own set of Credentials which consist of a Developer ID (devId) and an Authentication Key (authKey).
Here are the Credentials for a sample account:
devId | authKey |
1004 | 23DF3C7E9BD14D84BF892AD206B6755C |
Note
The same devId
and authKey
combination should work for Paladins API, Smite API and Realm Royale API, across all supported platforms.
Do not request a new, if you already have a Credentials.
Importing¶
import pyrez
import pyrez.api
from pyrez.api import PaladinsAPI, SmiteAPI, RealmRoyaleAPI
import pyrez.enumerations
import pyrez.models
Creating API object¶
paladins = PaladinsAPI(options)
#or
smite = SmiteAPI(options)
#or
reamlRoyale = RealmRoyaleAPI(options)
- Options can have the following fields:
- devId (
int
) – This is the Developer ID that you receive from Hi-Rez Studios. - authKey (
str
) – This is the Authentication Key that you receive from Hi-Rez Studios. - responseFormat (
Format
) – The response format that will be used by default when making requests. - sessionId (
str
) – The response format that will be used by default when making requests. - storeSession (
str
) – Allows Pyrez to read and store sessionId in a .json file.
- devId (
Sessions¶
Sessions are created automatically and self-managed by Pyrez so you really don’t need to initialise / call this method directly. However, you can set it manually or even request a new Session.
Manually:
paladins = PaladinsAPI(devId=1004,
authKey="23DF3C7E9BD14D84BF892AD206B6755C",
sessionId="1465AFCA32DBDB800CEF8C72F296C52C")
Requesting a new Session:
paladins = PaladinsAPI(devId=1004, authKey="23DF3C7E9BD14D84BF892AD206B6755C")
session = paladins._createSession()
print(session.sessionId)
>>> '1465AFCA32DBDB800CEF8C72F296C52C'
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, responseFormat=Format.JSON, sessionId=None, storeSession=True)¶ 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. - responseFormat (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.IdOrAuthEmpty
– Raised when theDeveloper ID
orAuthentication Key
is not specified.pyrez.exceptions.InvalidArgument
– Raised when an invalidCredentials
is passed.
-
onSessionCreated
¶ pyrez.events.Event
– A decorator that registers an event to listen to.
-
statusPage
¶ StatusPageAPI
– An object that representsStatusPageAPI
client.
-
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: list
ofpyrez.models.Paladins.ChampionCard
-
getChampionLeaderboard
(godId, queueId=QueuePaladins.Live_Competitive_Keyboard)¶ Returns the current season’s leaderboard for a champion/queue combination.
Parameters: - godId (
int
orChampions
) – The god ID. - 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: list
ofpyrez.models.Smite.GodLeaderboard
- godId (
-
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)¶ 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.
-
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 modeRaises: TypeError
– Raised when more (or less) than 1 parameter is passed.Note
This method raises
makeRequest()
exceptions.
-
getMatch
(matchId, isLiveMatch=False)¶ Returns the player information / statistics for a particular match.
There is three ways to call this method:
getMatch(matchId) #or getMatch([matchId, matchId, matchId]) #or getMatch(matchId, 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 matchId 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 on - portalId (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.Returns: list
of pyrez.models.Paladins.Player objects with league and other high level data for a particular player.Return type: list
of pyrez.models.Paladins.Player- player (
-
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: - playerName (
str
orint
) – - 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.- playerName (
-
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: pyrez.models.PlayerStatus
-
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)¶ 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 than 3 parameters or less than 1 parameter is passed.
-
makeRequest
(apiMethod=None, params=())¶ Parameters: Raises: pyrez.exceptions.DailyLimit
– Raised when the daily request limit is reached.TypeError
– Raised when more than 2 parameters or less than 1 parameter is passed.pyrez.exceptions.WrongCredentials
– Raised when a wrongCredentials
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.SessionLimit
– 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: pyrez.models.Ping
-
searchPlayers
(playerName)¶ Parameters: playerName ( str
) –Raises: TypeError
– Raised when more (or less) than 1 parameter is passed.Note
This method raises
makeRequest()
exceptions.
-
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 a bool
that means if the passed sessionId is valid.Return type: bool
- devId (
RealmRoyaleAPI¶
These methods are supported by RealmRoyaleAPI object.
-
class
pyrez.api.
RealmRoyaleAPI
(devId, authKey, responseFormat=Format.JSON, sessionId=None, storeSession=True)¶ 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. - responseFormat (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.IdOrAuthEmpty
– Raised when theDeveloper ID
orAuthentication Key
is not specified.pyrez.exceptions.InvalidArgument
– Raised when an invalidCredentials
is passed.
-
onSessionCreated
¶ pyrez.events.Event
– A decorator that registers an event to listen to.
-
statusPage
¶ StatusPageAPI
– An object that representsStatusPageAPI
client.
-
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 desiredNote
- 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
(matchId, isLiveMatch=False)¶ Returns the player information / statistics for a particular match.
There is three ways to call this method:
getMatch(matchId) #or getMatch([matchId, matchId, matchId]) #or getMatch(matchId, 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 matchId 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: player ( int
orstr
) –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.- playerName (
-
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: pyrez.models.PlayerStatus
-
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
(apiMethod=None, params=())¶ Parameters: Raises: pyrez.exceptions.DailyLimit
– Raised when the daily request limit is reached.TypeError
– Raised when more than 2 parameters or less than 1 parameter is passed.pyrez.exceptions.WrongCredentials
– Raised when a wrongCredentials
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.SessionLimit
– 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: pyrez.models.Ping
-
searchPlayers
(playerName)¶ Parameters: playerName ( str
) –Raises: TypeError
– Raised when more (or less) than 1 parameter is passed.Note
This method raises
makeRequest()
exceptions.
-
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 a bool
that means if the passed sessionId is valid.Return type: bool
- devId (
SmiteAPI¶
These methods are supported by SmiteAPI object.
-
class
pyrez.api.
SmiteAPI
(devId, authKey, responseFormat=Format.JSON, sessionId=None, storeSession=True)¶ 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. - responseFormat (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.IdOrAuthEmpty
– Raised when theDeveloper ID
orAuthentication Key
is not specified.pyrez.exceptions.InvalidArgument
– Raised when an invalidCredentials
is passed.
-
onSessionCreated
¶ pyrez.events.Event
– A decorator that registers an event to listen to.
-
statusPage
¶ StatusPageAPI
– An object that representsStatusPageAPI
client.
-
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: 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 modeRaises: TypeError
– Raised when more (or less) than 1 parameter is passed.Note
This method raises
makeRequest()
exceptions.
-
getMatch
(matchId, isLiveMatch=False)¶ Returns the player information / statistics for a particular match.
There is three ways to call this method:
getMatch(matchId) #or getMatch([matchId, matchId, matchId]) #or getMatch(matchId, 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 matchId 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
-
getPlayer
(player, portalId=None)¶ Returns league and other high level data for a particular player.
Parameters: - player (
int
orstr
) – playerName or playerId of the player you want to get info on - portalId (Optional
int
orpyrez.enumerations.PortalId
) – The portalId that you want to looking for (Defaults toNone
)
Raises: TypeError
– Raised when more than 2 parameters or less than 1 parameter is passed.Note
This method raises
makeRequest()
exceptions.Returns: Return type: pyrez.models.PlayerSmite | pyrez.models.PlayerPaladins object with league and other high level data for a particular player. - player (
-
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.- playerName (
-
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: pyrez.models.PlayerStatus
-
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.
Parameters: clanId ( int
) –Raises: TypeError
– Raised when more (or less) than 1 parameter is passed.Note
This method raises
makeRequest()
exceptions.
-
getTeamPlayers
(clanId)¶ Lists the players for a particular clan.
Parameters: clanId ( int
) –Raises: TypeError
– Raised when more (or less) than 1 parameter is passed.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
(apiMethod=None, params=())¶ Parameters: Raises: pyrez.exceptions.DailyLimit
– Raised when the daily request limit is reached.TypeError
– Raised when more than 2 parameters or less than 1 parameter is passed.pyrez.exceptions.WrongCredentials
– Raised when a wrongCredentials
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.SessionLimit
– 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: pyrez.models.Ping
-
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.
-
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 a bool
that means if the passed sessionId is valid.Return type: bool
- devId (
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.
-
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
).Parameters:
-
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.
-
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
¶ 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
¶ 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¶
-
getHeader
¶
-
getIcon
¶
-
isDamage
¶
-
isFlank
¶
-
isFrontline
¶
-
isSupport
¶
-
-
class
pyrez.enumerations.Classes.
Classes
¶ An enumeration.
-
Assassin
= 2496¶
-
Engineer
= 2495¶
-
Hunter
= 2493¶
-
Mage
= 2494¶
-
Warrior
= 2285¶
-
-
class
pyrez.enumerations.
Endpoint
¶ The endpoint that you want to access to retrieve information from the Hi-Rez Studios API.
-
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
¶ An enumeration.
-
ATOM
= 'atom'¶
-
JSON
= 'json'¶
-
RSS
= 'rss'¶
-
XML
= 'xml'¶
-
-
class
pyrez.enumerations.
Gods
¶ 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¶
-
getCard
¶
-
getIcon
¶
-
isAssassin
¶
-
isGuardian
¶
-
isHunter
¶
-
isMage
¶
-
isWarrior
¶
-
-
class
pyrez.enumerations.
Language
¶ 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
¶ An enumeration.
-
Discord
= 25¶
-
HiRez
= 1¶
-
PS4
= 9¶
-
Steam
= 5¶
-
Switch
= 22¶
-
Unknown
= -1¶
-
Xbox
= 10¶
-
-
class
pyrez.enumerations.
Region
¶ 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
¶ 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
¶ 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
¶ 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
¶ 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¶
-
isInGame
¶
-
isOnline
¶
-
-
class
pyrez.enumerations.
Tier
¶ 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.
PyrezException
(*args, **kwargs)¶ Generic error class, catch-all for most Pyrez issues. It’s the base class for all other Pyrez exceptions.
-
exception
pyrez.exceptions.
DailyLimit
(*args, **kwargs)¶ Raised when you’ve hit a rate limit.
-
exception
pyrez.exceptions.
Deprecated
(*args, **kwargs)¶
-
exception
pyrez.exceptions.
IdOrAuthEmpty
(*args, **kwargs)¶
-
exception
pyrez.exceptions.
InvalidArgument
(*args, **kwargs)¶
-
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)¶
-
exception
pyrez.exceptions.
RealmRoyaleOnly
(*args, **kwargs)¶
-
exception
pyrez.exceptions.
RequestError
(*args, **kwargs)¶
-
exception
pyrez.exceptions.
SessionLimit
(*args, **kwargs)¶
-
exception
pyrez.exceptions.
SmiteOnly
(*args, **kwargs)¶
-
exception
pyrez.exceptions.
UnexpectedException
(*args, **kwargs)¶
-
exception
pyrez.exceptions.
WrongCredentials
(*args, **kwargs)¶ Raised when you try to access a resource and it fails due to some issue with your authentication.
Data classes (pyrez.models)¶
These are the classes created by API responses. They hold the data that is responded from the API server in an easy to use way. You shouldn’t create these yourself.
-
class
pyrez.models.
Ability
(**kwargs)¶
-
class
pyrez.models.
APIResponse
(**kwargs)¶ Represents a generic Pyrez object. This is a sub-class of
APIResponseBase
.- errorMsg :
str
- The message returned from the API request.
-
hasError
¶
- errorMsg :
-
class
pyrez.models.
APIResponseBase
(**kwargs)¶ Represents a generic Pyrez object.
Keyword Arguments: json ( dict
orlist
) – The request as JSON, if you prefer.
-
class
pyrez.models.
BaseMatchDetail
(**kwargs)¶
-
class
pyrez.models.
DemoDetails
(**kwargs)¶
-
class
pyrez.models.
EsportProLeague
(**kwargs)¶ An important return value is “matchStatus” which represents a match being: - scheduled (1), - in-progress (2), - complete (3)
-
class
pyrez.models.
Friend
(**kwargs)¶
-
class
pyrez.models.
God
(**kwargs)¶
-
class
pyrez.models.
InGameItem
(itemID, itemName, itemLevel)¶
-
class
pyrez.models.
Item
(**kwargs)¶
-
class
pyrez.models.
ItemDescription
(**kwargs)¶
-
class
pyrez.models.
LeagueLeaderboard
(**kwargs)¶
-
class
pyrez.models.
LeagueSeason
(**kwargs)¶
-
class
pyrez.models.
Match
(**kwargs)¶
-
class
pyrez.models.
MatchBase
(**kwargs)¶
-
class
pyrez.models.
MatchHistory
(**kwargs)¶
-
class
pyrez.models.
MatchId
(**kwargs)¶
-
class
pyrez.models.
Menuitem
(**kwargs)¶
-
class
pyrez.models.
MergedPlayer
(**kwargs)¶
-
class
pyrez.models.
MOTD
(**kwargs)¶
-
class
pyrez.models.
PatchInfo
(**kwargs)¶
-
class
pyrez.models.
Ping
(kwargs)¶
-
class
pyrez.models.
Player
(**kwargs)¶
-
class
pyrez.models.
PlayerAcheviements
(**kwargs)¶
-
class
pyrez.models.
PlayerId
(**kwargs)¶
-
class
pyrez.models.
PlayerStatus
(**kwargs)¶
-
class
pyrez.models.
QueueStats
(**kwargs)¶
-
class
pyrez.models.
ServerStatus
(**kwargs)¶
-
class
pyrez.models.
Skin
(**kwargs)¶
-
class
pyrez.models.
TestSession
(kwargs)¶
-
class
pyrez.models.
StatusPage
(**kwargs)¶
-
class
pyrez.models.HiRez.
AccountInfo
(**kwargs)¶
-
class
pyrez.models.HiRez.
ContactInfo
(**kwargs)¶
-
class
pyrez.models.HiRez.
Game
(**kwargs)¶
-
class
pyrez.models.HiRez.
LinkedAccount
(**kwargs)¶
-
class
pyrez.models.HiRez.
PortalAccount
(**kwargs)¶
-
class
pyrez.models.HiRez.
Transaction
(**kwargs)¶
-
class
pyrez.models.HiRez.
UserInfo
(**kwargs)¶
-
class
pyrez.models.Paladins.
Champion
(**kwargs)¶
-
class
pyrez.models.Paladins.
ChampionAbility
(**kwargs)¶
-
class
pyrez.models.Paladins.
ChampionSkin
(**kwargs)¶
-
class
pyrez.models.Paladins.
Item
(**kwargs)¶
-
class
pyrez.models.Paladins.
Loadout
(**kwargs)¶
-
class
pyrez.models.Paladins.
Player
(**kwargs)¶
-
class
pyrez.models.Paladins.
Post
(**kwargs)¶
-
class
pyrez.models.RealmRoyale.
Leaderboard
(**kwargs)¶
-
class
pyrez.models.RealmRoyale.
LeaderboardDetails
(**kwargs)¶
-
class
pyrez.models.RealmRoyale.
Match
(**kwargs)¶
-
class
pyrez.models.RealmRoyale.
MatchHistory
(**kwargs)¶
-
class
pyrez.models.RealmRoyale.
Player
(**kwargs)¶
-
class
pyrez.models.RealmRoyale.
Talent
(**kwargs)¶
-
class
pyrez.models.Smite.
God
(**kwargs)¶
-
class
pyrez.models.Smite.
GodLeaderboard
(**kwargs)¶
-
class
pyrez.models.Smite.
GodRank
(**kwargs)¶
-
class
pyrez.models.Smite.
GodRecommendedItem
(**kwargs)¶
-
class
pyrez.models.Smite.
GodSkin
(**kwargs)¶
-
class
pyrez.models.Smite.
Item
(**kwargs)¶
-
class
pyrez.models.Smite.
Player
(**kwargs)¶
-
class
pyrez.models.Smite.
TopMatch
(**kwargs)¶
-
class
pyrez.models.StatusPage.
AffectedComponents
(**kwargs)¶
-
class
pyrez.models.StatusPage.
Base
(**kwargs)¶
-
class
pyrez.models.StatusPage.
Component
(**kwargs)¶
-
class
pyrez.models.StatusPage.
ComponentMixin
(**kwargs)¶
-
class
pyrez.models.StatusPage.
IncidentInfo
(**kwargs)¶
-
class
pyrez.models.StatusPage.
Page
(**kwargs)¶
-
class
pyrez.models.StatusPage.
Status
(**kwargs)¶
-
class
pyrez.models.StatusPage.
StatusPage
(**kwargs)¶
-
class
pyrez.models.StatusPage.
Incidents
(**kwargs)¶
-
class
pyrez.models.StatusPage.
IncidentUpdates
(**kwargs)¶
-
class
pyrez.models.StatusPage.
ScheduledMaintenances
(**kwargs)¶