Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/toggl/go-basecamp

This project implements a golang client library for the Basecamp API
https://github.com/toggl/go-basecamp

backend

Last synced: about 2 months ago
JSON representation

This project implements a golang client library for the Basecamp API

Awesome Lists containing this project

README

        

go-basecamp
=====
This project implements a [Go](http://golang.org) client library for the [Basecamp API](https://github.com/basecamp/bcx-api/)

Installing
----------
Run
```bash
go get github.com/toggl/go-basecamp
```

Example usage:
```go
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: ""}

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)
}
```