test: add tests for Unifi client

This commit is contained in:
Mateusz Filipowicz
2025-02-09 01:14:45 +01:00
committed by Mateusz Filipowicz
parent f79f21c4ad
commit 685572d5ce
4 changed files with 511 additions and 15 deletions

View File

@@ -94,7 +94,7 @@ c, err := unifi.NewClient(&unifi.ClientConfig{
You can use interceptors to modify requests and responses. This gives you more control over the client behavior
and flexibility to add custom logic.
To use interceptor logic, you need to create a struct implementing [ClientInterceptor](https://pkg.go.dev/github.com/filipowm/go-unifi/unifi#ClientInterceptor). interface.
To use interceptor logic, you need to create a struct implementing [ClientInterceptor](https://pkg.go.dev/github.com/filipowm/go-unifi/unifi#ClientInterceptor) interface.
For example, you can use interceptors to log requests and responses:
```go