Skip to main content

Crate unifi_protect_client

Crate unifi_protect_client 

Source
Expand description

§UniFi Protect Client

A Rust client library for interacting with the UniFi Protect API.

This crate provides a simple and type-safe way to interact with UniFi Protect cameras and other devices through the REST API.

§Features

  • Secure credential handling using the secrecy crate
  • Automatic authentication and session management
  • Type-safe API responses with serde deserialization
  • Support for camera management operations

§Quick Start

let client = UnifiProtectClient::new(
    "https://192.168.1.1",
    "username",
    "password"
);

// List all cameras
let cameras = client.list_cameras().await?;
println!("Found {} cameras", cameras.len());

Modules§

api
models

Structs§

UnifiProtectClient
Client for interacting with the UniFi Protect API.

Enums§

RequestError
Errors that can occur when making requests to the UniFi Protect API.