From f9042770d160994e71e4cd98a35c66031e95654d Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Fri, 30 Dec 2022 18:42:31 +0530 Subject: [PATCH] Add functions for fetching Skyblock Collections and Skills data --- api.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/api.py b/api.py index bb9cbcc..e81bf5d 100644 --- a/api.py +++ b/api.py @@ -57,3 +57,19 @@ def get_player_profile(self, player_name: str): api_request = requests.get(f"https://api.hypixel.net/skyblock/profiles?key={self.api_key}&uuid={player_uuid}") player_profile_data = json.loads(api_request) return player_profile_data + + def get_collections(self): + """ + Returns a `dict` of information related to Skyblock Collections. + """ + api_request = requests.get("https://api.hypixel.net/resources/skyblock/collections") + collections_data = json.loads(api_request) + return collections_data + + def get_skills(self): + """ + Returns a `dict` of information related to Skyblock Skills. + """ + api_request = requests.get("https://api.hypixel.net/resources/skyblock/skills") + collections_data = json.loads(api_request) + return collections_data