From ec120fb826dc4a6c9b83c40d6d9797e4964f4a02 Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Sat, 31 Dec 2022 15:34:11 +0530 Subject: [PATCH] Explicitly define API endpoint returns as `dict` --- api.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/api.py b/api.py index 2472ff6..10e3aef 100644 --- a/api.py +++ b/api.py @@ -14,7 +14,7 @@ def get_uuid(self, player_name: str) -> str: return content["id"] # API Retrieval Commands - def get_auctions(self, page: int = 0): + def get_auctions(self, page: int = 0) -> dict: """ Returns a `dict` of the 1000 latest auctions in Skyblock. @@ -25,7 +25,7 @@ def get_auctions(self, page: int = 0): auctions = json.loads(api_request) return auctions - def get_player_auctions(self, player_name: str): + def get_player_auctions(self, player_name: str) -> dict: """ Returns a `dict` of all Skyblock auctions from a particular player. """ @@ -34,7 +34,7 @@ def get_player_auctions(self, player_name: str): player_auctions = json.loads(api_request) return player_auctions - def get_news(self): + def get_news(self) -> dict: """ Returns a `dict` of the latest Skyblock news from Hypixel. """ @@ -42,7 +42,7 @@ def get_news(self): news = json.loads(api_request) return news - def get_bazaar_data(self): + def get_bazaar_data(self) -> dict: """ Returns a `dict` of Skyblock bazaar data. """ @@ -50,7 +50,7 @@ def get_bazaar_data(self): bazaar_data = json.loads(api_request) return bazaar_data - def get_player_profile(self, player_name: str): + def get_player_profile(self, player_name: str) -> dict: """ Returns a `dict` of profile data on a player. """ @@ -59,7 +59,7 @@ def get_player_profile(self, player_name: str): player_profile_data = json.loads(api_request) return player_profile_data - def get_collections(self): + def get_collections(self) -> dict: """ Returns a `dict` of information related to Skyblock Collections. """ @@ -67,7 +67,7 @@ def get_collections(self): collections_data = json.loads(api_request) return collections_data - def get_skills(self): + def get_skills(self) -> dict: """ Returns a `dict` of information related to Skyblock Skills. """ @@ -75,7 +75,7 @@ def get_skills(self): collections_data = json.loads(api_request) return collections_data - def get_items(self): + def get_items(self) -> dict: """ Returns a `dict` of information related to Skyblock items. """ @@ -83,7 +83,7 @@ def get_items(self): items_data = json.loads(api_request) return items_data - def get_mayor_information(self): + def get_mayor_information(self) -> dict: """ Returns a `dict` of information regarding the current mayor in Skyblock. """ @@ -92,7 +92,7 @@ def get_mayor_information(self): del mayor_info["current"] return mayor_info - def get_current_election(self): + def get_current_election(self) -> dict: """ Returns a `dict` of information regarding the current election in Skyblock. """