RateLimitingWindow<User> class
A representation of the abstract "rate-limiting window" in which a user is accessing some API or endpoint.
Constructors
- RateLimitingWindow(User user, DateTime startTime, int pointsConsumed, {int? pointLimit, int? remainingPoints, DateTime? resetTime})
-
RateLimitingWindow.fromJson(Map<
String, dynamic> map) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- pointLimit ↔ int?
-
The maximum amount of points allowed within a single window.
getter/setter pair
- pointsConsumed ↔ int
-
The number of points the user has already consumed within
the current window.
getter/setter pair
- remainingPoints ↔ int?
-
The amount of points the user can consume before hitting the
rate limit for the current window.
getter/setter pair
- resetTime ↔ DateTime?
-
The time at which the window will reset.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime ↔ DateTime
-
The time at which the user's current window began.
getter/setter pair
- user ↔ User
-
The user who is accessing the endpoint.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited