ApiClient constructor

ApiClient({
  1. required AuthManager authManager,
  2. required String projectId,
})

Implementation

ApiClient({required this.authManager, required this.projectId})
  : serverUrl = Platform.environment['OPENCI_SERVER_URL'] ?? '' {
  if (serverUrl.isEmpty) {
    throw StateError('OPENCI_SERVER_URL environment variable is required.');
  }
  _chopperClient = createChopperClient(
    baseUrl: serverUrl,
    authManager: authManager,
  );
  _apiService = _chopperClient.getService<OpenCiApiService>();
}