Example #1
0
    def player(self, **kwargs):
        """
        Get a player from its Hattrick ID

        :key ht_id: Hattrick ID of the requested player, must be an int
        :rtype: ht_player.HTPlayer
        """
        return ht_player.HTPlayer(chpp=self, **kwargs)
Example #2
0
    def players(self):
        """Players list of current team"""
        data = self._chpp.request(file="players",
                                  version="2.4",
                                  actionType="view",
                                  teamID=self.ht_id).find("Team").find("PlayerList")

        return [ht_player.HTPlayer(chpp=self._chpp,
                                   data=p_data,
                                   team_ht_id=self.ht_id) for p_data in data.findall("Player")]
Example #3
0
 def object_player(self):
     return ht_player.HTPlayer(chpp=self._chpp,
                               ht_id=self.object_player_id,
                               )