2 unstable releases

0.2.0 Jul 19, 2022
0.1.0 Jan 11, 2022

#3 in #octopus


Used in octo-influx

MIT/Apache

265KB
8K SLoC

GraphQL 8K SLoC Rust 240 SLoC // 0.0% comments

octopower

crates.io page docs.rs page

octopower is a client library for a subset of the Octopus Energy API. This also works for Octopus resellers such as London Power.

This is not an officially supported Google product.

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);

Example

For a more complete usage sample, see the included example. To run it you'll need your email address, password and account ID. Your account ID should be something like "A-1234ABCD".

$ cargo run --example readings email@address.domain mypassword A-1234ABCD

License

Licensed under either of

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

If you want to contribute to the project, see details of how we accept contributions.

Dependencies

~6–20MB
~308K SLoC