type strings and fix readme.

This commit is contained in:
David Newhall II 2019-01-26 04:29:16 -08:00
parent 94bc27fd28
commit a6afe62ff2
2 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ func main() {
username := "admin"
password := "superSecret1234"
URL := "https://127.0.0.1:8443/"
uni, err := unifi.AuthController(username, password, URL, false)
uni, err := unifi.GetController(username, password, URL, false)
if err != nil {
log.Fatalln("Error:", err)
}

View File

@ -13,15 +13,15 @@ import (
const (
// ClientPath is Unifi Clients API Path
ClientPath = "/api/s/default/stat/sta"
ClientPath string = "/api/s/default/stat/sta"
// DevicePath is where we get data about Unifi devices.
DevicePath = "/api/s/default/stat/device"
DevicePath string = "/api/s/default/stat/device"
// NetworkPath contains network-configuration data. Not really graphable.
NetworkPath = "/api/s/default/rest/networkconf"
NetworkPath string = "/api/s/default/rest/networkconf"
// UserGroupPath contains usergroup configurations.
UserGroupPath = "/api/s/default/rest/usergroup"
UserGroupPath string = "/api/s/default/rest/usergroup"
// LoginPath is Unifi Controller Login API Path
LoginPath = "/api/login"
LoginPath string = "/api/login"
)
// Logger is a base type to deal with changing log outputs.