getUserInfo method

Future<Map<String, dynamic>> getUserInfo()

Get user subscription info

Implementation

Future<Map<String, dynamic>> getUserInfo() async {
  if (config.apiKey.isEmpty) {
    throw const AuthError('Missing ElevenLabs API key');
  }

  try {
    return await client.getJson('user');
  } catch (e) {
    if (e is LLMError) rethrow;
    throw GenericError('Unexpected error: $e');
  }
}