Packages

An extended and functional wrapper for the Clash of Clans API

Current section

Files

Jump to
clashofclans lib endpoints clans language.ex
Raw

lib/endpoints/clans/language.ex

defmodule Endpoints.Clans.Language do
alias Endpoints.Clans.Raw
def get_clan_language(clantag) do
with {:ok, clan} <- Raw.get_raw_clan_information(clantag) do
Map.take(clan, ["chatLanguage"])
|> Map.values()
|> hd()
|> Map.take(["name"])
|> Map.values()
|> hd()
end
end
end