Skip to content

Commit ce1af6f

Browse files
committed
Use v2/feeback, remove v2 api switch
1 parent c16893e commit ce1af6f

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/main/java/com/botdetector/http/BotDetectorClient.java

+7-10
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,21 @@ public class BotDetectorClient
8585
private static final String API_VERSION_FALLBACK_WORD = "latest";
8686
private static final HttpUrl BASE_HTTP_URL = HttpUrl.parse(
8787
System.getProperty("BotDetectorAPIPath", "https://api.prd.osrsbotdetector.com"));
88-
private static final HttpUrl BASE_HTTP_URL_V2 = HttpUrl.parse(
89-
System.getProperty("BotDetectorAPIPathV2", "https://api-v2.prd.osrsbotdetector.com"));
9088
private static final Supplier<String> CURRENT_EPOCH_SUPPLIER = () -> String.valueOf(Instant.now().getEpochSecond());
9189

9290
@Getter
9391
@AllArgsConstructor
9492
private enum ApiPath
9593
{
96-
DETECTION("v2/report", true),
97-
PLAYER_STATS_REPORTS("v2/player/report/score", true),
98-
PLAYER_STATS_FEEDBACK("v2/player/feedback/score", true),
99-
PREDICTION("v2/player/prediction", true),
100-
FEEDBACK("v1/feedback/", false),
101-
VERIFY_DISCORD("site/discord_user/", false)
94+
DETECTION("v2/report"),
95+
PLAYER_STATS_REPORTS("v2/player/report/score"),
96+
PLAYER_STATS_FEEDBACK("v2/player/feedback/score"),
97+
PREDICTION("v2/player/prediction"),
98+
FEEDBACK("v2/feedback"),
99+
VERIFY_DISCORD("site/discord_user")
102100
;
103101

104102
final String path;
105-
final boolean v2;
106103
}
107104

108105
public OkHttpClient okHttpClient;
@@ -125,7 +122,7 @@ private enum ApiPath
125122
*/
126123
private HttpUrl getUrl(ApiPath path, boolean addVersion)
127124
{
128-
HttpUrl.Builder builder = (path.isV2() ? BASE_HTTP_URL_V2 : BASE_HTTP_URL).newBuilder();
125+
HttpUrl.Builder builder = BASE_HTTP_URL.newBuilder();
129126

130127
if (addVersion)
131128
{

0 commit comments

Comments
 (0)