octopus_energy_api_client 1.0.0 copy "octopus_energy_api_client: ^1.0.0" to clipboard
octopus_energy_api_client: ^1.0.0 copied to clipboard

A client for accessing the Octopus Energy API. Please note that Client for Octopus Energy API is unofficial and not endorsed by Octopus Energy.

example/octopus_energy_api_client_example.dart

// ignore_for_file: unused_local_variable

import 'package:octopus_energy_api_client/v1.dart';

Future<void> main() async {
  // Your Octopus Energy API key.
  final apiKey = 'sk_live_...';

  // Obtain an HTTP client that authenticates every request with your API key.
  final client = clientViaApiKey(apiKey);

  // Create the API client for the v1 API.
  final api = OctopusEnergyApiClient(client: client);

  // Call an endpoint.
  final account = await api.accounts.getAccount('A-1234ABCD');

  // Release the underlying HTTP resources when you are done.
  client.close();
}
0
likes
160
points
108
downloads

Documentation

API reference

Publisher

verified publisherthomasclark.dev

Weekly Downloads

A client for accessing the Octopus Energy API. Please note that Client for Octopus Energy API is unofficial and not endorsed by Octopus Energy.

Repository (GitHub)
View/report issues
Contributing

Topics

#api #client #http #http-client #rest

Funding

Consider supporting this project:

buymeacoffee.com
ko-fi.com

License

MIT (license)

Dependencies

http

More

Packages that depend on octopus_energy_api_client