go-circleci is a Go client for the CircleCI REST API
This is WIP. Currently only the GET /me
& GET /project/:username/:reponame
endpoints are supported. I'll fill in other endpoints, and generally clean up this client (see Roadmap) over time. Or, you could open a PR and help :)
Create a new client using your API token. If you don't have one already, you can create one from the CircleCI dashboard.
import circleci "github.com/ryanlower/go-circleci"
client := NewClient("your_api_token")
You can then call the supported API methods
// Get authenticated user
user := client.Me()
// Get recent builds for ryanlower/go-circleci
builds := client.RecentBuilds("ryanlower", "go-circleci")
- Support more API endpoints, starting with projects and their builds (to make this client actually useful!)
- Better error handling. Too often this package just logs errors :(