Class ApiStatus


  • @ThreadSafe
    public final class ApiStatus
    extends java.lang.Object
    • Field Detail

      • 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 is OK and throw YTranslateApiException otherwise.
        Parameters:
        status - status code