MCPcopy Create free account
hub / github.com/egg82/fetcharr / valid

Method valid

Lib/src/main/java/me/egg82/arr/radarr/RadarrV3API.java:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 }
18
19 @Override
20 public boolean valid() {
21 JsonNode response = get("/api");
22 if (response == null) {
23 return false;
24 }
25 String current = response.getObject().getString("current");
26 if (current == null || !current.equalsIgnoreCase(version())) {
27 logger.warn("RADARR_{} returned unexpected response for URL {}: {}", this.id, this.baseUrl + "/api", response.getObject().toString());
28 return false;
29 }
30 return true;
31 }
32
33 @Override
34 public @NotNull ArrType type() {

Callers 1

setupRadarrMethod · 0.95

Calls 3

versionMethod · 0.95
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected