From 2785f887158bcc4cadaf3e06c12969b5c8a0d1f8 Mon Sep 17 00:00:00 2001 From: Hammy Date: Sat, 3 Jul 2021 06:36:23 +0100 Subject: [PATCH] Make constructor private & add setter for APIWrapper --- src/main/java/me/goudham/MyWaifuClient.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/goudham/MyWaifuClient.java b/src/main/java/me/goudham/MyWaifuClient.java index 35b1d16..09df518 100644 --- a/src/main/java/me/goudham/MyWaifuClient.java +++ b/src/main/java/me/goudham/MyWaifuClient.java @@ -32,7 +32,7 @@ import java.util.concurrent.Executor; * */ public class MyWaifuClient { - private final APIWrapper APIWrapper; + private APIWrapper APIWrapper; /** * Creates an instance of {@link MyWaifuClient} @@ -42,7 +42,7 @@ public class MyWaifuClient { * @param httpClient The underlying {@link HttpClient} to use for HttpRequests * */ - MyWaifuClient(@NotNull String apiKey, @NotNull HttpClient httpClient) { + private MyWaifuClient(@NotNull String apiKey, @NotNull HttpClient httpClient) { APIWrapper = new APIWrapper(apiKey, httpClient); } @@ -367,6 +367,10 @@ public class MyWaifuClient { return APIWrapper.searchSeries(name); } + void setAPIWrapper(me.goudham.APIWrapper APIWrapper) { + this.APIWrapper = APIWrapper; + } + /** * Builder for {@link MyWaifuClient} *