octopower

Crates.iooctopower
lib.rsoctopower
version0.2.0
sourcesrc
created_at2022-01-11 20:35:17.72042
updated_at2022-07-19 19:38:40.016231
descriptionA client library for the Octopus Energy API.
homepage
repositoryhttps://github.com/qwandor/octopower
max_upload_size
id512438
size296,126
Andrew Walbran (qwandor)

documentation

README

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.

Commit count: 191

cargo fmt