Go client library for SeatGeek's Sixpack AB testing framework.
Go
Latest commit 4378c70 Sep 2, 2013 @subosito add notes
Permalink
Failed to load latest commit information.
sixpack
.gitignore
LICENSE
README.md

README.md

sixpack-go

Build Status

Go client library for SeatGeek's Sixpack AB testing framework.

Usage

Here's the basic example:

// import "github.com/subosito/sixpack-go/sixpack"

session, err := sixpack.NewSession(sixpack.Options{})
if err != nil {
    t.Error(err)
}

// Participate in a test (create the test if necesssary)
res, err := session.Participate("new-test", []string{"alternative-1", "alternative-2"}, "")
if err == nil {
    fmt.Printf("%+v\n", res)
}

// Convert
rec, err := session.Convert("new-test")
if err == nil {
    fmt.Printf("%+v\n", rec)
}

Each session has a ClientID associates with it that must be preseved across requests.

Session initializes requires Options which you can use to customize the session.

// import "net/url"

opts := sixpack.Options{
    BaseUrl: url.Parse("http://sixpack.server.com"),
}

session := sixpack.NewSession(opts)

Notes

The sixpack-go package is tested using drone.io services. You can see the build script on https://gist.github.com/subosito/6412007.

What is Sixpack?

Sixpack is a language-agnostic AB testing framework. It makes easy to run A/B tests across multiple web services written in different languages.