OAuthTokens.fromJson constructor
OAuthTokens.fromJson(
- Map<String, dynamic> json
)
Implementation
factory OAuthTokens.fromJson(Map<String, dynamic> json) {
return OAuthTokens(
accessToken: json['accessToken'] as String,
refreshToken: json['refreshToken'] as String?,
expiresAt: json['expiresAt'] as int?,
scopes:
(json['scopes'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
const ['user:inference'],
subscriptionType: json['subscriptionType'] as String?,
rateLimitTier: json['rateLimitTier'] as String?,
);
}