Class GHRateLimit


  • public class GHRateLimit
    extends Object
    Rate limit.
    Author:
    Kohsuke Kawaguchi
    • Field Detail

      • remaining

        @Deprecated
        public int remaining
        Deprecated.
        This value should never have been made public. Use getRemaining()
        Remaining calls that can be made.
      • limit

        @Deprecated
        public int limit
        Deprecated.
        This value should never have been made public. Use getLimit()
        Allotted API call per hour.
      • reset

        @Deprecated
        public Date reset
        Deprecated.
        This value should never have been made public. Use getResetDate()
        The time at which the current rate limit window resets in UTC epoch seconds. NOTE: that means to
    • Method Detail

      • getResetDate

        @Nonnull
        public Date getResetDate()
        Returns the date at which the Core API rate limit will reset.
        Returns:
        the calculated date at which the rate limit has or will reset.
      • getRemaining

        public int getRemaining()
        Gets the remaining number of Core APIs requests allowed before this connection will be throttled.
        Returns:
        an integer
        Since:
        1.100
      • getLimit

        public int getLimit()
        Gets the total number of Core API calls per hour allotted for this connection.
        Returns:
        an integer
        Since:
        1.100
      • getResetEpochSeconds

        public long getResetEpochSeconds()
        Gets the time in epoch seconds when the Core API rate limit will reset.
        Returns:
        a long
        Since:
        1.100
      • isExpired

        public boolean isExpired()
        Whether the rate limit reset date for this instance has passed.
        Returns:
        true if the rate limit reset date has passed. Otherwise false.
        Since:
        1.100
      • getCore

        @Nonnull
        public GHRateLimit.Record getCore()
        The core object provides your rate limit status for all non-search-related resources in the REST API.
        Returns:
        a rate limit record
        Since:
        1.100
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object