Skip to content

twistedfall/solaredge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solaredge

Build Status Documentation Crates.io Maintenance

Support the project | Documentation

Usage

Run:

cargo add solaredge

Or add to your Cargo.toml:

[dependencies]
solaredge = "0.5.4"

Asynchronous SolarEdge API client for Rust

Enables access to 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:

use solaredge::{Client, SitesList, SortOrder, SiteStatus};
use http_adapter_reqwest::ReqwestAdapter;

async fn run() -> Result<(), Box<dyn std::error::Error>> {
   let client = Client::<ReqwestAdapter>::new("API_KEY");
   let version = client.version_current().await?;
   let mut p = SitesList::default();
   p.size = Some(32);
   p.sort_order = Some(SortOrder::Ascending);
   p.status = Some(&[SiteStatus::Active, SiteStatus::Pending]);
   let sites = client.sites_list(&p).await?;
   Ok(())
}

License

LGPL-3.0

About

SolarEdge API client for Rust

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •