Class ApiStatus
- java.lang.Object
-
- com.github.vbauer.yta.service.basic.ApiStatus
-
@ThreadSafe public final class ApiStatus extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
ERR_DAILY_CHAR_LIMIT_EXCEEDED
You have reached the daily limit for the volume of translated text (including calls of the translate method).static int
ERR_DAILY_REQ_LIMIT_EXCEEDED
You have reached the daily limit for requests (including calls of the translate method).static int
ERR_KEY_BLOCKED
This API key has been blocked.static int
ERR_KEY_INVALID
Invalid API key.static int
ERR_LANG_NOT_SUPPORTED
The specified translation direction is not supported.static int
ERR_TEXT_TOO_LONG
The text size exceeds the maximum.static int
ERR_UNPROCESSABLE_TEXT
The text could not be translated.static int
OK
Operation completed successfully.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
check(int status)
Check that status isOK
and throwYTranslateApiException
otherwise.
-
-
-
Field Detail
-
OK
public static final int OK
Operation completed successfully.- See Also:
- Constant Field Values
-
ERR_KEY_INVALID
public static final int ERR_KEY_INVALID
Invalid API key.- See Also:
- Constant Field Values
-
ERR_KEY_BLOCKED
public static final int ERR_KEY_BLOCKED
This API key has been blocked.- See Also:
- Constant Field Values
-
ERR_DAILY_REQ_LIMIT_EXCEEDED
public static final int ERR_DAILY_REQ_LIMIT_EXCEEDED
You have reached the daily limit for requests (including calls of the translate method).- See Also:
- Constant Field Values
-
ERR_DAILY_CHAR_LIMIT_EXCEEDED
public static final int ERR_DAILY_CHAR_LIMIT_EXCEEDED
You have reached the daily limit for the volume of translated text (including calls of the translate method).- See Also:
- Constant Field Values
-
ERR_TEXT_TOO_LONG
public static final int ERR_TEXT_TOO_LONG
The text size exceeds the maximum.- See Also:
- Constant Field Values
-
ERR_UNPROCESSABLE_TEXT
public static final int ERR_UNPROCESSABLE_TEXT
The text could not be translated.- See Also:
- Constant Field Values
-
ERR_LANG_NOT_SUPPORTED
public static final int ERR_LANG_NOT_SUPPORTED
The specified translation direction is not supported.- See Also:
- Constant Field Values
-
-
Method Detail
-
check
public static void check(int status)
Check that status isOK
and throwYTranslateApiException
otherwise.- Parameters:
status
- status code
-
-