Implement UniFi v3 support, resolves #5

Voilà, I hope things are ok, here is v3 support, including sample scripts (actually it's only about the 2 optional parameters required for v3)

Commit 1 contains the library changes, while 2 updates the sample scripts.