2026-02-16 15:21:37 +00:00
|
|
|
package unifi
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
uf "github.com/unpoller/unifi/v5"
|
|
|
|
|
|
2026-03-16 19:20:34 +00:00
|
|
|
log "forge.lthn.ai/core/go-log"
|
2026-02-16 15:21:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
}
|