Skip to content

Clan capital raid seasons

ClanCapitalRaidSeasonsRequest

Bases: IterRequestModel

Retrieve clan's capital raid seasons

Source code in pyclasher/api/requests/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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
class ClanCapitalRaidSeasonsRequest(IterRequestModel):
    """
    Retrieve clan's capital raid seasons
    """

    _iter_rtype = ClanCapitalRaidSeason
    _list_rtype = ClanCapitalRaidSeasons

    def __init__(self, clan_tag, limit=None, after=None, before=None):
        """
        initialisation of the clan capital raid seasons request
        :param clan_tag:    Tag of the clan.
        :type clan_tag:     str
        :param limit:       Limit the number of items returned in the response.
        :type limit:        int
        :param after:       Return only items that occur after this marker. Before marker can be found from the response,
                            inside the 'paging' property. Note that only after or before can be specified for a request, not both.
        :type after:        str
        :param before:      Return only items that occur before this marker. Before marker can be found from the response,
                            inside the 'paging' property. Note that only after or before can be specified for a request, not both.
        :type before:       str
        """

        self.clan_tag = clan_tag
        IterRequestModel.__init__(self,
                                  "clans/{clan_tag}/capitalraidseasons",
                                  clan_tag=clan_tag,
                                  kwargs={
                                      'limit': limit,
                                      'after': after,
                                      'before': before
                                  })
        return

    @property
    def average_capital_total_loot_per_season(self):
        return self.items.average_capital_total_loot

    @property
    def average_raids_completed_per_season(self):
        return self.items.average_raids_completed

    @property
    def average_total_attacks_per_season(self):
        return self.items.average_total_attacks

    @property
    def average_enemy_districts_destroyed_per_season(self):
        return self.items.average_enemy_districts_destroyed

    @property
    def average_defensive_reward_per_season(self):
        return self.items.average_defensive_reward

    @property
    def average_offensive_reward_per_season(self):
        return self.items.average_offensive_reward

__init__(clan_tag, limit=None, after=None, before=None)

initialisation of the clan capital raid seasons request :param clan_tag: Tag of the clan. :type clan_tag: str :param limit: Limit the number of items returned in the response. :type limit: int :param after: Return only items that occur after this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. :type after: str :param before: Return only items that occur before this marker. Before marker can be found from the response, inside the 'paging' property. Note that only after or before can be specified for a request, not both. :type before: str

Source code in pyclasher/api/requests/clan_capital_raid_seasons.py
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
def __init__(self, clan_tag, limit=None, after=None, before=None):
    """
    initialisation of the clan capital raid seasons request
    :param clan_tag:    Tag of the clan.
    :type clan_tag:     str
    :param limit:       Limit the number of items returned in the response.
    :type limit:        int
    :param after:       Return only items that occur after this marker. Before marker can be found from the response,
                        inside the 'paging' property. Note that only after or before can be specified for a request, not both.
    :type after:        str
    :param before:      Return only items that occur before this marker. Before marker can be found from the response,
                        inside the 'paging' property. Note that only after or before can be specified for a request, not both.
    :type before:       str
    """

    self.clan_tag = clan_tag
    IterRequestModel.__init__(self,
                              "clans/{clan_tag}/capitalraidseasons",
                              clan_tag=clan_tag,
                              kwargs={
                                  'limit': limit,
                                  'after': after,
                                  'before': before
                              })
    return