Class GHRateLimit

java.lang.Object
org.kohsuke.github.GHRateLimit

public class GHRateLimit extends Object
Rate limit.
Author:
Liam Newman
  • Method Details

    • 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 reset date for the Core API rate limit 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 the rate limit status for all non-search-related resources in the REST API.
      Returns:
      a rate limit record
      Since:
      1.100
    • getSearch

      @Nonnull public GHRateLimit.Record getSearch()
      The search record provides the rate limit status for the Search API.
      Returns:
      a rate limit record
      Since:
      1.115
    • getGraphQL

      @Nonnull public GHRateLimit.Record getGraphQL()
      The graphql record provides the rate limit status for the GraphQL API.
      Returns:
      a rate limit record
      Since:
      1.115
    • getIntegrationManifest

      @Nonnull public GHRateLimit.Record getIntegrationManifest()
      The integration manifest record provides the rate limit status for the GitHub App Manifest code conversion endpoint.
      Returns:
      a rate limit record
      Since:
      1.115
    • toString

      public String toString()
      To string.
      Overrides:
      toString in class Object
      Returns:
      the string
    • equals

      public boolean equals(Object o)
      Equals.
      Overrides:
      equals in class Object
      Parameters:
      o - the o
      Returns:
      true, if successful
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int