Skip to content

Clan war

ClanWar

Bases: BaseModel

Source code in pyclasher/api/models/clan_war.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class ClanWar(BaseModel):
    @property
    def clan(self):
        return WarClan(self._get_data('clan'))

    @property
    def opponent(self):
        return WarClan(self._get_data('opponent'))

    @property
    def team_size(self):
        return self._get_data('teamSize')

    @property
    def attacks_per_member(self):
        return self._get_data('attacksPerMember')

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

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

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

    @property
    def preparation_start_time(self):
        return Time.from_str(self._get_data('preparationStartTime'))

attacks_per_member: int property

attacks per member (usually 2 for regular war and 1 for clan war league)

:return: the attacks per member :rtype: int

clan: WarClan property

clan in the war

:return: the clan in the war :rtype: WarClan

end_time: Time property

end time of the clan war

:return: the end time of the clan war :rtype: Time

opponent: WarClan property

opponent

:return: the clan's opponent :rtype: WarClan

preparation_start_time: Time property

preparation start time of the clan war

:return: the preparation start time of the clan war :rtype: Time

start_time: Time property

start time of the clan war

:return: the start time of the clan war :rtype: Time

state: ClanWarState property

state of the clan war

:return: the state of the clan war :rtype: ClanWarState

team_size: int property

team size of the war

:return: the war's team size :rtype: int