Click or drag to resize

RateLimit Class

A snapshot of an API account's rate limit.
Inheritance Hierarchy
SystemObject
  DegreeDays.ApiRateLimit

Namespace: DegreeDays.Api
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public sealed class RateLimit

The RateLimit type exposes the following members.

Properties
 NameDescription
Public propertyMinutesToReset Gets the number of minutes until the rate limit is reset, at the time that this snapshot of the rate-limit state was taken.
Public propertyRequestUnitsAvailable Gets the number of request units available for use before the next reset, at the time that this snapshot of the rate-limit state was taken.
Top
Methods
 NameDescription
Public methodEquals Returns true if obj is a RateLimit object with equal properties.
(Overrides ObjectEquals(Object))
Public methodGetHashCode Overridden to ensure consistency with Equals.
(Overrides ObjectGetHashCode)
Public methodToString Returns a non-null, non-empty string representation of this instance for logging and debugging purposes.
(Overrides ObjectToString)
Top
Remarks

The real state of an account's rate limit changes over time and as more requests are made to the API. So a RateLimit object, which is a snapshot, is best checked soon after it is received. It is accessible through the metadata that is included with each API Response and with each RequestFailureException.

Thread Safety
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
See Also