Skip to content

Commit 1114532

Browse files
committed
fix: Add new constructor that takes DeepLClientOptions
1 parent a4a1f84 commit 1114532

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

deepl-java/src/main/java/com/deepl/api/DeepLClient.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ public DeepLClient(String authKey) throws IllegalArgumentException {
2626
this(authKey, new DeepLClientOptions());
2727
}
2828

29+
/**
30+
* Initializes a new DeepLClient object using your Authentication Key.
31+
*
32+
* <p>Note: This function does not establish a connection to the DeepL API. To check connectivity,
33+
* use {@link DeepLClient#getUsage()}.
34+
*
35+
* @param authKey DeepL Authentication Key as found in your <a
36+
* href="https://www.deepl.com/pro-account/">DeepL account</a>.
37+
* @param options Additional options controlling Client behaviour.
38+
* @throws IllegalArgumentException If authKey is invalid.
39+
* @deprecated Use the constructor that takes {@link DeepLClientOptions} instead of {@link
40+
* TranslatorOptions}
41+
*/
42+
@Deprecated
43+
public DeepLClient(String authKey, TranslatorOptions options) throws IllegalArgumentException {
44+
super(authKey, options);
45+
}
46+
2947
/**
3048
* Initializes a new DeepLClient object using your Authentication Key.
3149
*

0 commit comments

Comments
 (0)