To install the Go Client for Eventbrite API, please execute the following go get
command.
go get github.com/apzuk3/go-eventbrite
View the reference documentation
package main
import (
"fmt"
"time"
"github.com/apzuk3/go-eventbrite"
"golang.org/x/net/context"
)
func main() {
clnt, _ := eventbrite.NewClient(
eventbrite.WithToken(YOUR_TOKEN),
eventbrite.WithRateLimit(10), // max requests rate per second
)
clnt.UserSetAssortments(context.Background(), "me", &eventbrite.UserSetAssortmentRequest{
Plan: "package1",
})
res, _ := clnt.EventCreate(context.Background(), &eventbrite.EventCreateRequest{
NameHtml: "Party!",
DescriptionHtml: "Let's party tonight!",
StartUtc: eventbrite.DateTime{
Time: time.Now().AddDate(0,0,1),
},
StartTimezone: "Europe/London",
EndUtc: eventbrite.DateTime{
Time: time.Now().AddDate(0,0,3),
},
EndTimezone: "Europe/London",
Currency: "GBP",
})
fmt.Printf("%+v", res)
}
Whoops, don't forget
if err != nil {
// handle me
}
Feel free to report or pull-request any bug at https://github.com/apzuk/go-eventbrite.
The library is available as open source under the terms of the MIT License.