Packages

An extended and functional wrapper for the Clash of Clans API

Current section

Files

Jump to
clashofclans lib endpoints clans wars warfrequency.ex
Raw

lib/endpoints/clans/wars/warfrequency.ex

defmodule Endpoints.Clans.Wars.Warfrequency do
alias Endpoints.Clans.Raw
def get_clan_warfrequency(clantag) do
with {:ok, clan} <- Raw.get_raw_clan_information(clantag) do
Map.take(clan, ["warFrequency"])
|> Map.values()
|> hd()
end
end
end