UniFi API wrapper for device stats, network health, VLAN config, client tracking, and route management. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
17 lines
345 B
Go
17 lines
345 B
Go
package unifi
|
|
|
|
import (
|
|
uf "github.com/unpoller/unifi/v5"
|
|
|
|
"forge.lthn.ai/core/go/pkg/log"
|
|
)
|
|
|
|
// GetSites returns all sites from the UniFi controller.
|
|
func (c *Client) GetSites() ([]*uf.Site, error) {
|
|
sites, err := c.api.GetSites()
|
|
if err != nil {
|
|
return nil, log.E("unifi.GetSites", "failed to fetch sites", err)
|
|
}
|
|
|
|
return sites, nil
|
|
}
|