Skip to content

Commit b7a470b

Browse files
authored
Merge pull request #8 from PyBotDevs/recently-ended-auctions-api-endpoint
Add API endpoint return function for getting recently ended auctions
2 parents 9e17b66 + b1ad8d6 commit b7a470b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ def get_player_auctions(self, player_name: str) -> dict:
3434
player_auctions = json.loads(api_request)
3535
return player_auctions
3636

37+
def get_recently_ended_auctions(self) -> dict:
38+
"""
39+
Returns a `dict` of all the auctions that have recently ended within 60 seconds.
40+
"""
41+
api_request = requests.get("https://api.hypixel.net/skyblock/auctions_ended").content
42+
recently_ended_auctions = json.loads(api_request)
43+
return recently_ended_auctions
44+
3745
def get_news(self) -> dict:
3846
"""
3947
Returns a `dict` of the latest Skyblock news from Hypixel.

0 commit comments

Comments
 (0)