Brawlex (brawlex v0.2.0)
Documentation for Brawlex
.
Link to this section Summary
Types
Two letter country code, or 'global' for global rankings.
Game's internal ID for players and clubs. It always start with '#'
The Brawl Stars api token for authentication. You can get it from https://developer.brawlstars.com
Functions
Shutdown the token_process.
Get information about a brawler.
Get list of available brawlers.
Get information about a single clan by club tag.
List club members.
Get information about a single player by player tag.
Get list of recent battle results for a player. NOTE: It may take up to 30 minutes for a new battle to appear in the battlelog.
Get brawler rankings for a country or global rankings. Brawler identifiers can be found by using get_brawlers
function.
Get club rankings for a country or global rankings.
Get player rankings for a country or global rankings.
Get power play rankings for a country or global rankings. 'latest' can be used as seasonId to get rankings for the latest season.
Get list of power play seasons for a country or global rankings.
Call the BrawlBrain to set up a new token_process for requests. If the token is alredy in use and allow_duplicates is false
, just reference to it. Return {:ok, pid}
in case of success or {:error, reason}
in fail case.
Link to this section Types
country_code()
Specs
country_code() :: String.t()
Two letter country code, or 'global' for global rankings.
tag()
Specs
tag() :: String.t()
Game's internal ID for players and clubs. It always start with '#'
token()
Specs
token() :: String.t()
The Brawl Stars api token for authentication. You can get it from https://developer.brawlstars.com
Link to this section Functions
close_connection(tpid)
Specs
close_connection(pid()) :: :ok
Shutdown the token_process.
get_brawler(tpid, brawler_id, timeout \\ 5000)
Specs
Get information about a brawler.
get_brawlers(tpid, timeout \\ 5000)
Specs
Get list of available brawlers.
get_club(tpid, club_tag, timeout \\ 5000)
Specs
Get information about a single clan by club tag.
get_club_members(tpid, club_tag, timeout \\ 5000)
Specs
List club members.
get_player(tpid, player_tag, timeout \\ 5000)
Specs
Get information about a single player by player tag.
get_player_battlelog(tpid, player_tag, timeout \\ 5000)
Specs
Get list of recent battle results for a player. NOTE: It may take up to 30 minutes for a new battle to appear in the battlelog.
get_ranking_brawlers(tpid, country_c, brawler_id, timeout \\ 5000)
Specs
get_ranking_brawlers(pid(), country_code(), String.t(), timeout()) :: {:ok, [map()]} | {:error, any()}
Get brawler rankings for a country or global rankings. Brawler identifiers can be found by using get_brawlers
function.
get_ranking_clubs(tpid, country_c, timeout \\ 5000)
Specs
get_ranking_clubs(pid(), country_code(), timeout()) :: {:ok, [map()]} | {:error, any()}
Get club rankings for a country or global rankings.
get_ranking_players(tpid, country_c, timeout \\ 5000)
Specs
get_ranking_players(pid(), country_code(), timeout()) :: {:ok, [map()]} | {:error, any()}
Get player rankings for a country or global rankings.
get_ranking_season(tpid, country_c, season_id, timeout \\ 5000)
Specs
get_ranking_season(pid(), country_code(), String.t(), timeout()) :: {:ok, [map()]} | {:error, any()}
Get power play rankings for a country or global rankings. 'latest' can be used as seasonId to get rankings for the latest season.
get_ranking_seasons(tpid, country_c, timeout \\ 5000)
Specs
get_ranking_seasons(pid(), country_code(), timeout()) :: {:ok, [map()]} | {:error, any()}
Get list of power play seasons for a country or global rankings.
open_connection(token_id, allow_duplicates, timeout \\ 5000)
Specs
Call the BrawlBrain to set up a new token_process for requests. If the token is alredy in use and allow_duplicates is false
, just reference to it. Return {:ok, pid}
in case of success or {:error, reason}
in fail case.