Battle Logs

Player battle logs and legend league group records.

Battle Log Entry

struct clashy.BattleLogEntry

BattleLogEntry is one player battle log entry.

BattleType

string json: battleType

BattleType describes the game mode for the battle.

Attack

bool json: attack

Attack reports whether the entry is an attack made by the requested player. False entries are defenses.

ArmyShareCode

string json: armyShareCode

ArmyShareCode is the in-game army share payload when available.

OpponentPlayerTag

string json: opponentPlayerTag

OpponentPlayerTag is the opponent's player tag.

Stars

int json: stars

Stars is the number of stars earned by the attacker.

DestructionPercentage

int json: destructionPercentage

DestructionPercentage is the destruction percentage earned by the attacker.

LootedResources

[]Resource json: lootedResources

LootedResources contains resources actually looted.

ExtraLootedResources

[]Resource json: extraLootedResources

ExtraLootedResources contains bonus resources awarded by the battle.

AvailableLoot

[]Resource json: availableLoot

AvailableLoot contains resources that were available before the battle.

Resource

struct clashy.Resource

Resource is a named resource amount in a player battle log entry.

Name

string json: name

Name is the resource name, such as gold, elixir, or dark elixir.

Amount

int json: amount

Amount is the resource quantity.

League History Entry

struct clashy.LeagueHistoryEntry

LeagueHistoryEntry is one historical legend-league season result.

LeagueSeasonID

int json: leagueSeasonId

LeagueSeasonID is the numeric legend season identifier.

LeagueTrophies

int json: leagueTrophies

LeagueTrophies is the player's ending legend trophy count.

LeagueTierID

int json: leagueTierId

LeagueTierID is the league tier identifier for the season.

Placement

int json: placement

Placement is the player's final placement.

AttackWins

int json: attackWins

AttackWins is the number of attack wins.

AttackLosses

int json: attackLosses

AttackLosses is the number of attack losses.

AttackStars

int json: attackStars

AttackStars is the total stars earned on attack.

DefenseWins

int json: defenseWins

DefenseWins is the number of defense wins.

DefenseLosses

int json: defenseLosses

DefenseLosses is the number of defense losses.

DefenseStars

int json: defenseStars

DefenseStars is the total stars allowed on defense.

MaxBattles

int json: maxBattles

MaxBattles is the maximum battle count for the season.

League Tier Group

struct clashy.LeagueTierGroup

LeagueTierGroup contains members and battle logs for a legend league group.

Members

[]LeagueTierGroupMember json: members

Members contains the players in the legend group.

AttackLogs

[]LeagueTierGroupBattleLogEntry json: attackLogs

AttackLogs contains attack entries for the requested player.

DefenseLogs

[]LeagueTierGroupBattleLogEntry json: defenseLogs

DefenseLogs contains defense entries for the requested player.

League Tier Group Member

struct clashy.LeagueTierGroupMember

LeagueTierGroupMember is one player in a legend league group.

PlayerTag

string json: playerTag

PlayerTag is the player's tag.

PlayerName

string json: playerName

PlayerName is the player's display name.

ClanTag

string json: clanTag

ClanTag is the player's clan tag when present.

ClanName

string json: clanName

ClanName is the player's clan name when present.

LeagueTrophies

int json: leagueTrophies

LeagueTrophies is the player's current legend trophy count.

AttackWinCount

int json: attackWinCount

AttackWinCount is the player's attack win count in the group.

AttackLoseCount

int json: attackLoseCount

AttackLoseCount is the player's attack loss count in the group.

DefenseWinCount

int json: defenseWinCount

DefenseWinCount is the player's defense win count in the group.

DefenseLoseCount

int json: defenseLoseCount

DefenseLoseCount is the player's defense loss count in the group.

League Tier Group Battle Log Entry

struct clashy.LeagueTierGroupBattleLogEntry

LeagueTierGroupBattleLogEntry is one attack or defense inside a legend group.

OpponentPlayerTag

string json: opponentPlayerTag

OpponentPlayerTag is the opponent's player tag.

OpponentName

string json: opponentName

OpponentName is the opponent's player name.

Stars

int json: stars

Stars is the number of stars earned by the attacker.

DestructionPercentage

int json: destructionPercentage

DestructionPercentage is the destruction percentage earned by the attacker.

Trophies

int json: trophies

Trophies is the trophy delta for the battle.

CreationTime

string json: creationTime

CreationTime is the API timestamp for the battle.