RateLimitService class

Rate limit service — manages policy limits and rate tracking.

Constructors

RateLimitService({String? apiKey, String? oauthToken, required String baseUrl, required String cacheDir})

Properties

apiKey String?
final
baseUrl String
final
cacheDir String
final
hashCode int
The hash code for this object.
no setterinherited
isLoaded bool
Whether policies have been loaded.
no setter
lastFetch DateTime?
Last fetch timestamp.
no setter
oauthToken String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isPolicyAllowed(String policy) bool
Whether a policy is allowed. Defaults to true if unknown.
loadPolicies() Future<void>
Load policy limits (from cache first, then remote).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh() Future<void>
Force refresh from remote.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited