Enums¶
Enums represent “named values” one can encounter when working with the API.
All enum members have an alias with the underscores (if present) replaced with spaces. The only members available via attribute access are the main ones listed - aliases work only when passing a string into the constructor. Additionally, it’s ensured that all enum members end up without underscores in their names, even if the attribute they’re accessed from has them:
class TestEnum(arez.enums.Enum):
NoSpaces = 0
Has_Spaces = 1
>>> TestEnum.NoSpaces
<TestEnum.NoSpaces: 0>
>>> TestEnum.Has_Spaces
<TestEnum.Has_Spaces: 1>
>>> TestEnum.Has_Spaces.name
"Has Spaces"
Warning
The enums below use a specialized metaclass to construct the members, different
from the standard implementation, and fully customized for usage in this wrapper.
The semantics follow a standard enum.IntEnum
implementation though, so you know
what you can expect. Each member has name
and value
attributes, also accessible
via str()
and int()
usage.
Trying to construct an enum member from incorrect input will result in None
being returned instead of the enum member. This allows you to easily handle
user input validation and conversion, checking for None
in the assigned variable.
You can easily test for the matched member with a simple if statement:
user_input: str
platform = arez.Platform(user_input)
if platform is None:
print("Incorrect platform!")
else:
# the platform matched and you now have it stored under the `platform` variable
-
class
arez.enums.
Enum
(name_or_value)[source]¶ Represents a basic enum.
Note
This is here solely for documentation purposes, and shouldn’t be used otherwise.
- Parameters
name_or_value (str | int) – The name or value of the enum member you want to get.
- Returns
The matched enum member.
None
is returned if no member could be matched.- Return type
Enum | None
-
class
arez.
Platform
(name_or_value)[source]¶ Platform enum. Represents player’s platform.
Inherits from
Enum
.-
Unknown
¶ Unknown platform. You can sometimes get this when the information isn’t available.
-
PC
¶ Aliases:
hirez
,standalone
.
-
Steam
¶
-
PS4
¶ Aliases:
psn
,playstation
.
-
Xbox
¶ Aliases:
xb
,xboxlive
,xbox_live
,xboxone
,xbox_one
,xbox1
,xbox_1
.
-
Facebook
¶ Aliases:
fb
.
-
Google
¶
-
Mixer
¶
-
Switch
¶ Aliases:
nintendo_switch
.
-
Discord
¶
-
Epic_Games
¶ Aliases:
epic
.
-
-
class
arez.
Rank
(name_or_value)[source]¶ Rank enum. Represents player’s rank.
Inherits from
Enum
.All attributes include an alias consisting of their name and a single digit representing the rank’s level, alternatively with and without the dividing space existing or being replaced with an underscore. For example, all of these will result in the
Gold IV
rank:gold_iv
,gold iv
,gold_4
,gold 4
,gold4
.List of all attributes:
Qualifying
,Bronze_V
,Bronze_IV
,Bronze_III
,Bronze_II
,Bronze_I
,Silver_V
,Silver_IV
,Silver_III
,Silver_II
,Silver_I
,Gold_V
,Gold_IV
,Gold_III
,Gold_II
,Gold_I
,Platinum_V
,Platinum_IV
,Platinum_III
,Platinum_II
,Platinum_I
,Diamond_V
,Diamond_IV
,Diamond_III
,Diamond_II
,Diamond_I
,Master
,Grandmaster
.-
alt_name
¶ Returns an alternative name of a rank, with the roman numeral replaced with an integer.
Example:
Silver IV
->Silver 4
.- Type
-
tier
¶ Returns the rank’s tier, one of:
Qualifying
,Bronze
,Silver
,Gold
,Platinum
,Diamond
,Master
orGrandmaster
.- Type
-
division
¶ Returns the rank’s division, one of:
I
,II
,III
,IV
orV
.If the rank has no divisions, returns the name unchanged:
Qualifying
,Master
orGrandmaster
.- Type
-
-
class
arez.
Queue
(name_or_value)[source]¶ Queue enum. Represents a match queue.
Inherits from
Enum
.List of custom queue attributes:
Custom_Ascension_Peak
,Custom_Bazaar
,Custom_Brightmarsh
,Custom_Fish_Market
,Custom_Frog_Isle
,Custom_Frozen_Guard
,Custom_Ice_Mines
,Custom_Jaguar_Falls
,Custom_Serpent_Beach
,Custom_Shattered_Desert
,Custom_Splitstone_Quary
,Custom_Stone_Keep
,Custom_Timber_Mill
,Custom_Warders_Gate
,Custom_Foremans_Rise_Onslaught
,Custom_Magistrates_Archives_Onslaught
,Custom_Marauders_Port_Onslaught
,Custom_Primal_Court_Onslaught
,Custom_Abyss_TDM
,Custom_Dragon_Arena_TDM
,Custom_Foremans_Rise_TDM
,Custom_Magistrates_Archives_TDM
,Custom_Snowfall_Junction_TDM
,Custom_Throne_TDM
,Custom_Trade_District_TDM
,Custom_Magistrates_Archives_KotH
,Custom_Snowfall_Junction_KotH
,Custom_Trade_District_KotH
.-
Unknown
¶ Unknown queue. You can sometimes get this when the information isn’t available.
-
Casual_Siege
¶ Aliases:
casual
,siege
.
-
Team_Deathmatch
¶ Aliases:
deathmatch
,tdm
.
-
Onslaught
¶
-
Ranked
¶ Aliases:
competitive
,rank
,comp
.
-
Shooting_Range
¶ Aliases:
range
.
-
Training_Siege
¶ Aliases:
bot_siege
.
-
Training_Onslaught
¶ Aliases:
bot_onslaught
.
-
Training_Team_Deathmatch
¶ Aliases:
bot_team_deathmatch
,bot_deathmatch
,bot_tdm
.
-
Test_Maps
¶ Aliases:
test
.
-
is_casual
()[source]¶ Checks if this queue is considered “casual”. Casual queues are the ones accessible from the main queue screen.
Note
This does not include custom or training matches.
- Type
-
-
class
arez.
Rarity
(name_or_value)[source]¶ Rarity enum. Represents a skin or card rarity.
Inherits from
Enum
.-
Default
¶
-
Common
¶
-
Uncommon
¶
-
Rare
¶
-
Epic
¶
-
Legendary
¶
-
Unlimited
¶
-
Limited
¶
-
-
class
arez.
Region
(name_or_value)[source]¶ Region enum. Represents player’s region.
Inherits from
Enum
.-
Unknown
¶ Unknown region. You can sometimes get this when the information isn’t available.
-
North_America
¶ Aliases:
na
.
-
Europe
¶ Aliases:
eu
.
-
Australia
¶ Aliases:
oceania
,au
,aus
,oce
.
-
Brazil
¶ Aliases:
br
,bra
.
-
Latin_America_North
¶ Aliases:
latam
.
-
Southeast_Asia
¶ Aliases:
sea
.
-
Japan
¶ Aliases:
jp
,jpn
.
-
-
class
arez.
Language
(name_or_value)[source]¶ Language enum. Represents the response language.
Inherits from
Enum
.-
English
¶ Aliases:
en
,eng
.
-
German
¶ Aliases:
de
,ger
.
-
French
¶ Aliases:
fr
,fre
.
-
Chinese
¶ Aliases:
zh
,chi
.
-
Spanish
¶ Aliases:
es
,spa
.
-
Portuguese
¶ Aliases:
pt
,por
.
-
Russian
¶ Aliases:
ru
,rus
.
-
Polish
¶ Aliases:
pl
,pol
.
-
Turkish
¶ Aliases:
tr
,tur
.
-
-
class
arez.
DeviceType
(name_or_value)[source]¶ DeviceType enum. Represents a type of device: talent, card, shop item, etc.
Inherits from
Enum
.-
Undefined
¶ Represents an undefined device type. Devices with this type are usually (often unused) talents or cards that couldn’t be determined as valid.
-
Item
¶ The device of this type is a Shop Item.
-
Card
¶ The device of this type is a Card.
-
Talent
¶ The device of this type is a Talent.
-
-
class
arez.
Activity
(name_or_value)[source]¶ Activity enum. Represents player’s in-game status.
Inherits from
Enum
.-
Offline
¶ The player is currently offline.
-
In_Lobby
¶ The player is in the post-match lobby.
-
Character_Selection
¶ The player is currently on the character selection screen before a match.
-
In_Match
¶ The player is currently in a live match.
-
Online
¶ The player is currently online, most likely on the main menu screen.
-
Unknown
¶ The player’s status is unknown.
-
-
class
arez.
AbilityType
(name_or_value)[source]¶ AbilityType enum. Represents a type of an ability.
Currently only damage types are supported.
Inherits from
Enum
.-
Undefined
¶ Represents an undefined ability type. Those abilities often deal no damage, or serve another purpose that doesn’t involve them doing so.
-
Direct_Damage
¶ The ability does Direct Damage.
Aliases:
direct
.
-
Area_Damage
¶ The ability does Area Damage.
Aliases:
aoe
.
-