godfist v0.5.0 Godfist
Godfist is a wrapper for the League of Legends ReST API written in Elixir.
There are some endpoints that I’ll be adding later which will be the static data from Data Dragon and Tournament support.
Every function requires that you pass the region to execute the request to since Riot uses that to Rate limit the usage of the api. Every region should be passed as an Atom, remember that :P
Set your api key in your config.exs
file with the given params.
config :godfist,
token: "YOUR API KEY"
Link to this section Summary
Functions
Get active game of a given player by region and name
Get all champs
Get a specific champion by id
Get a specific champion it’s name. This is useful to work with the Godfist.DataDragon
endpoints
Find similar champs to the query
Get the account id of a player by it’s region and name
Get the summoner id of a player by it’s name and region
Get matchlist of a player by it’s region and name
Link to this section Functions
Get active game of a given player by region and name.
Example
iex> Godfist.active_game(:na, "Summoner name")
Get all champs.
Refer to Godfist.Champion.all/2
for option.
champion(atom, integer) :: {:ok, map} | {:error, String.t}
Get a specific champion by id.
Refer to Godfist.Champion.by_id/2
Get a specific champion it’s name. This is useful to work with the Godfist.DataDragon
endpoints.
Example
iex> Godfist.champion_by_name("リー・シン", :japanese)
iex> Godfist.champion_by_name(["Lee Sin", "Rek'Sai", "Nocturne"])
Find similar champs to the query.
Example
iex> Godfist.find_similar("Noc", :us)
iex> Godfist.find_similar("L")
Get the account id of a player by it’s region and name.
Refer to Godfist.Summoner.get_id/2
Get the summoner id of a player by it’s name and region:
Example
iex> Godfist.get_summid(:lan, "SummonerName")
Get matchlist of a player by it’s region and name.
Same as Godfist.Match.matchlist/3
(Check for a list of options)
but you don’t have to provide the summoner id directly.
Example
iex> Godfist.matchlist(:lan, "SummonerName")