neopixeldev / hypixel-api-java

Asynchronous Java wrapper for the Hypixel API
MIT License
6 stars 2 forks source link

Updated RequestFactory to be passed into each HypixelObject #27

Closed unpluggedsam closed 2 years ago

unpluggedsam commented 2 years ago

This commit will allow RequestFactory to be passed into different HypixelObjects. This will allow them to retrieve information from the API.

The RequestFactory requires an API key an construction. This is so it can append the key to the URL provided by an Endpoint being passed in.

The HypixelObjects can now simply request information with the reference to the RequestFactory and Endpoint. For example: requestFactory.getInformation(Endpoint.PLAYER, "stats.bedwars.kills");