示例#1
0
    def get_games_info(self) -> games.Games:
        """
        Get the List of Hypixel Games and Their Info.

        Returns
        -------
        `games.Games`
            The Games Data model, Containing the information, and attributes for all the games.
        """
        json = self._fetch(self.url["game_info"])

        return games.Games(json["games"], json["playerCount"])
示例#2
0
    def get_games_info(self) -> games.Games:
        """
        Get the List of Hypixel Games and Their Info.

        Parameters:
            None

        Returns:
            games (Games): The Games Data model, Containing the information, and attributes for all the games.
        """
        json, success = self._fetch("/gameCounts")

        if not success:
            raise HypixelAPIError(
                "The Key given is invalid, or something else has problem.")

        return games.Games(json["games"], json["playerCount"])