Skip to content

Clan

clan models and sub models

Clan

Bases: BaseClan

clan model

Source code in pyclasher/api/models/clan.py
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
class Clan(BaseClan):
    @property
    def war_league(self):
        return WarLeague(self._get_data('warLeague'))

    @property
    def capital_league(self):
        return CapitalLeague(self._get_data('capitalLeague'))

    @property
    def member_list(self):
        return ClanMemberList(self._get_data('memberList'))

    @property
    def required_trophies(self):
        return self._get_data('requiredTrophies')

    @property
    def required_builder_base_trophies(self):
        return self._get_data('requiredBuilderBaseTrophies')

    @property
    def is_family_friendly(self):
        return self._get_data('isFamilyFriendly')

    @property
    def is_war_log_public(self):
        return self._get_data('isWarLogPublic')

    @property
    def required_townhall_level(self):
        return self._get_data('requiredTownhallLevel')

    @property
    def war_frequency(self):
        return WarFrequency(self._get_data('warFrequency'))

    @property
    def clan_level(self):
        return self._get_data('clanLevel')

    @property
    def war_win_streak(self):
        return self._get_data('warWinStreak')

    @property
    def war_wins(self):
        return self._get_data('warWins')

    @property
    def war_ties(self):
        return self._get_data('warTies')

    @property
    def war_losses(self):
        return self._get_data('warLosses')

    @property
    def total_wars(self):
        return self.war_wins + self.war_losses + self.war_ties

    @property
    def clan_points(self):
        return self._get_data('clanPoints')

    @property
    def chat_language(self):
        return Language(self._get_data('chatLanguage'))

    @property
    def clan_builder_base_points(self):
        return self._get_data('clanBuilderBasePoints')

    @property
    def clan_capital_points(self):
        return self._get_data('clanCapitalPoints')

    @property
    def labels(self):
        return LabelList(self._get_data('labels'))

    @property
    def location(self):
        return Location(self._get_data('location'))

    @property
    def type(self):
        return ClanType(self._get_data('type'))

    @property
    def members(self):
        return self._get_data('members')

    @property
    def description(self):
        return self._get_data('description')

    @property
    def clan_capital(self):
        return ClanCapital(self._get_data('clanCapital'))

    @property
    def average_exp_level_per_member(self):
        return self.member_list.average_exp_level

    @property
    def average_trophies_per_member(self):
        return self.member_list.average_trophies

    @property
    def average_builder_base_trophies_per_member(self):
        return self.member_list.average_builder_base_trophies

    @property
    def average_donations_per_member(self):
        return self.member_list.average_donations

    @property
    def average_donations_received_per_member(self):
        return self.member_list.average_donations_received

capital_league: CapitalLeague property

clan's capital league

:return: the capital league of the clan :rtype: CapitalLeague

chat_language: Missing | Language property

clan's chat language

:return: the chat language of the clan :rtype: Language

clan_builder_base_points: int property

clan builder base points

:return: the builder base points of the clan :rtype: int

clan_capital: Missing | ClanCapital property

clan's capital

:return: the capital of the clan :rtype: ClanCapital

clan_capital_points: int property

clan capital points

:return: the capital points of the clan :rtype: int

clan_level: int property

clan's level

:return: the clan level :rtype: int

clan_points: int property

clan points

:return: the points of the clan :rtype: int

description: Missing | str property

clan's description

:return: the description of the clan :rtype: str

is_family_friendly: bool property

clan's family friendly status

:return: the family friendly status of the clan :rtype: bool

is_war_log_public: bool property

clan's public war log status

:return: the public war log status of the clan :rtype: bool

labels: LabelList property

clan's labels

:return: the label list of the clan :rtype: LabelList

location: Missing | Location property

clan's location

:return: the location of the clan :rtype: Location

member_list: Missing | ClanMemberList property

clan's member list

:return: the member list of the clan :rtype: ClanMemberList

members: int property

clan members

:return: the number of members of the clan :rtype: int

required_builder_base_trophies: int property

clan's required builder base trophies

:return: the required builder base trophies of the clan :rtype: int

required_townhall_level: int property

clan's required town hall level

:return: the required town hall level of the clan :rtype: int

required_trophies: int property

clan's required trophies

:return: the required trophies of the clan :rtype: int

type: ClanType property

clan type

:return: the type of the clan :rtype: ClanType

war_frequency: WarFrequency property

clan's war frequency

:return: the war frequency of the clan :rtype: WarFrequency

war_league: WarLeague property

clan's war league

:return: the war league of the clan :rtype: WarLeague

war_losses: Missing | int property

clan's war losses

:return: the war losses of the clan :rtype: int

war_ties: Missing | int property

clan's war ties

:return: the war ties of the clan :rtype: int

war_win_streak: int property

clan's war win streak

:return: the war win streak of the clan :rtype: int

war_wins: Missing | int property

clan's war wins

:return: the war wins of the clan :rtype: int

ClanCapital

Bases: BaseModel

clan capital model

Source code in pyclasher/api/models/clan.py
33
34
35
36
37
38
39
40
41
42
43
44
class ClanCapital(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

    @property
    def capital_hall_level(self):
        return self._get_data('capitalHallLevel')

    @property
    def districts(self):
        return ClanDistrictDataList(self._get_data('districts'))

capital_hall_level: int property

capital hall level of the clan capital

:return: the capital hall level of the clan capital :rtype: int

districts: ClanDistrictDataList property

districts of the clan capital

:return: the districts of the clan capital :rtype: ClanDistrictDataList

ClanDistrictData

Bases: BaseModel

clan district data model

Source code in pyclasher/api/models/clan.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class ClanDistrictData(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

    @property
    def name(self):
        return self._get_data('name')

    @property
    def id(self):
        return self._get_data('id')

    @property
    def district_hall_level(self):
        return self._get_data('districtHallLevel')

district_hall_level: int property

district hall level of the clan district

:return: the district hall level of the clan district :rtype: int

id: int property

id of the clan district

:return: the id of the clan district :rtype: int

name: str property

name of the clan district

:return: the name of the clan district :rtype: str

ClanDistrictDataList

Bases: IterBaseModel

clan district data list model

can be iterated over

Source code in pyclasher/api/models/clan.py
29
30
class ClanDistrictDataList(IterBaseModel):
    _iter_rtype = ClanDistrictData