diff --git a/hypixel-api-core/src/main/java/net/hypixel/api/HypixelAPI.java b/hypixel-api-core/src/main/java/net/hypixel/api/HypixelAPI.java index 942cf1b9..37f7784b 100644 --- a/hypixel-api-core/src/main/java/net/hypixel/api/HypixelAPI.java +++ b/hypixel-api-core/src/main/java/net/hypixel/api/HypixelAPI.java @@ -208,6 +208,28 @@ public CompletableFuture getPetRepository() { .thenApply(PetRepositoryImpl::new); } + /** + * @param profile Profile ID of which you are requesting the Garden for. + * @return the future + */ + public CompletableFuture getSkyBlockGarden(String profile) { + return get(true, SkyBlockGardenReply.class, "skyblock/garden", + HTTPQueryParams.create() + .add("profile", profile) + ); + } + + /** + * @param profile Profile ID of which you are requesting the Museum for. + * @return the future + */ + public CompletableFuture getSkyblockMuseum(String profile) { + return get(true, SkyBlockMuseumReply.class, "skyblock/museum", + HTTPQueryParams.create() + .add("profile", profile) + ); + } + public CompletableFuture getSkyBlockProfile(String profile) { return get(true, SkyBlockProfileReply.class, "skyblock/profile", HTTPQueryParams.create() diff --git a/hypixel-api-core/src/main/java/net/hypixel/api/reply/skyblock/SkyBlockGardenReply.java b/hypixel-api-core/src/main/java/net/hypixel/api/reply/skyblock/SkyBlockGardenReply.java new file mode 100644 index 00000000..3367fa97 --- /dev/null +++ b/hypixel-api-core/src/main/java/net/hypixel/api/reply/skyblock/SkyBlockGardenReply.java @@ -0,0 +1,24 @@ +package net.hypixel.api.reply.skyblock; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import net.hypixel.api.reply.RateLimitedReply; + +public class SkyBlockGardenReply extends RateLimitedReply { + private JsonElement garden; + + public JsonObject getGarden() { + if (garden == null || garden.isJsonNull()) { + return null; + } else { + return garden.getAsJsonObject(); + } + } + + @Override + public String toString() { + return "SkyBlockGardenReply{" + + "profile=" + garden + + "} " + super.toString(); + } +} diff --git a/hypixel-api-core/src/main/java/net/hypixel/api/reply/skyblock/SkyBlockMuseumReply.java b/hypixel-api-core/src/main/java/net/hypixel/api/reply/skyblock/SkyBlockMuseumReply.java new file mode 100644 index 00000000..137477f9 --- /dev/null +++ b/hypixel-api-core/src/main/java/net/hypixel/api/reply/skyblock/SkyBlockMuseumReply.java @@ -0,0 +1,24 @@ +package net.hypixel.api.reply.skyblock; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import net.hypixel.api.reply.RateLimitedReply; + +public class SkyBlockMuseumReply extends RateLimitedReply { + private JsonElement members; + + public JsonObject getMuseum() { + if (members == null || members.isJsonNull()) { + return null; + } else { + return members.getAsJsonObject(); + } + } + + @Override + public String toString() { + return "SkyBlockMuseumReply{" + + "profile=" + members + + "} " + super.toString(); + } +}