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: 18 days 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 (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-27T20:24:26.000Z (10 months ago)
- Last Synced: 2024-10-14T15:35:07.296Z (28 days 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
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!