2 unstable releases
0.2.0 | Jul 19, 2022 |
---|---|
0.1.0 | Jan 11, 2022 |
#3 in #octopus
Used in octo-influx
265KB
8K
SLoC
octopower
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–18MB
~287K SLoC