Enums

Enum-like string and integer types used across the client.

Role

type clashy.Role

Role is a member's role inside a clan.

string

Values

RoleMember

"member"

RoleMember is a regular clan member.

RoleElder

"admin"

RoleElder is a clan elder. The Clash API value is "admin".

RoleCoLeader

"coLeader"

RoleCoLeader is a clan co-leader.

RoleLeader

"leader"

RoleLeader is the clan leader.

Village Type

type clashy.VillageType

VillageType identifies the village or game area for static data and units.

string

Values

VillageHome

"home"

VillageHome is the home village.

VillageBuilderBase

"builderBase"

VillageBuilderBase is Builder Base.

VillageClanCapital

"clanCapital"

VillageClanCapital is Clan Capital.

Load Game Data

struct clashy.LoadGameData

LoadGameData describes when static game data should be loaded.

Default

bool

Default uses the package's normal embedded static-data behavior.

StartupOnly

bool

StartupOnly indicates static data should be loaded during client construction only.

Always

bool

Always indicates static data should be refreshed whenever supported by the caller's workflow.

Never

bool

Never indicates static data should not be loaded.

Clan Type

type clashy.ClanType

ClanType describes a clan's join policy.

string

Values

ClanTypeOpen

"open"

ClanTypeOpen means players can join directly when requirements are met.

ClanTypeClosed

"closed"

ClanTypeClosed means the clan is closed to new members.

ClanTypeInviteOnly

"inviteOnly"

ClanTypeInviteOnly means players must request or be invited to join.

War Round

type clashy.WarRound

WarRound identifies the logical CWL round requested from GetCurrentWar or GetLeagueWar.

int

Values

PreviousWar

iota

PreviousWar selects the previous completed or in-war CWL round.

CurrentWar

CurrentWar selects the active CWL war, or the latest completed/in-war round when the latest real round is only preparation.

CurrentPreparation

CurrentPreparation selects the upcoming CWL preparation round when one is available.

War State

type clashy.WarState

WarState is the lifecycle state of a classic war or CWL war.

string

Values

WarStateNotInWar

"notInWar"

WarStateNotInWar means the clan is not in a regular war.

WarStatePreparation

"preparation"

WarStatePreparation means the war is in preparation day.

WarStateInWar

"inWar"

WarStateInWar means battle day is active.

WarStateEnded

"warEnded"

WarStateEnded means the war has ended.

War Result

type clashy.WarResult

WarResult is the requested clan's result in a war log entry.

string

Values

WarResultWin

"win"

WarResultWin means the requested clan won.

WarResultLose

"lose"

WarResultLose means the requested clan lost.

WarResultTie

"tie"

WarResultTie means the war ended in a tie.