Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jszwedko/go-circleci
Go library for interacting with CircleCI
https://github.com/jszwedko/go-circleci
Last synced: about 2 months ago
JSON representation
Go library for interacting with CircleCI
- Host: GitHub
- URL: https://github.com/jszwedko/go-circleci
- Owner: jszwedko
- License: mit
- Created: 2015-08-14T21:19:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-27T20:24:26.000Z (11 months ago)
- Last Synced: 2024-10-25T05:25:15.295Z (about 2 months ago)
- Language: Go
- Size: 80.1 KB
- Stars: 65
- Watchers: 5
- Forks: 50
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - circleci - Go client library for interacting with CircleCI's API. (Third-party APIs / Utility/Miscellaneous)
- awesome-go - go-circleci - Go library for interacting with CircleCI - ★ 32 (Third-party APIs)
- awesome-go-extra - go-circleci - 08-14T21:19:36Z|2019-11-21T00:02:51Z| (Third-party APIs / Fail injection)
README
## go-circleci
[![GoDoc](https://godoc.org/github.com/jszwedko/go-circleci?status.svg)](http://godoc.org/github.com/jszwedko/go-circleci)
[![Circle CI](https://circleci.com/gh/jszwedko/go-circleci.svg?style=svg)](https://circleci.com/gh/jszwedko/go-circleci)
[![Go Report Card](https://goreportcard.com/badge/github.com/jszwedko/go-circleci)](https://goreportcard.com/report/github.com/jszwedko/go-circleci)
[![coverage](https://gocover.io/_badge/github.com/jszwedko/go-circleci?0 "coverage")](http://gocover.io/github.com/jszwedko/go-circleci)Go library for interacting with [CircleCI's API](https://circleci.com/docs/api). Supports all current API endpoints allowing you do do things like:
* Query for recent builds
* Get build details
* Retry builds
* Manipulate checkout keys, environment variables, and other settings for a project**The CircleCI HTTP API response schemas are not well documented so please file an issue if you run into something that doesn't match up.**
Example usage:
```golang
package mainimport (
"fmt""github.com/jszwedko/go-circleci"
)func main() {
client := &circleci.Client{Token: "YOUR TOKEN"} // Token not required to query info for public projectsbuilds, _ := client.ListRecentBuildsForProject("jszwedko", "circleci-cli", "master", "", -1, 0)
for _, build := range builds {
fmt.Printf("%d: %s\n", build.BuildNum, build.Status)
}
}
```For the CLI that uses this library (or to see more example usages), please see
[circleci-cli](https://github.com/jszwedko/circleci-cli).See [GoDoc](http://godoc.org/github.com/jszwedko/go-circleci) for API usage.
Feature requests and issues welcome!