https://github.com/loadsmart/go-coveralls-api
Client for Coveralls.io API written in Go
https://github.com/loadsmart/go-coveralls-api
coveralls-api golang
Last synced: about 1 year ago
JSON representation
Client for Coveralls.io API written in Go
- Host: GitHub
- URL: https://github.com/loadsmart/go-coveralls-api
- Owner: loadsmart
- License: mit
- Created: 2020-01-27T16:45:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T15:41:12.000Z (over 1 year ago)
- Last Synced: 2025-03-28T10:47:32.625Z (about 1 year ago)
- Topics: coveralls-api, golang
- Language: Go
- Homepage: https://godoc.org/github.com/loadsmart/go-coveralls-api
- Size: 28.3 KB
- Stars: 3
- Watchers: 57
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# go-coveralls-api
[](https://coveralls.io/github/loadsmart/go-coveralls-api?branch=master)
[](https://godoc.org/github.com/loadsmart/go-coveralls-api)
Client for [Coveralls API][] written in Go.
**Note**: the goal is to interact with administrative Coveralls API. To send coverage data, take a look at [goveralls][] project.
## Installation
Just follow the usual instructions for Go libraries:
```bash
go get github.com/loadsmart/go-coveralls-api
```
`go-coveralls-api` uses Go Modules and therefore requires Go 1.11+.
## Usage
To get the ID of a repo already configured in Coveralls
```go
import (
"context"
"fmt"
"log"
"github.com/loadsmart/go-coveralls-api"
)
client := coveralls.NewClient("your-personal-access-token")
repository, err := client.Repositories.Get(context.Background(), "github", "user/repository")
if err != nil {
log.Fatalf("Error querying Coveralls API: %s\n", err)
}
fmt.Printf("Project has ID %d in Coveralls", repository.ID)
```
Replace `your-personal-access-token` with your personal access token (can be found in your Coveralls account page).
## License
This work is copyrighted to Loadsmart, Inc. and licensed under MIT. For details see [LICENSE][] file.
[Coveralls API]: https://docs.coveralls.io/api-introduction
[goveralls]: https://github.com/mattn/goveralls
[LICENSE]: ./LICENSE