Skip to content

War status

WarStatus

Bases: BaseModel

war status model

Source code in pyclasher/api/models/misc/war_status.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class WarStatus(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

    @property
    def status_code(self):
        return self._get_data('statusCode')

    @property
    def clan_tag(self):
        return self._get_data('clanTag')

    @property
    def enemy_clan_tag(self):
        return self._get_data('enemyClanTag')

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

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

clan_tag: str property

clan_tag code of the war

:return: the clan_tag code of the war :rtype: str

enemy_clan_tag: str property

enemy_clan_tag code of the war

:return: the enemy_clan_tag code of the war :rtype: str

status_code: int property

status code of the war

:return: the status code of the war :rtype: int

timestamp: Time property

timestamp code of the war

:return: the timestamp code of the war :rtype: Time

war_state: ClanWarState property

war_state code of the war

:return: the war_state code of the war :rtype: ClanWarState

WarStatusList

Bases: IterBaseModel

war status list model

Source code in pyclasher/api/models/misc/war_status.py
32
33
class WarStatusList(IterBaseModel):
    _iter_rtype = WarStatus