diff options
author | Aaron <51387595+AzureAaron@users.noreply.github.com> | 2023-11-14 23:49:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 23:49:08 -0500 |
commit | 2106589693142f530265ea7ec1c5a2fd60e25f78 (patch) | |
tree | f7bffda3e777cdf49f48b81dbccc6c7f241830dd /src | |
parent | 41cc6598899c0ec3b906c75f6be6805be315e100 (diff) | |
download | Skyblocker-2106589693142f530265ea7ec1c5a2fd60e25f78.tar.gz Skyblocker-2106589693142f530265ea7ec1c5a2fd60e25f78.tar.bz2 Skyblocker-2106589693142f530265ea7ec1c5a2fd60e25f78.zip |
Hypixel API v2 (#419)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/utils/Http.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/hysky/skyblocker/utils/Http.java b/src/main/java/de/hysky/skyblocker/utils/Http.java index 82ab6c5e..eced3c08 100644 --- a/src/main/java/de/hysky/skyblocker/utils/Http.java +++ b/src/main/java/de/hysky/skyblocker/utils/Http.java @@ -26,7 +26,7 @@ import net.minecraft.SharedConstants; */ public class Http { private static final String NAME_2_UUID = "https://api.minecraftservices.com/minecraft/profile/lookup/name/"; - private static final String HYPIXEL_PROXY = "https://hysky.de/api/hypixel/"; + private static final String HYPIXEL_PROXY = "https://hysky.de/api/hypixel/v2/"; private static final String USER_AGENT = "Skyblocker/" + SkyblockerMod.VERSION + " (" + SharedConstants.getGameVersion().getName() + ")"; private static final HttpClient HTTP_CLIENT = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) @@ -76,6 +76,8 @@ public class Http { * @param endpoint the endpoint - do not include any leading or trailing slashes * @param query the query string - use empty string if n/a * @return the requested data with zero pre-processing applied + * + * @implNote the {@code v2} prefix is automatically added */ public static ApiResponse sendHypixelRequest(String endpoint, @NotNull String query) throws IOException, InterruptedException { return sendCacheableGetRequest(HYPIXEL_PROXY + endpoint + query); |