Hackeroni

A Go API client for HackerOne (api.hackerone.com)
Alternatives To Hackeroni
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Td Ameritrade Python Api6263a year ago15March 18, 202142mitPython
Unofficial Python API client library for TD Ameritrade. This library allows for easy access of the Standard API and allows users to build data pipelines for the Streaming API.
Graphql.js4254831263 days ago43October 19, 202213mitTypeScript
GitHub GraphQL API client for browsers and Node
Twitch4j35148 days ago18September 18, 202213mitJava
Modular Async/Sync/Reactive Twitch API Client / IRC Client
Presto Python Client22422419 days ago13August 05, 202144apache-2.0Python
Python DB-API client for Presto
Http Request Action206
14 days ago1mitJavaScript
Create HTTP Requests in GitHub Actions
Authy Python190
31a year ago19April 15, 2020mitPython
Authy API Client for Python
Golang Jenkins113213 years agoJune 05, 202110mitGo
API client of Jenkins API written in Go
Pixiv Api Client112773 years ago29February 11, 20215mitJavaScript
Promise based Pixiv API client for node.js and react native
Strava108
93 years ago13September 23, 20198mitPHP
PHP Class for the Strava API (v3)
Httpie Oauth88
2 years ago3September 24, 20135otherPython
OAuth plugin for HTTPie
Alternatives To Hackeroni
Select To Compare


Alternative Project Comparisons
Readme

hackeroni GoDoc Build Status Coverage Status

A Go interface around api.hackerone.com.

Usage

import "github.com/uber-go/hackeroni/h1"

To list all reports matching a filter:

reports, _, err := client.Report.List(h1.ReportListFilter{
	Program: []string{"uber"},
})
if err != nil {
	panic(err)
}
for _, report := range reports {
	fmt.Println("Report Title:", *report.Title)
}

To retrieve a specific report:

report, _, err := client.Report.Get("123456")
if err != nil {
	panic(err)
}
fmt.Println("Report Title:", *report.Title)

Authentication

The h1 library does not directly handle authentication. Instead, when creating a new client, you can pass a http.Client that handles authentication for you. It does provide a APIAuthTransport structure when using API Token authentication. It is used like this:

tp := h1.APIAuthTransport{
	APIIdentifier: "your-h1-api-token-identifier",
	APIToken: "big-long-api-token-from-h1",
}

client := h1.NewClient(tp.Client())

Pagination

All requests for listing resources such as Report support pagination. Pagination options are described in the h1.ListOptions struct and passed to the list methods as an optional parameter. Pages information is available via the h1.ResponseLinks struct embedded in the h1.Response struct.

filter := h1.ReportListFilter{
	Program: []string{"uber"},
}
var listOpts h1.ListOptions

var allReports []h1.Report
for {
	reports, resp, err := client.Report.List(filter, &listOpts)
	if err != nil {
		panic(err)
	}
	allReports = append(allReports, reports...)
	if resp.Links.Next == "" {
		break
	}
	listOpts.Page = resp.Links.NextPageNumber()
}
Popular Api Client Projects
Popular Authentication Projects
Popular Application Programming Interfaces Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Go
Authentication
Struct
Api Client
Pagination