carbon_aware_sdk 1.0.0+1 copy "carbon_aware_sdk: ^1.0.0+1" to clipboard
carbon_aware_sdk: ^1.0.0+1 copied to clipboard

A generated Dart SDK for the Carbon Aware SDK, from the Green Software Foundation.

example/example.dart

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);
}
0
likes
110
pub points
0%
popularity

Publisher

verified publishermarkvideon.dev

A generated Dart SDK for the Carbon Aware SDK, from the Green Software Foundation.

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http, intl, meta

More

Packages that depend on carbon_aware_sdk