Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@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
@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
@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
@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
@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
@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
@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
@cassiopeia.type.core.common.lazyproperty
def duration(self):
"""datetime duration of the match"""
return datetime.timedelta(seconds=self.data.matchDuration)
@cassiopeia.type.core.common.lazyproperty
def bans(self):
"""
Returns:
list: the bans for this game
"""
return [Ban(ban) for ban in self.data.bannedChampions]
@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