API Reference¶
BrawlWikiAPI¶
-
brawlwiki.
BrawlWikiAPI
¶ alias of
brawlwiki.core.Client
-
class
brawlwiki.core.
Client
[source]¶ A sync client class that lets you access BrawlWiki API.
-
get_attack
(name: str)[source]¶ Get
Attack
instance of the given Brawler.It can be called without creating an instance of
Brawler
.Parameters: name ( str
) – The name of the Brawler.Returns: The Attack
instance of the Brawler.Return type: Attack
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-
get_brawler
(name: str)[source]¶ Get a
Brawler
instance from given partial/full name.Parameters: name ( str
) – The full/partial name of the Brawler.Returns: A Brawler
instance from given name.Return type: Brawler
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-
get_skins
(name: str)[source]¶ Get
Skins
instance of the given Brawler.It can be called without creating an instance of
Brawler
.Parameters: name ( str
) – The name of the Brawler.Returns: The Skins
instance of the Brawler.Return type: Skins
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-
get_star_powers
(name: str)[source]¶ Get
StarPowers
instance of the given Brawler.It can be called without creating an instance of
Brawler
.Parameters: name ( str
) – The name of the Brawler.Returns: The StarPowers
instance of the Brawler.Return type: StarPowers
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-
get_stats
(name: str)[source]¶ Get
Stats
instance of the given Brawler.Parameters: name ( str
) – The name of the Brawler.Returns: The Stats
instance of the Brawler.Return type: Stats
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-
get_super
(name: str)[source]¶ Get
Super
instance of the given Brawler.It can be called without creating an instance of
Brawler
.Parameters: name ( str
) – The name of the Brawler.Returns: The Super
instance of the Brawler.Return type: Super
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-
Data Models¶
-
class
brawlwiki.models.
Brawler
(name: str, data: dict)[source]¶ Class to represent a Brawler.
Parameters: - name (
str
) – The name of the Brawler. - data (
str
) – The dictionary containing Brawlers data accessed from the BrawlWiki API.
-
name
¶ The name of the Brawler.
Type: str
-
description
¶ The description of the Brawler.
Type: str
-
rarity
¶ The rarity of the Brawler.
Type: str
-
required_trophies
¶ Number of trophies required to unlock Brawler.
Type: int
-
speed
¶ The speed of the Brawler.
Type: int
-
brawler_class
¶ The class of the Brawler.
Type: str
-
star_powers
¶ The star powers of the Brawler.
Type: StarPowers
-
stats
¶ The stat bars of the Brawler.
Type: dict
-
voice_lines
¶ The voice lines of the Brawler.
Type: str
- name (
-
class
brawlwiki.models.
Attack
(data: dict)[source]¶ Class to represent a Brawler attack.
Parameters: data ( dict
) – The dictionary containing Brawler data accessed from the BrawlWiki API.-
brawler
¶ The name of the Brawler.
Type: str
-
name
¶ The name of the attack.
Type: str
-
description
¶ The description of the attack.
Type: str
-
value
¶ The damage (or any other) value of the attack.
Type: int
-
action
¶ The action performed by the attack.
Type: str
-
projectiles
¶ The number of projectiles of the attack.
Type: int
-
range
¶ The range of the attack.
Type: float
-
reload
¶ The reload speed of the attack.
Type: float
-
special
¶ The optional special effect of the attack.
Type: Optional[ str
]
-
-
class
brawlwiki.models.
Super
(data: dict)[source]¶ Class to represent a Brawler super.
Parameters: data ( dict
) – The dictionary containing Brawler data accessed from the BrawlWiki API.-
brawler
¶ The name of the Brawler.
Type: str
-
name
¶ The name of the super.
Type: str
-
description
¶ The description of the super.
Type: str
-
value
¶ The damage (or any other) value of the super. Spawns have
spawn_damage
andspawn_health
.Type: Optional[ int
]
-
action
¶ The action performed by the super.
Type: str
-
projectiles
¶ The number of projectiles of the super.
Type: int
-
range
¶ The range of the super.
Type: float
-
hits_required
¶ The number of hits required to charge the super.
Type: int
-
has_spawn
¶ Whether super spawns a unit or not.
Type: bool
-
spawn_name
¶ The name of the spawn.
Type: Optional[ str
]
-
spawn_health
¶ The health of the spawn.
Type: Optional[ int
]
-
spawn_damage
¶ The damage of the spawn.
Type: Optional[ int
]
-
spawn_range
¶ The range of the spawn.
Type: Optional[ float
]
-
spawn_speed
¶ The speed of the spawn.
Type: Optional[ int
]
-
-
class
brawlwiki.models.
StarPowers
(data: dict)[source]¶ Class to represent the Brawler star powers.
Parameters: data ( dict
) – The dictionary containing Brawler data accessed from the BrawlWiki API.-
brawler
¶ The name of the Brawler.
Type: str
-
first_name
¶ The name of the first star power.
Type: str
-
first_description
¶ The description of the first star power.
Type: str
-
first_values
¶ The list of numbers in first star power description.
Type: List[ str
]
-
second_name
¶ The name of the second star power.
Type: str
-
second_description
¶ The description of the second star power.
Type: str
-
second_values
¶ The list of numbers in second star power description.
Type: List[ str
]
-
classmethod
get
(name: str)[source]¶ Get a
StarPowers
instance of the given Brawler.Parameters: name ( str
) – The full/partial name of the Brawler.Returns: StarPowers
instance from given name.Return type: StarPowers
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-
-
class
brawlwiki.models.
Skins
(data: dict)[source]¶ A class to represent the Brawler skins.
Parameters: data ( dict
) – The dictionary containing Brawler data accessed from the BrawlWiki API.-
brawler
¶ The name of the Brawler.
Type: str
-
names
¶ The names of the Brawler skins.
Type: List[ str
]
-
regular
¶ A dictionary containing regular skins data. The skins data takes skin name as key and has this structure:
{ "cost": 150, "currency": "Gems", }
Type: Optional[Dict[ str
, Dict]]
-
special
¶ A dictionary containing special skins data. The skins data takes skin name as key and has this structure:
{ "cost": 150, "currency": "Gems", "event": "2019 Brawlidays" }
Type: Optional[Dict[ str
, Dict]]
-
-
class
brawlwiki.models.
Stats
(data: dict)[source]¶ A class to represent the Brawler stats.
Parameters: data ( dict
) – The dictionary containing Brawler data accessed from the BrawlWiki API.-
brawler
¶ The name of the Brawler.
Type: str
-
offense
¶ The offense stat of the Brawler.
Type: int
-
defense
¶ The defense stat of the Brawler.
Type: int
-
utility
¶ The utility stat of the Brawler.
Type: int
-
-
class
brawlwiki.models.
VoiceLines
(data: dict)[source]¶ A class to represent the Brawler voice lines.
Parameters: data ( dict
) – The dictionary containing Brawler data accessed from the BrawlWiki API.-
brawler
¶ The name of the Brawler.
Type: str
-
start_of_battle
¶ The start of battle voicelines of the Brawler.
Type: List[ str
]
-
when_in_lead
¶ The when in lead voicelines of the Brawler.
Type: List[ str
]
-
once_hurt
¶ The once hurt voicelines of the Brawler.
Type: List[ str
]
-
getting_kill
¶ The getting kill voicelines of the Brawler.
Type: List[ str
]
-
when_dying
¶ The when dying voicelines of the Brawler.
Type: List[ str
]
-
when_attacking
¶ The when attacking voicelines of the Brawler.
Type: List[ str
]
-
using_super
¶ The using super voicelines of the Brawler.
Type: List[ str
]
-
classmethod
get
(name: str)[source]¶ Get a
VoiceLines
instance of the given Brawler.Parameters: name ( str
) – The full/partial name of the Brawler.Returns: VoiceLines
instance from given name.Return type: VoiceLines
Raises: BrawlerNotFound
– If a Brawler can’t be found from the givenname
.
-