Class RateLimit

  • All Implemented Interfaces:
    java.io.Serializable

    public class RateLimit
    extends java.lang.Object
    implements java.io.Serializable
    Represents the client's rate limit.
     type RateLimit
     
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      RateLimit()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getCost()
      The point cost for the current query counting against the rate limit.
      int getLimit()
      The maximum number of points the client is permitted to consume in a 60-minute window.
      int getRemaining()
      The number of points remaining in the current rate limit window.
      java.time.ZonedDateTime getResetAt()
      The time at which the current rate limit window resets in UTC epoch seconds.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RateLimit

        public RateLimit()
    • Method Detail

      • getLimit

        public int getLimit()
        The maximum number of points the client is permitted to consume in a 60-minute window.
        Returns:
        the limit.
      • getCost

        public int getCost()
        The point cost for the current query counting against the rate limit.
        Returns:
        the cost.
      • getRemaining

        public int getRemaining()
        The number of points remaining in the current rate limit window.
        Returns:
        the remaining points.
      • getResetAt

        public java.time.ZonedDateTime getResetAt()
        The time at which the current rate limit window resets in UTC epoch seconds.
        Returns:
        the time the rate limit window will reset.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object