| Crates.io | rust_c02_signal |
| lib.rs | rust_c02_signal |
| version | 0.1.2 |
| created_at | 2023-02-07 10:24:01.202815+00 |
| updated_at | 2023-02-07 10:38:58.221124+00 |
| description | Rust implementation of the C02 Signal API - Very basic atm |
| homepage | |
| repository | https://github.com/Threpio/rust_c02Signal |
| max_upload_size | |
| id | 778650 |
| size | 32,965 |
DONE:
TODO:
Rate Limitation
Support of future Electricity Maps commercial API
Example:
use rust_c02_signal;
async fn do_stuff() -> () {
let c02client = rust_c02_signal::Client::new("API-KEY".to_string());
// Get the latest data for a country code
let resp = c02client.latest_cc("GB".to_string()).await;
println!("{:?}", resp);
// Get the latest data for a set of long/lat coords
let resp = c02client.latest_gc(51.5074, 0.1278).await;
println!("{:?}", resp);
}