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 intERR_DAILY_CHAR_LIMIT_EXCEEDEDYou have reached the daily limit for the volume of translated text (including calls of the translate method).static intERR_DAILY_REQ_LIMIT_EXCEEDEDYou have reached the daily limit for requests (including calls of the translate method).static intERR_KEY_BLOCKEDThis API key has been blocked.static intERR_KEY_INVALIDInvalid API key.static intERR_LANG_NOT_SUPPORTEDThe specified translation direction is not supported.static intERR_TEXT_TOO_LONGThe text size exceeds the maximum.static intERR_UNPROCESSABLE_TEXTThe text could not be translated.static intOKOperation completed successfully. 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcheck(int status)Check that status isOKand throwYTranslateApiExceptionotherwise. 
 - 
 
- 
- 
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 isOKand throwYTranslateApiExceptionotherwise.- Parameters:
 status- status code
 
 - 
 
 -