solaredge

Documentation

See full documentation

Usage

Add this to your Cargo.toml: [dependencies] solaredge = "0.3.0"

Asynchronous SolarEdge API client for Rust

Work in progress, only basic API is implemented so far. See todo markers in client.rs for the specific missing functions.

Enables access the SolarEdge equipment API (solar panels, inverters, meters) with the nice typed Rust interface.

The library requires an HTTP client, but is client-agnostic. You can use any client that implements HttpClientAdapter trait. Check http-adapter-reqwest for an implementation based on reqwest.

Sample usage with http-adapter-reqwest: ```rust use solaredge::{Client, SitesList, SortOrder, SiteStatus}; use httpadapterreqwest::ReqwestAdapter;

async fn run() -> Result<(), Box> { let client = Client::::new("APIKEY"); let version = client.versioncurrent().await?; let mut p = SitesList::default(); p.size = Some(32); p.sortorder = Some(SortOrder::Ascending); p.status = Some(&[SiteStatus::Active, SiteStatus::Pending]); let sites = client.siteslist(&p).await?; Ok(()) } ```

License: LGPL-3.0