Split the Stat piece of each device's struct out to a hidden struct that is exported by another struct. Not too complicated, but it allows unmarshaling the data from either controller format into the same structure we've always had. Closes https://github.com/davidnewhall/unifi-poller/issues/47
Support for the new controller format doesn't change any interfaces, but the Server() interface was deliberately augmented. It now purposely returns an unexported type. It will be removed in a future version of this library since the controller version is now stored in the returned Unifi structure.
It's a little easier to look at without white space changes. The build failing is okay. It's failing two lint checks. One of which is a bug in the linter (report opened) and the other refers to the Server changes mentioned above that will be removed later.
TODO:
Figure out changes in Sites api. Reports that only default site is located.
Split the
Stat
piece of each device's struct out to a hidden struct that is exported by another struct. Not too complicated, but it allows unmarshaling the data from either controller format into the same structure we've always had. Closes https://github.com/davidnewhall/unifi-poller/issues/47Support for the new controller format doesn't change any interfaces, but the
Server()
interface was deliberately augmented. It now purposely returns an unexported type. It will be removed in a future version of this library since the controller version is now stored in the returnedUnifi
structure.It's a little easier to look at without white space changes. The build failing is okay. It's failing two lint checks. One of which is a bug in the linter (report opened) and the other refers to the
Server
changes mentioned above that will be removed later.TODO:
Sites
api. Reports that onlydefault
site is located.