Current section
Files
Jump to
Current section
Files
lib/tibia_data/guild.ex
defmodule TibiaData.Guild do
@moduledoc """
This module helps you to get all the information you want to have from guilds including players online and more.
"""
@doc """
Returns all information by a specific guild.
## Parameters
- name (string): String that represents the name of the guild.
## Examples
iex> TibiaData.Guild.get! "Macabra Pune"
"""
def get!(name) do
"/guild/#{name}"
|> Util.format_string
|> TibiaData.get!
end
@doc """
Returns all guilds in the specified world.
## Parameters
- world (string): String that represents the name of the world.
## Examples
iex> TibiaData.Guild.get_by_world "Macabra"
"""
def get_by_world(world) do
"/guilds/#{world}"
|> Util.format_string
|> TibiaData.get!
end
@doc """
Returns all information by a specific guild. Alias from get! function.
## Parameters
- name (string): String that represents tha name of the guild.
## Examples
iex> TibiaData.Guild.get_by_name "Macabra Pune"
"""
def get_by_name(name) do
get!(name)
end
end