Expand description

A client library for the Octopus Energy API.

Usage

To login and fetch account information:

use octopower::{authenticate, get_account};

let token = authenticate("email@address.example", "password").await?;
let account = get_account(&token, "A-1234ABCD").await?;
println!("Account information: {:?}", account);

Modules

Types used for the results of API calls.

Structs

A JWT token used for authenticated API requests.

Enums

An error communicating with the Octopus API.

The level of aggregation with which to group electricity or gas consumption records.

The type of meter, either electricity or gas.

Functions

Authenticate to the Octopus API using the given email address and password, returning an authentication token which can be used for subsequent authenticated requests.

Fetch information about the given account from the Octopus REST API.

Fetch electricity or gas consumption records from the meter with the given mpxn (MPAN or MPRN) and serial.