From 71f2c748f11fcaad5e58bc219c28137ac586df65 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 14 Aug 2019 15:14:47 -0400 Subject: [PATCH] Add point info to window --- lib/src/rate_limiting_window.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/src/rate_limiting_window.dart b/lib/src/rate_limiting_window.dart index 37cc7cbc..234c3ae1 100644 --- a/lib/src/rate_limiting_window.dart +++ b/lib/src/rate_limiting_window.dart @@ -11,5 +11,16 @@ class RateLimitingWindow { /// the current window. 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}); }