forked from Steven/DeepJ
added getAPIKey() to Translator.java
This commit is contained in:
parent
732fc3882d
commit
f47c69715c
@ -55,6 +55,9 @@ instead of "new Translator(String authKey)". NOTE: This will work but just some
|
||||
public void setAPIKey(String authKey) {
|
||||
request = new Request(authKey);
|
||||
}
|
||||
public String getAPIKey() {
|
||||
return request.authKey;
|
||||
}
|
||||
public String translate(Language langToTranslateTo, String sourceMessage) {
|
||||
String response = "Error processing request";
|
||||
try {
|
||||
@ -73,7 +76,7 @@ instead of "new Translator(String authKey)". NOTE: This will work but just some
|
||||
return message;
|
||||
}
|
||||
protected static class Request {
|
||||
private final String authKey;
|
||||
public final String authKey;
|
||||
public Request(String authKey) {
|
||||
this.authKey = authKey;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user