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

Method valid

Lib/src/main/java/me/egg82/arr/readarr/ReadarrV1API.java:15–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

setupReadarrMethod · 0.95

Calls 3

versionMethod · 0.95
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected