ryanlower / go-circleci

Go client for the CircleCI API

Home Page:https://circleci.com/docs/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-circleci

go-circleci is a Go client for the CircleCI REST API

Circle CI

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 :)

Usage

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")

Roadmap

  • 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 :(

About

Go client for the CircleCI API

https://circleci.com/docs/api

License:MIT License


Languages

Language:Go 100.0%