Crates.io | octopower |
lib.rs | octopower |
version | 0.2.0 |
source | src |
created_at | 2022-01-11 20:35:17.72042 |
updated_at | 2022-07-19 19:38:40.016231 |
description | A client library for the Octopus Energy API. |
homepage | |
repository | https://github.com/qwandor/octopower |
max_upload_size | |
id | 512438 |
size | 296,126 |
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.
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);
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
Licensed under either of
at your option.
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.