Skip to main content

unifi/
api.rs

1//! Path/URL builders for the two UniFi controller APIs this crate speaks.
2
3pub mod internal;
4pub mod official;
5pub mod path;
6
7/// Which controller API a [`crate::capabilities::Capability`] is served from.
8///
9/// `#[non_exhaustive]`: callers only ever read this (via a capability's
10/// [`source`](crate::capabilities::Capability::source) field or a `match`),
11/// never construct it — a future 4th source family should not be a
12/// downstream semver break.
13#[derive(Debug, Clone, Copy, PartialEq, Eq)]
14#[non_exhaustive]
15pub enum ApiSourceFamily {
16    /// UniFi's documented `/proxy/network/integration` REST API.
17    Official,
18    /// The controller's own internal (undocumented, but stable) web-UI API.
19    Internal,
20    /// Resolves to [`Official`](Self::Official) or [`Internal`](Self::Internal)
21    /// at call time — see [`crate::actions::hybrid`].
22    Hybrid,
23}