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
Attackinstance of the given Brawler.It can be called without creating an instance of
Brawler.Parameters: name ( str) – The name of the Brawler.Returns: The Attackinstance of the Brawler.Return type: AttackRaises: BrawlerNotFound– If a Brawler can’t be found from the givenname.
-
get_brawler(name: str)[source]¶ Get a
Brawlerinstance from given partial/full name.Parameters: name ( str) – The full/partial name of the Brawler.Returns: A Brawlerinstance from given name.Return type: BrawlerRaises: BrawlerNotFound– If a Brawler can’t be found from the givenname.
-
get_skins(name: str)[source]¶ Get
Skinsinstance of the given Brawler.It can be called without creating an instance of
Brawler.Parameters: name ( str) – The name of the Brawler.Returns: The Skinsinstance of the Brawler.Return type: SkinsRaises: BrawlerNotFound– If a Brawler can’t be found from the givenname.
-
get_star_powers(name: str)[source]¶ Get
StarPowersinstance of the given Brawler.It can be called without creating an instance of
Brawler.Parameters: name ( str) – The name of the Brawler.Returns: The StarPowersinstance of the Brawler.Return type: StarPowersRaises: BrawlerNotFound– If a Brawler can’t be found from the givenname.
-
get_stats(name: str)[source]¶ Get
Statsinstance of the given Brawler.Parameters: name ( str) – The name of the Brawler.Returns: The Statsinstance of the Brawler.Return type: StatsRaises: BrawlerNotFound– If a Brawler can’t be found from the givenname.
-
get_super(name: str)[source]¶ Get
Superinstance of the given Brawler.It can be called without creating an instance of
Brawler.Parameters: name ( str) – The name of the Brawler.Returns: The Superinstance of the Brawler.Return type: SuperRaises: 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_damageandspawn_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
StarPowersinstance of the given Brawler.Parameters: name ( str) – The full/partial name of the Brawler.Returns: StarPowersinstance from given name.Return type: StarPowersRaises: 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
VoiceLinesinstance of the given Brawler.Parameters: name ( str) – The full/partial name of the Brawler.Returns: VoiceLinesinstance from given name.Return type: VoiceLinesRaises: BrawlerNotFound– If a Brawler can’t be found from the givenname.
-