Players¶
Player profile models and helpers for achievements, units, spells, and labels.
Player¶
struct clashy.Player
Player is the full player profile returned by GetPlayer.
BestTrophies¶
int json: bestTrophies
BestTrophies is the player's all-time best home village trophy count.
TownHallWeapon¶
int json: townHallWeaponLevel
TownHallWeapon is the weapon level for Town Hall levels that have one.
BestBuilderBaseTrophies¶
int json: bestBuilderBaseTrophies
BestBuilderBaseTrophies is the all-time best Builder Base trophy count.
VersusAttackWins¶
int json: versusBattleWins
VersusAttackWins is the legacy Builder Base attack-win field.
Received¶
int json: donationsReceived
Received is the number of donated troops received this season.
ClanCapitalContributions¶
int json: clanCapitalContributions
ClanCapitalContributions is the lifetime Clan Capital contribution count.
ClanPreviousRank¶
int json: previousClanRank
ClanPreviousRank is the player's previous rank inside their clan.
BuilderBaseTrophies¶
int json: builderBaseTrophies
BuilderBaseTrophies is the player's current Builder Base trophy count.
BuilderBaseLeague¶
*League json: builderBaseLeague
BuilderBaseLeague is the player's Builder Base league.
CurrentLeagueGroupTag¶
string json: currentLeagueGroupTag
CurrentLeagueGroupTag is the active legend league group tag when present.
CurrentLeagueSeasonID¶
int json: currentLeagueSeasonId
CurrentLeagueSeasonID is the active legend league season ID when present.
PreviousLeagueGroupTag¶
string json: previousLeagueGroupTag
PreviousLeagueGroupTag is the previous legend league group tag when present.
PreviousLeagueSeasonID¶
int json: previousLeagueSeasonId
PreviousLeagueSeasonID is the previous legend league season ID when present.
LegendStatistics¶
*LegendStatistics json: legendStatistics
LegendStatistics contains legend trophies and seasonal legend finishes.
Achievements¶
[]Achievement json: achievements
Achievements contains achievement progress for both villages and Clan Capital.
HeroEquipment¶
[]Equipment json: heroEquipment
HeroEquipment contains unlocked hero equipment with current and max levels.
Legend Statistics¶
struct clashy.LegendStatistics
LegendStatistics contains a player's legend trophies and season snapshots.
LegendTrophies¶
int json: legendTrophies
LegendTrophies is the player's lifetime legend trophy count.
BestVersusSeason¶
*Season json: bestVersusSeason
BestVersusSeason is the player's legacy best Builder Base season.
CurrentSeason¶
*Season json: currentSeason
CurrentSeason is the player's current legend season progress.
Achievement¶
struct clashy.Achievement
Achievement describes one player achievement and its current progress.
CompletionInfo¶
string json: completionInfo
CompletionInfo describes the completed achievement state.
Player House Element¶
struct clashy.PlayerHouseElement
PlayerHouseElement is one cosmetic element of a player's house.
Player Methods¶
clashy.Player.BuilderTroops() -> []Troop
BuilderTroops returns troops that belong to Builder Base.
- Return type:
-
[]Troop
clashy.Player.GetAchievement(name: string) -> *Achievement
GetAchievement returns the achievement with the provided display name.
- Parameters:
-
name (
string)
- Return type:
-
*Achievement
clashy.Player.GetHero(name: string) -> *Hero
GetHero returns the hero with the provided display name.
- Parameters:
-
name (
string)
- Return type:
-
*Hero
clashy.Player.GetSpell(name: string) -> *Spell
GetSpell returns the spell with the provided display name.
- Parameters:
-
name (
string)
- Return type:
-
*Spell
clashy.Player.GetTroop(name: string) -> *Troop
GetTroop returns the troop with the provided display name.
- Parameters:
-
name (
string)
- Return type:
-
*Troop
clashy.Player.HomeTroops() -> []Troop
HomeTroops returns troops that belong to the home village.
Older API responses may omit Village for home-village troops, so an empty village is treated as home.
- Return type:
-
[]Troop