carbon_aware_sdk 1.0.0+1 carbon_aware_sdk: ^1.0.0+1 copied to clipboard
A generated Dart SDK for the Carbon Aware SDK, from the Green Software Foundation.
import '../test/_setup.dart';
import 'package:carbon_aware_sdk/carbon_aware_sdk.dart';
void main() async {
final instance = CarbonAwareApi(ApiClient(
basePath: credentials['basePath'],
authentication: HttpBasicAuth(
username: credentials['username'],
password: credentials['password'])));
final estimatedWorkloadMins = 10;
final result = await instance.batchForecastDataAsync(
emissionsForecastBatchParametersDTO: locations
.map((e) => EmissionsForecastBatchParametersDTO(
requestedAt: DateTime.now(),
location: e,
// dataStartAt: now,
windowSize: estimatedWorkloadMins))
.toList(growable: false));
print(result);
}