From fcb20efbd828767f938a574dd8723c4f13bce578 Mon Sep 17 00:00:00 2001 From: 5gi <5gi@5servers.us> Date: Wed, 7 Dec 2022 12:36:11 -0500 Subject: [PATCH] Update 'src/main/java/com/the5gi/DeepJ/Translator.java' --- src/main/java/com/the5gi/DeepJ/Translator.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/the5gi/DeepJ/Translator.java b/src/main/java/com/the5gi/DeepJ/Translator.java index 2720682..baf6dca 100644 --- a/src/main/java/com/the5gi/DeepJ/Translator.java +++ b/src/main/java/com/the5gi/DeepJ/Translator.java @@ -23,26 +23,26 @@ public class Translator { if (globalAuthKey == null) { System.out.println("\n[DeepJ] You are currently using the Global API Key Translator Constructor." +"\n[DeepJ] If you are trying to use global API keys, Call the method \"Translator.setGlobalAuthKey(String key)\" and then re-use this contructor." + "\n[DeepJ] If you want to define an different authkey every time do: \"new Translator(String authKey)\"\n"); } else { - request = new Request(globalAuthKey); + request = new Request(globalAPIKey); } } public Translator(String authKey) { - if (!Objects.equals(globalAuthKey, "null")) { + if (!Objects.equals(globalAPIKey, "null")) { System.out.println("[DeepJ] Looks like you have defined a global API key already! You can use if by just typing \"new Traslator()\"" + "\n instead of \"new Translator(String authKey)\". NOTE: This will work but just some advice :)"); } request = new Request(authKey); } - public Translator(String authKey, boolean silence) { - if (!Objects.equals(globalAuthKey, "null") && !silence) { + public Translator(String apiKey, boolean silence) { + if (!Objects.equals(globalAPIKey, "null") && !silence) { System.out.println("[DeepJ] Looks like you have defined a global API key already! You can use if by just typing \"new Traslator()\"" + "\n instead of \"new Translator(String authKey)\". NOTE: This will work but this is just some advice :)"); } - request = new Request(authKey); + request = new Request(apiKey); } public static void setGlobalAPIKey(String key) { - globalAuthKey = key; + globalAPIKey = key; } - public static Translator newTranslator(String authKey) { - return new Translator(authKey); + public static Translator newTranslator(String apiKey) { + return new Translator(apiKey); } public static Translator newTranslator() { if (globalAuthKey == null) {