Skip to content

Commit a3b13c0

Browse files
authored
Merge pull request #2 from PyBotDevs/skyblock-collections-and-skills-functions
Add functions for fetching Skyblock Collections and Skills data
2 parents b77806f + f904277 commit a3b13c0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

api.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,19 @@ def get_player_profile(self, player_name: str):
5757
api_request = requests.get(f"https://api.hypixel.net/skyblock/profiles?key={self.api_key}&uuid={player_uuid}")
5858
player_profile_data = json.loads(api_request)
5959
return player_profile_data
60+
61+
def get_collections(self):
62+
"""
63+
Returns a `dict` of information related to Skyblock Collections.
64+
"""
65+
api_request = requests.get("https://api.hypixel.net/resources/skyblock/collections")
66+
collections_data = json.loads(api_request)
67+
return collections_data
68+
69+
def get_skills(self):
70+
"""
71+
Returns a `dict` of information related to Skyblock Skills.
72+
"""
73+
api_request = requests.get("https://api.hypixel.net/resources/skyblock/skills")
74+
collections_data = json.loads(api_request)
75+
return collections_data

0 commit comments

Comments
 (0)