ApiKeyStatus class

Contains details associated with the given apiKey.

The API docs call this ApiTokenStatus, but never refer to the API Key as an "API token" anywhere else.

Annotations

Constructors

ApiKeyStatus({Duration expiresIn, int remainingCalls, Duration resetsIn, String apiKey, int totalRequests, bool valid})
Constructs a new ApiKeyStatus.
ApiKeyStatus.fromJson(Map<String, dynamic> json)
Constructs a new ApiKeyStatus from a JSON map.
factory

Properties

apiKey String
The apiKey these stats are associated with.
@JsonKey(name: 'token'), final
expiresIn Duration
The amount of time left until the apiKey expires.
@JsonKey(name: 'expiresInMillis', fromJson: _durationFromMilliseconds, toJson: _durationToMilliseconds), final
hashCode int
The hash code for this object. [...]
read-only, inherited
remainingCalls int
The number of API calls remaining before the next reset.
final
resetsIn Duration
The amount of time left until the API call counts reset.
@JsonKey(name: 'resetsInMillis', fromJson: _durationFromMilliseconds, toJson: _durationToMilliseconds), final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
totalRequests int
The number of API requests made since the last reset.
final
valid bool
Whether the apiKey is valid. [...]
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Returns this object as a JSON map.
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited