7 releases
0.2.1 | Jan 20, 2025 |
---|---|
0.2.0 | Jan 20, 2025 |
0.1.16 | Jan 19, 2025 |
#1726 in Network programming
518 downloads per month
Used in unifi-tui
32KB
737 lines
unifi-rs
A Rust client library for the UniFi Network API that enables programmatic monitoring and management of UniFi deployments.
Features
- List sites
- List devices
- Get device details
- Get device statistics
- Restart device
- List clients
- Get application information
Installation
Add this to your Cargo.toml
:
[dependencies]
unifi-rs = "0.1.13"
Quick Start
use unifi_rs::{UnifiClient, UnifiClientBuilder};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = UnifiClientBuilder::new("https://192.168.1.1/proxy/network/integrations")
.api_key("your-api-key")
.verify_ssl(false)
.build()?;
let sites = client.list_sites(None, None).await?;
println!("Sites: {:#?}", sites);
Ok(())
}
Dependencies
~8–20MB
~282K SLoC