Skip to content

Commit a9b74a5

Browse files
committed
Add API endpoint handler for fetching a player's bingo data
1 parent 61e8beb commit a9b74a5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ def get_player_profile(self, player_name: str) -> dict:
127127
player_profile_data = parse(api_request)
128128
return player_profile_data
129129

130+
def get_player_bingo_data(self, player_name: str) -> dict:
131+
"""Returns a `dict` of Bingo data for parcitipated events of the provided player."""
132+
player_uuid = self.get_uuid(player_name)
133+
api_request = requests.get(f"https://api.hypixel.net/skyblock/bingo?key={self.api_key}&uuid={player_uuid}").content
134+
player_bingo_data = parse(api_request)
135+
return player_bingo_data
136+
130137
def get_collections(self) -> dict:
131138
"""Returns a `dict` of information related to Skyblock Collections."""
132139
api_request = requests.get("https://api.hypixel.net/resources/skyblock/collections").content

0 commit comments

Comments
 (0)