https://github.com/robhurring/honeybadger
A basic honeybadger API mapping in go
https://github.com/robhurring/honeybadger
Last synced: 10 months ago
JSON representation
A basic honeybadger API mapping in go
- Host: GitHub
- URL: https://github.com/robhurring/honeybadger
- Owner: robhurring
- Created: 2015-03-20T00:43:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-09T18:56:53.000Z (about 11 years ago)
- Last Synced: 2024-04-13T19:19:38.972Z (over 2 years ago)
- Language: Go
- Size: 152 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
#@#@;`
'##@ #@###@,
+##'@###@+:. `
###@#@. A HoneyBadger API Client
@####+ (That _does_ give a F!@$%)
@###@
#### .+@@#;,...,:;:`
@### @@; `++,` `,'@@#:
#### +#. `'@@'
`###,+# ;@@@#####@@@@@@@@.
@####+ `.` '
`####:
####@ ;@@#
##### :@+. :@#`+##.
;####@` ;@` ;#@@##########@###;
.####;@@+` :@,.@#####################.
#####@'`,+@@@@@##;. :@#,:@########################
#########@@@@@@@@@#+#@@################@@@@@##@@#
@################################@+.
:#############################@,
@##########################@` +@
'#########@@##@@########### @##@
#######@ .########@ '#####
######@ @####@ ####### @#####`
@#####: ###### ######@ #######
@#####` ###### ;#####@ ,######
@#####: @#####. `######: ######@
@####@ @####@ +@##### `@#####:
```
# Honeybadger API Client
A small, lightweight honeybadger API mapping for Golang. This was mapped against the [V1 API](https://www.honeybadger.io/documentation/read_api), so YMMV.
## Installing
`go get github.com/robhurring/honeybadger`
## Example Usage
```go
package main
import (
"fmt"
"os"
"github.com/robhurring/honeybadger"
)
func main() {
// get your token on the https://app.honeybadger.io/users/edit page
token := os.Getenv("HONEYBADGER_API_TOKEN")
honeybadger := honeybadger.New(token)
params := honeybadger.Params{"page": "1"}
projects, err := honeybadger.Projects(params)
if err != nil {
panic(err)
}
fmt.Printf("You have %d projects in honeybadger!\n", len(projects.Results))
}
// HONEYBADGER_API_TOKEN= go run main.go
```
## To-Do
1. Implement pagination
## API Documentation
For more information about the API and returned data, you can view the api docs here: https://www.honeybadger.io/documentation/read_api
# Contributing
* Add your features, submit a pull-request.
* Check `rake filesizes` to make sure we aren't bloating assets