RateLimit class

Annotations
  • @freezed

Constructors

RateLimit({@JsonKey(name: 'x-rate-limit-limit') required int limitCount, @JsonKey(name: 'x-rate-limit-remaining') required int remainingCount, @JsonKey(name: 'x-rate-limit-reset') required DateTime resetAt})
const
factory
RateLimit.fromJson(Map<String, Object?> json)
factory

Properties

copyWith → $RateLimitCopyWith<RateLimit>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isExceeded bool
Returns true if the rate limit is exceeded, otherwise false.
no setter
isNotExceeded bool
Returns true if the rate limit is not exceeded, otherwise false.
no setter
limitCount int
The maximum number of calls allowed.
no setterinherited
remainingCount int
The number of remaining calls allowed.
no setterinherited
resetAt DateTime
The date time when the remaining number of calls will be reset.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

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