Clan and Player Attributes

Achievement

class coc.Achievement

Represents a Clash of Clans Achievement.

name

str: The name of the achievement.

stars

int: The current stars achieved for the achievement.

value

int: The number of X things attained for this achievement.

target

int: The number of X things required to complete this achievement.

info

str: Information regarding the achievement.

completion_info

str: Information regarding completion of the achievement.

village

str: Either home or builderBase.

property is_builder_base: bool

Returns a boolean which indicates if the achievement belongs to the builder base

Type:

bool

property is_completed: bool

Returns a boolean which indicates whether the achievement is completed (3 stars achieved)

Type:

bool

property is_home_base: bool

Returns a boolean which indicates if the achievement belongs to the home base

Type:

bool

Capital District

class coc.CapitalDistrict

Represents a Clan Capital District.

id

int: The district’s unique ID as given by the API.

name

str: The district’s name.

hall_level

int: The district’s hall level

Label

class coc.Label

Represents a clan or player label.

id

int: The label’s unique ID as given by the API.

name

str: The label’s name.

badge

Badge: The label’s badge.

Base League

class coc.BaseLeague

Represents a basic league.

id
Type:

int: The league’s unique ID

name
Type:

str: The league’s name, as it appears in-game.

League

class coc.League

Represents a Clash of Clans League

id

int: The league ID.

name

str: The league name.

icon

Icon: The league’s icon.

Legend Statistics

class coc.LegendStatistics

Represents the Legend Statistics for a player.

legend_trophies

int - The player’s legend trophies

current_season

Season: Legend statistics for this season.

previous_season

Season: Legend statistics for the previous season.

best_season

Season: Legend statistics for the player’s best season.

previous_builder_base_season

Season: Legend statistics for the previous builder base season.

best_builder_base_season

Season: Legend statistics for the player’s best builder base season.

PlayerHouseElement

class coc.PlayerHouseElement

Represents an element of a player house.

id

int: The id of the house element

type

PlayerHouseElementType: The type of the house element

PlayerHouseElementType

class coc.PlayerHouseElementType

An Enumeration with all the types of player house elements

ground
roof
foot
deco
walls

Role

Returns a string that is rendered as the role appears in-game, ie Co-Leader or Elder. str(member.role) will also return this.

Note

The in-game role Elder is named admin in the API responses.

class coc.Role
in_game_name