This project implements a Go client library for the Basecamp API
Run
go get github.com/toggl/go-basecamp
Example usage:
package main
import (
"github.com/toggl/go-basecamp"
"log"
)
func main() {
var (
err error
accounts []*basecamp.Account
projects []*basecamp.Project
people []*basecamp.Person
)
c := basecamp.Client{AccessToken: "<PUT YOUR AUTH TOKEN HERE>"}
if accounts, err = c.GetAccounts(); err != nil {
log.Printf("ERROR %q", err)
return
}
if projects, err = c.GetProjects(accounts[0].Id); err != nil {
log.Printf("ERROR %q", err)
return
}
if people, err = c.GetPeople(accounts[0].Id); err != nil {
log.Printf("ERROR %q", err)
return
}
log.Println(projects)
log.Println(people)
}