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"])
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"])