Skip to content

Player

LegendLeagueTournamentSeasonResult

Bases: BaseModel

legend league tournament season result model

Source code in pyclasher/api/models/player.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class LegendLeagueTournamentSeasonResult(BaseModel):
    def __init__(self, data):
        super().__init__(data)
        return

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

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

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

id: str property

season ID

:return: the ID of the season :rtype: str

rank: int property

rank of the season

:return: the rank of the season :rtype: int

trophies: int property

trophy score of the season

:return: the trophy score of the season of the player :rtype: int

PlayerClan

Bases: BaseClan

player clan model

clan model found in the player response

Source code in pyclasher/api/models/player.py
 9
10
11
12
class PlayerClan(BaseClan):
    @property
    def clan_level(self):
        return self._get_data('clanLevel')

clan_level: int property

clan level

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

PlayerLegendStatistics

Bases: BaseModel

player legend statistics model

Source code in pyclasher/api/models/player.py
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
class PlayerLegendStatistics(BaseModel):
    @property
    def best_season(self):
        return LegendLeagueTournamentSeasonResult(self._get_data('bestSeason'))

    @property
    def current_season(self):
        return LegendLeagueTournamentSeasonResult(
            self._get_data('currentSeason')
        )

    @property
    def previous_season(self):
        return LegendLeagueTournamentSeasonResult(
            self._get_data('previousSeason')
        )

    @property
    def previous_builder_base_season(self):
        return LegendLeagueTournamentSeasonResult(
            self._get_data('previousBuilderBaseSeason')
        )

    @property
    def previous_versus_season(self):
        return LegendLeagueTournamentSeasonResult(
            self._get_data('previousVersusSeason')
        )

    @property
    def best_builder_base_season(self):
        return LegendLeagueTournamentSeasonResult(
            self._get_data('bestBuilderBaseSeason')
        )

    @property
    def best_versus_season(self):
        return LegendLeagueTournamentSeasonResult(
            self._get_data('bestVersusSeason')
        )

    @property
    def legend_trophies(self):
        return self._get_data('legendTrophies')