An unauthorized, and not guaranteed to work for you, implementation of the Sailthru API in Go. Not all methods are currently implemented; they will be added as we need them. Pull requests welcomed.
Sailthru Template docs
client := sailthru.NewClient(key, secret)
vars := map[string]string{"name": "Bob", "welcome": "Hello!"}
params := ¶ms.Send{
Email: "you@example.org",
Template: "A-Template",
Vars: vars,
}
res, err := client.Send(params)
You can also set a schedule time;
params.ScheduleTime = &ScheduleTime{
StartTime: "Tue, 27 Jul 2010 12:10:00 -0400",
EndTime: "Tue, 28 Jul 2010 12:10:00 -0400", //Optional
}
Sailthru Update Job docs
client := sailthru.NewClient(key, secret)
params := ¶ms.UpdateJob{
PostbackURL: "http://example.org/webhooks",
ReportEmail: "you@example.org",
IncludeSignupDate: true,
URL: "https://some-bucket.s3.amazonaws.com/path/to/file1.json",
}
res, err := client.ProcessUpdateJob(params)