View Source Riot.LoR.Faction (Riot LoR v1.1.1)
Static support for supported LoR Factions.
Supported Factions are hard-coded into to the module. Through the functions you can fetch information by id, code, etc.
Link to this section Summary
Functions
Returns the list of faction codes
Get a Faction id from its code.
Get a Faction code from its id.
Returns the list of faction ids
Get the maximum version supported.
Get the minimum version supported.
Returns the range of version numbers.
Link to this section Types
@type t() :: {version :: non_neg_integer(), id :: non_neg_integer(), code :: binary()}
Link to this section Functions
@spec codes() :: [String.t()]
Returns the list of faction codes
examples
Examples
iex> Riot.LoR.Faction.codes()
["DE", "FR", "IO", "NX", "PZ", "SI", "BW", "MT", "SH", "BC", "RU"]
Get a Faction id from its code.
examples
Examples
iex> Riot.LoR.Faction.fetch_by_code!("DE")
{1, 0, "DE"}
Get a Faction code from its id.
examples
Examples
iex> Riot.LoR.Faction.fetch_by_id!(0)
{1, 0, "DE"}
@spec ids() :: [non_neg_integer()]
Returns the list of faction ids
examples
Examples
iex> Riot.LoR.Faction.ids()
[0, 1, 2, 3, 4, 5, 6, 9, 7, 10, 12]
@spec max_version() :: non_neg_integer()
Get the maximum version supported.
examples
Examples
iex> Riot.LoR.Faction.max_version()
5
@spec min_version() :: non_neg_integer()
Get the minimum version supported.
examples
Examples
iex> Riot.LoR.Faction.min_version()
1
@spec versions() :: Range.t()
Returns the range of version numbers.
examples
Examples
iex> Riot.LoR.Faction.versions()
1..5