Skip to content

2.0.0

Latest

Choose a tag to compare

@kkjdaniel kkjdaniel released this 04 Nov 01:38
· 1 commit to main since this release

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:

  1. Update import paths from github.com/kkjdaniel/gogeek to github.com/kkjdaniel/gogeek/v2
  2. Create a client instance with client := gogeek.NewClient()
  3. 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"))