https://github.com/euank/go-buildkite
A Go library for the Buildkite API
https://github.com/euank/go-buildkite
Last synced: 5 months ago
JSON representation
A Go library for the Buildkite API
- Host: GitHub
- URL: https://github.com/euank/go-buildkite
- Owner: euank
- License: bsd-2-clause
- Fork: true (buildkite/go-buildkite)
- Created: 2018-03-25T04:01:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-25T05:52:41.000Z (about 8 years ago)
- Last Synced: 2024-06-20T03:39:36.593Z (about 2 years ago)
- Language: Go
- Homepage: https://github.com/buildkite/go-buildkite
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# buildkite-go [](http://godoc.org/github.com/buildkite/go-buildkite) [](https://buildkite.com/buildkite/buildkite-golang-client)
A [Go](http://golang.org) library and client for the [Buildkite API](https://buildkite.com/docs/api). This project draws a lot of it's structure and testing methods from [go-github](https://github.com/google/go-github).
# Usage
To get the package, execute:
```
go get github.com/buildkite/go-buildkite/buildkite
```
Simple shortened example for listing all pipelines is provided below, see examples for more.
```go
import (
"github.com/buildkite/go-buildkite/buildkite"
)
...
config, err := buildkite.NewTokenConfig(*apiToken)
if err != nil {
log.Fatalf("client config failed: %s", err)
}
client := buildkite.NewClient(config.Client())
pipelines, _, err := client.Pipelines.List(*org, nil)
```
Note: not everything in the API is present here just yet—if you need something please make an issue or submit a pull request.
# License
This library is distributed under the BSD-style license found in the LICENSE file.