From a9b74a581787811c10a238fea34bb2a1d2306f38 Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Sun, 2 Jul 2023 20:35:07 +0530 Subject: [PATCH] Add API endpoint handler for fetching a player's bingo data --- api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api.py b/api.py index cb9ac55..3bf8510 100644 --- a/api.py +++ b/api.py @@ -127,6 +127,13 @@ def get_player_profile(self, player_name: str) -> dict: player_profile_data = parse(api_request) return player_profile_data + def get_player_bingo_data(self, player_name: str) -> dict: + """Returns a `dict` of Bingo data for parcitipated events of the provided player.""" + player_uuid = self.get_uuid(player_name) + api_request = requests.get(f"https://api.hypixel.net/skyblock/bingo?key={self.api_key}&uuid={player_uuid}").content + player_bingo_data = parse(api_request) + return player_bingo_data + def get_collections(self) -> dict: """Returns a `dict` of information related to Skyblock Collections.""" api_request = requests.get("https://api.hypixel.net/resources/skyblock/collections").content