How to use the cassiopeia.type.core.common.lazyproperty function in cassiopeia

To help you get started, we’ve selected a few cassiopeia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meraki-analytics / cassiopeia / cassiopeia / type / core / match.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def spider_kills_per_min_counts(self):
        """
        Returns:
            ParticipantTimelineData: vilemaw kills per minute timeline counts
        """
        return ParticipantTimelineData(self.data.vilemawKillsPerMinCounts) if self.data.vilemawKillsPerMinCounts else None
github meraki-analytics / cassiopeia / cassiopeia / type / core / staticdata.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def gold(self):
        """
        Returns:
            Gold: price information for this item
        """
        return Gold(self.data.gold) if self.data.gold else None
github meraki-analytics / cassiopeia / cassiopeia / type / core / league.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def participant_entry(self):
        """
        Returns:
            Entry: the entry for the relevant team or summoner that is a member of this league. Only present when full league is requested so that participant's entry can be identified. None when individual entry is requested
        """
        for entry in self.entries:
            if entry.data.playerOrTeamId == self.data.participantId:
                return entry
        return None
github meraki-analytics / cassiopeia / cassiopeia / type / core / match.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def ancient_golem_kills_per_min_counts(self):
        """
        Returns:
            ParticipantTimelineData: ancient golem kills per minute timeline counts
        """
        return ParticipantTimelineData(self.data.ancientGolemKillsPerMinCounts) if self.data.ancientGolemKillsPerMinCounts else None
github meraki-analytics / cassiopeia / cassiopeia / type / core / match.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def elder_lizard_assists_per_min_counts(self):
        """
        Returns:
            ParticipantTimelineData: elder lizard assists per minute timeline counts
        """
        return ParticipantTimelineData(self.data.elderLizardAssistsPerMinCounts) if self.data.elderLizardAssistsPerMinCounts else None
github meraki-analytics / cassiopeia / cassiopeia / type / core / match.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def inhibitor_kills_per_min_counts(self):
        """
        Returns:
            ParticipantTimelineData: inhibitor kills per minute timeline counts
        """
        return ParticipantTimelineData(self.data.inhibitorKillsPerMinCounts) if self.data.inhibitorKillsPerMinCounts else None
github meraki-analytics / cassiopeia / cassiopeia / type / core / match.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def killer(self):
        """
        Returns:
            Participant: the participant who did the killing
        """
        value = self.__participants[self.data.killerId] if self.data.killerId else None
        self.__count_participant()
        return value
github meraki-analytics / cassiopeia / cassiopeia / type / core / matchhistory.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def duration(self):
        """datetime    duration of the match"""
        return datetime.timedelta(seconds=self.data.matchDuration)
github meraki-analytics / cassiopeia / cassiopeia / type / core / currentgame.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def bans(self):
        """
        Returns:
            list: the bans for this game
        """
        return [Ban(ban) for ban in self.data.bannedChampions]
github meraki-analytics / cassiopeia / cassiopeia / type / core / matchhistory.py View on Github external
    @cassiopeia.type.core.common.lazyproperty
    def creation(self):
        """datetime    when the match was created"""
        return datetime.datetime.utcfromtimestamp(self.data.matchCreation / 1000) if self.data.matchCreation else None