Add point info to window

This commit is contained in:
Tobe O 2019-08-14 15:14:47 -04:00
parent ef993eced3
commit 71f2c748f1

View file

@ -11,5 +11,16 @@ class RateLimitingWindow<User> {
/// the current window. /// the current window.
final int requestCount; final int requestCount;
RateLimitingWindow(this.user, this.start, this.requestCount); /// The maximum amount of points allowed within a single window.
final int pointLimit;
/// The amount of points the user can consume before hitting the
/// rate limit for the current window.
final int remainingPoints;
/// The time at which the window will reset.
final DateTime resetsAt;
RateLimitingWindow(this.user, this.start, this.requestCount,
{this.pointLimit, this.remainingPoints, this.resetsAt});
} }