<s> import datetime <EOL> import cassiopeia . riotapi <EOL> import cassiopeia . type . core . common <EOL> import cassiopeia . type . dto . championmastery <EOL> @ cassiopeia . type . core . common . inheritdocs <EOL> class ChampionMastery ( cassiopeia . type . core . common . CassiopeiaObject ) : <EOL> dto_type = cassiopeia . type . dto . championmastery . ChampionMastery <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" . format ( champion = self . champion , level = self . level ) <EOL> @ property <EOL> def champion ( self ) : <EOL> """<STR_LIT>""" <EOL> return cassiopeia . riotapi . get_champion_by_id ( self . data . championId ) if self . data . championId else None <EOL> @ property <EOL> def level ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . data . championLevel <EOL> @ property <EOL> def points ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . data . championPoints <EOL> @ property <EOL> def points_since_last_level ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . data . championPointsSinceLastLevel <EOL> @ property <EOL> def points_until_next_level ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . data . championPointsUntilNextLevel <EOL> @ property <EOL> def chest_granted ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . data . chestGranted <EOL> @ property <EOL> def highest_grade ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . data . highestGrade <EOL> @ property <EOL> def last_played ( self ) : <EOL> """<STR_LIT>""" <EOL> return datetime . datetime . utcfromtimestamp ( self . data . lastPlayTime / <NUM_LIT:1000> ) if self . data . lastPlayTime else None <EOL> @ property <EOL> def summoner ( self ) : <EOL> """<STR_LIT>""" <EOL> return cassiopeia . riotapi . get_summoner_by_id ( self . data . playerId ) if self . data . playerId else None <EOL> def _sa_rebind_all ( ) : <EOL> ChampionMastery . dto_type = cassiopeia . type . dto . championmastery . ChampionMastery </s>
