コード例 #1
0
    def get_leaderboards(self) -> leaderboard.Leaderboard:
        """
        Get the Leaderboard for all the games, along with the data in it.

        Returns
        -------
        `leaderboard.Leaderboard`
            The Leaderboard data model, containing all the ranking for the games in Hypixel.
        """
        json = self._fetch(self.url["leaderboards"])

        return leaderboard.Leaderboard(json["leaderboards"])
コード例 #2
0
ファイル: client.py プロジェクト: GrandMoff100/HypixelIO
    def get_leaderboards(self) -> leaderboard.Leaderboard:
        """
        Get the Leaderboard for all the games, along with the data in it.

        Parameters:
            None

        Returns:
            leaderboard (Leaderboard): The Leaderboard data model, containing all the ranking for the games in Hypixel.
        """
        json, success = self._fetch("/leaderboards")

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

        return leaderboard.Leaderboard(json["leaderboards"])