Clans¶
Clan profiles, clan members, clan labels, and clan search models.
Clan¶
struct clashy.Clan
Clan is the full clan profile returned by GetClan and search endpoints.
FamilyFriendly¶
bool json: isFamilyFriendly
FamilyFriendly reports whether the clan is marked family friendly.
BuilderBasePoints¶
int json: clanBuilderBasePoints
BuilderBasePoints is the clan's Builder Base trophy score.
RequiredTrophies¶
int json: requiredTrophies
RequiredTrophies is the home village trophy requirement to join.
WarLosses¶
int json: warLosses
WarLosses is the number of classic-war losses when the API includes it.
RequiredBuilderBaseTrophies¶
int json: requiredBuilderBaseTrophies
RequiredBuilderBaseTrophies is the Builder Base trophy requirement to join.
RequiredTownhall¶
int json: requiredTownhallLevel
RequiredTownhall is the minimum Town Hall level required to join.
Clan Member¶
struct clashy.ClanMember
ClanMember describes a member entry from a clan profile or member list.
ClanPreviousRank¶
int json: previousClanRank
ClanPreviousRank is the player's previous position in the clan trophy ranking.
Received¶
int json: donationsReceived
Received is the number of donated troops received this season.
VersusTrophies¶
int json: versusTrophies
VersusTrophies is the legacy Builder Base trophy field used by older API responses.
BuilderBaseTrophies¶
int json: builderBaseTrophies
BuilderBaseTrophies is the player's Builder Base trophy count.
VersusRank¶
int json: versusRank
VersusRank is the legacy Builder Base rank field used by older API responses.
BuilderBaseRank¶
int json: builderBaseRank
BuilderBaseRank is the player's current Builder Base rank in the clan.
Player Clan¶
struct clashy.PlayerClan
PlayerClan is the compact clan object embedded in player responses.
Clan Capital¶
struct clashy.ClanCapital
ClanCapital describes a clan's capital districts from the clan profile.
Districts¶
[]CapitalDistrict json: districts
Districts contains the visible Clan Capital districts and their hall levels.
Clan Type¶
type clashy.ClanType
ClanType describes a clan's join policy.
string
Values¶
ClanTypeInviteOnly¶
"inviteOnly"
ClanTypeInviteOnly means players must request or be invited to join.
Clan Methods¶
clashy.Clan.GetMember(tag: string) -> *ClanMember
GetMember returns the member with the provided tag, or nil when the clan member list does not contain that tag.
- Parameters:
-
tag (
string)
- Return type:
-
*ClanMember
clashy.Clan.GetMemberBy(name: string, trophies: int) -> *ClanMember
GetMemberBy returns the first member matching the provided name and trophy filters.
Empty name and zero trophies are treated as wildcards, which is useful when a caller only has one of the two values from an external event.
- Parameters:
-
name (
string)trophies (
int)
- Return type:
-
*ClanMember