Class: WarClan
Represents a War Clan.
Constructors
constructor
• new WarClan(war
, data
)
Parameters
Name | Type |
---|---|
war | ClanWar |
data | APIWarClan |
Defined in
Properties
name
• name: string
The clan's name.
Defined in
tag
• tag: string
The clan's tag.
Defined in
badge
• badge: Badge
The clan's badge.
Defined in
level
• level: number
The clan's level.
Defined in
stars
• stars: number
Number of stars achieved by this clan.
Defined in
destruction
• destruction: number
The destruction achieved as a percentage.
Defined in
members
• members: ClanWarMember
[]
An array of members that are in the war.
Defined in
attackCount
• attackCount: number
Total attacks used by this clan.
Defined in
Accessors
isOpponent
• get
isOpponent(): boolean
Whether the clan is the opponent clan.
Returns
boolean
Defined in
averageAttackDuration
• get
averageAttackDuration(): number
Average duration of all clan member's attacks.
Returns
number
Defined in
attacks
• get
attacks(): ClanWarAttack
[]
Returns all clan member's attacks.
Returns
Defined in
defenses
• get
defenses(): ClanWarAttack
[]
Returns all clan member's defenses.
Returns
Defined in
shareLink
• get
shareLink(): string
Get clan's formatted link to open clan in-game.
Returns
string
Defined in
Methods
getMember
▸ getMember(tag
): null
| ClanWarMember
Get a member of the clan for the given tag, or null
if not found.
Parameters
Name | Type |
---|---|
tag | string |
Returns
null
| ClanWarMember
Defined in
getMemberByMapPosition
▸ getMemberByMapPosition(mapPosition
): null
| ClanWarMember
Get a member of the clan for the given map position, or null
if not found.
Parameters
Name | Type |
---|---|
mapPosition | number |
Returns
null
| ClanWarMember