create method
Mint a delegated token. token is shown ONCE.
Implementation
Future<Map<String, dynamic>> create({
required String name,
int? expiresInMinutes,
int? maxUses,
List<String>? scopes,
}) async {
return (await _http.request(
'POST',
'/api-tokens',
body: {
'name': name,
if (expiresInMinutes != null) 'expires_in_minutes': expiresInMinutes,
if (maxUses != null) 'max_uses': maxUses,
if (scopes != null) 'scopes': scopes,
},
)) as Map<String, dynamic>;
}