Breaking Changes in v2.0
Client-Based Architecture
All Query functions now require a *Client instance as the first parameter.
Before (v1):
import "github.com/kkjdaniel/gogeek/thing"
games, err := thing.Query([]int{13, 12, 3})
After (v2):
import "github.com/kkjdaniel/gogeek/v2/thing"
client := gogeek.NewClient()
games, err := thing.Query(client, []int{13, 12, 3})
Migration Steps:
- Update import paths from github.com/kkjdaniel/gogeek to github.com/kkjdaniel/gogeek/v2
- Create a client instance with client := gogeek.NewClient()
- Pass the client as the first parameter to all Query functions
Authentication Support:
// With API key
client := gogeek.NewClient(gogeek.WithAPIKey("your-key"))
// With cookie
client := gogeek.NewClient(gogeek.WithCookie("cookie-string"))