Skip to content

Clan capital raid seasons

ClanCapitalRaidSeason

Bases: BaseModel

clan capital raid season model

can be iterated over

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
class ClanCapitalRaidSeason(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

    @property
    def attack_log(self):
        return ClanCapitalRaidSeasonAttackLogList(self._get_data('attackLog'))

    @property
    def defense_log(self):
        return ClanCapitalRaidSeasonDefenseLogList(self._get_data('defenseLog'))

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

    @property
    def start_time(self):
        return Time.from_str(self._get_data('startTime'))

    @property
    def end_time(self):
        return Time.from_str(self._get_data('endTime'))

    @property
    def capital_total_loot(self):
        return self._get_data('capitalTotalLoot')

    @property
    def raids_completed(self):
        return self._get_data('raidsCompleted')

    @property
    def total_attacks(self):
        return self._get_data('totalAttacks')

    @property
    def enemy_districts_destroyed(self):
        return self._get_data('enemyDistrictsDestroyed')

    @property
    def defensive_reward(self):
        return self._get_data('defensiveReward')

    @property
    def offensive_reward(self):
        return self._get_data('offensiveReward')

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

    @property
    def average_attacks_per_member(self):
        return (sum((member.attacks for member in self.members)) /
                len(self.members))

    @property
    def average_resources_looted_per_member(self):
        return (
            sum((member.capital_resources_looted for member in self.members)) /
            len(self.members)
        )

attack_log: ClanCapitalRaidSeasonAttackLogList property

attack log

:return: the attack log :rtype: ClanCapitalRaidSeasonAttackLogList

capital_total_loot: int property

total looted capital gold

:return: the total amount of looted capital gold :rtype: int

defense_log: ClanCapitalRaidSeasonDefenseLogList property

defense log

:return: the defense log :rtype: ClanCapitalRaidSeasonAttackLogList

defensive_reward: int property

raid medal defense reward

:return: the raid medal defense reward :rtype: int

end_time: Time property

end time of the capital raid season

:return: the end time of the capital raid season :rtype: Time

enemy_districts_destroyed: int property

number of destroyed districts (attacking)

:return: the number of destroyed districts (attacking) :rtype: int

members: Missing | ClanCapitalRaidSeasonMemberList property

member list

:return: the member list :rtype: ClanCapitalRaidSeasonMemberList

raids_completed: int property

number of completed raids

:return: the number of completed raids :rtype: int

start_time: Time property

start time of the capital raid season

:return: the start time of the capital raid season :rtype: Time

state: str property

capital raid season state

:return: the capital season state :rtype: str

total_attacks: int property

total attack count

:return: the total number of attacks

ClanCapitalRaidSeasonAttack

Bases: BaseModel

clan capital raid season attack model

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
class ClanCapitalRaidSeasonAttack(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

    @property
    def attacker(self):
        return ClanCapitalRaidSeasonAttacker(self._get_data('attacker'))

    @property
    def destruction_percent(self):
        return self._get_data('destructionPercent')

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

attacker: ClanCapitalRaidSeasonAttacker property

attacker

:return: the attacker of the raid season attack :rtype: ClanCapitalRaidSeasonAttacker

destruction_percent: int property

destruction percentage of the raid season attack

:return: the destruction percentage of the raid season attack :rtype: int

stars: int property

stars of the raid season attack

:return: the stars of the raid season attack :rtype: int

ClanCapitalRaidSeasonAttackList

Bases: IterBaseModel

clan capital raid season attack list model

Holds information about the clan capital raid season attacks

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
59
60
class ClanCapitalRaidSeasonAttackList(IterBaseModel):
    _iter_rtype = ClanCapitalRaidSeasonAttack

ClanCapitalRaidSeasonAttackLogEntry

Bases: BaseModel

clan capital raid season attack log entry model

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
class ClanCapitalRaidSeasonAttackLogEntry(BaseModel):
    @property
    def defender(self):
        return ClanCapitalRaidSeasonClanInfo(self._get_data('defender'))

    @property
    def attack_count(self):
        return self._get_data('attackCount')

    @property
    def district_count(self):
        return self._get_data('districtCount')

    @property
    def districts_destroyed(self):
        return self._get_data('districtsDestroyed')

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

attack_count: int property

number of attacks

:return: the number of attacks :rtype: int

defender: ClanCapitalRaidSeasonClanInfo property

defender clan

:return: the defender clan :rtype: ClanCapitalRaidSeasonClanInfo

district_count: int property

number of districts

:return: the number of districts :rtype: int

districts: ClanCapitalRaidSeasonDistrictList property

district list

:return: the list of districts :rtype: ClanCapitalRaidSeasonDistrictList

districts_destroyed: int property

number of destroyed districts

:return: the number of destroyed districts :rtype: int

ClanCapitalRaidSeasonAttackLogList

Bases: IterBaseModel

clan capital raid season attack log list model

can be iterated over

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
153
154
class ClanCapitalRaidSeasonAttackLogList(IterBaseModel):
    _iter_rtype = ClanCapitalRaidSeasonAttackLogEntry

ClanCapitalRaidSeasonAttacker

Bases: BaseModel

clan capital raid season attacker model

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
27
28
29
30
31
32
33
34
35
36
37
38
class ClanCapitalRaidSeasonAttacker(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

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

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

name: str property

attacker name

:return: the player name of the attacker :rtype: str

tag: str property

attacker tag

:return: the player tag of the attacker :rtype: str

ClanCapitalRaidSeasonClanInfo

Bases: BaseModel

clan capital raid season clan info model

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class ClanCapitalRaidSeasonClanInfo(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

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

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

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

    @property
    def badge_urls(self):
        return BadgeUrls(self._get_data('badgeUrls'))

level: int property

clan level

:return: the level of the clan

ClanCapitalRaidSeasonDefenseLogEntry

Bases: BaseModel

clan capital raid season defense log entry model

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
class ClanCapitalRaidSeasonDefenseLogEntry(BaseModel):
    @property
    def attacker(self):
        return ClanCapitalRaidSeasonClanInfo(self._get_data('attacker'))

    @property
    def attack_count(self):
        return self._get_data('attackCount')

    @property
    def district_count(self):
        return self._get_data('districtCount')

    @property
    def districts_destroyed(self):
        return self._get_data('districtsDestroyed')

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

attack_count: int property

number of used attacks

:return: the number of used attacks :rtype: int

attacker: ClanCapitalRaidSeasonClanInfo property

attacker clan

:return: the attacker clan :rtype: ClanCapitalRaidSeasonClanInfo

district_count: int property

number of districts

:return: the number of districts :rtype: int

districts: ClanCapitalRaidSeasonDistrictList property

district list

:return: the list of districts :rtype: ClanCapitalRaidSeasonDistrictList

districts_destroyed: int property

number of destroyed districts

:return: the number of destroyed districts :rtype: int

ClanCapitalRaidSeasonDefenseLogList

Bases: IterBaseModel

clan capital raid season defense log list model

can be iterated over

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
149
150
class ClanCapitalRaidSeasonDefenseLogList(IterBaseModel):
    _iter_rtype = ClanCapitalRaidSeasonDefenseLogEntry

ClanCapitalRaidSeasonDistrict

Bases: BaseModel

clan capital raid season district model

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
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
class ClanCapitalRaidSeasonDistrict(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

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

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

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

    @property
    def destruction_percent(self):
        return self._get_data('destructionPercent')

    @property
    def attack_count(self):
        return self._get_data('attackCount')

    @property
    def total_looted(self):
        return self._get_data('totalLooted')

    @property
    def attacks(self):
        return ClanCapitalRaidSeasonAttackList(self._get_data('attacks'))

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

attack_count: int property

attack count used on the district

:return: the number of attacks used to attack this district :rtype: int

attacks: ClanCapitalRaidSeasonAttackList property

attack list

:return: the attack list of the district :rtype: ClanCapitalRaidSeasonAttackList

destruction_percent: int property

district destruction percentage

:return: the destruction percentage of the district :rtype: int

district_hall_level: int property

district hall level

:return: the district hall level :rtype: int

id: int property

district ID

:return: the ID of the district :rtype: int

name: str property

district name

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

stars: int property

district stars

:return: the stars of the raid season log entry :rtype: int

total_looted: int property

total looted raid gold

:return: the total looted raid gold of this district :rtype: int

ClanCapitalRaidSeasonDistrictList

Bases: IterBaseModel

clan capital rais season district list model

clan be iterated over

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
101
102
class ClanCapitalRaidSeasonDistrictList(IterBaseModel):
    _iter_rtype = ClanCapitalRaidSeasonDistrict

ClanCapitalRaidSeasonMember

Bases: BaseClanMember

clan capital raid season member model

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
class ClanCapitalRaidSeasonMember(BaseClanMember):
    @property
    def attacks(self):
        return self._get_data('attacks')

    @property
    def attack_limit(self):
        return self._get_data('attackLimit')

    @property
    def bonus_attack_limit(self):
        return self._get_data('bonusAttackLimit')

    @property
    def capital_resources_looted(self):
        return self._get_data('capitalResourcesLooted')

attack_limit: int property

attack limit

:return: the attack limit :rtype: int

attacks: int property

attack count of the member

:return: the attack count of the member :rtype: int

bonus_attack_limit: int property

bonus attack limit

:return: the bonus attack limit :rtype: int

capital_resources_looted: int property

looted capital gold

:return: the looted capital gold :rtype: int

ClanCapitalRaidSeasonMemberList

Bases: IterBaseModel

clan capital raid season member list model

can be iterated over

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
175
176
177
178
179
180
181
182
183
184
185
class ClanCapitalRaidSeasonMemberList(IterBaseModel):
    _iter_rtype = ClanCapitalRaidSeasonMember

    @property
    def average_attacks(self):
        return sum((member.attacks for member in self)) / len(self)

    @property
    def average_resources_looted(self):
        return (sum((member.capital_resources_looted for member in self)) /
                len(self))

ClanCapitalRaidSeasons

Bases: IterBaseModel

clan capital raid seasons model

can be iterated over

Source code in pyclasher/api/models/clan_capital_raid_seasons.py
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
class ClanCapitalRaidSeasons(IterBaseModel):
    _iter_rtype = ClanCapitalRaidSeason

    @property
    def average_capital_total_loot(self):
        return sum((season.capital_total_loot for season in self)) / len(self)

    @property
    def average_raids_completed(self):
        return sum((season.raids_completed for season in self)) / len(self)

    @property
    def average_total_attacks(self):
        return sum((season.total_attacks for season in self)) / len(self)

    @property
    def average_enemy_districts_destroyed(self):
        return (sum((season.enemy_districts_destroyed for season in self)) /
                len(self))

    @property
    def average_defensive_reward(self):
        return sum((season.defensive_reward for season in self)) / len(self)

    @property
    def average_offensive_reward(self):
        return sum((season.offensive_reward for season in self)) / len(self)