HypixelDev / PublicAPI

Official Java implementation of the Hypixel Public API.
https://api.hypixel.net
MIT License
533 stars 151 forks source link

[RE-SUGGESTION] Auctions API #284

Closed TheBlackSnowman closed 4 years ago

TheBlackSnowman commented 4 years ago

With the auctions api containing a lot of data, it would be useful to be able to query specific items, for example

https://api.hypixel.net/skyblock/auctions?key=[API KEY]&item=[Item id]

it would make retrieving data a lot faster considering there's usually 45+ pages of data to parse.

(https://github.com/HypixelDev/PublicAPI/issues/283) How ever i don't see the issue on how it would shift the processing power onto the api, either way you'd still be making 45+ api requests of large quantity, ether it's just in 1 request or 45+ ones, either way your still requesting the same amount of data

ugcodrr commented 4 years ago

Unfortunately the API isn't made to be exactly perfect for what everyone would like. The API is built to use little resources to work on handling the traffic instead of the processing for requests. If you use the player endpoint you will find that some players have longer data than the auction data that you are using. If it's hard to see the JSON I would recommend getting a JSON Parser for your browser, etc and if its performance wise then I would def recommend getting an upgrade for whatever is being used currently. There's probably more than just this but yeah hopefully helped a bit.

Could (maybe?) get added in the future ¯_(ツ)_/¯

ConnorLinfoot commented 4 years ago

If you wish to discuss the matter you can reply to the existing issue. But adding this would require us to process all the pages to filter out data which does not match the ID, this also includes parsing the NBT data to retrieve the item id. Hence being something that we don't wish to add.