Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 555 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 555 Bytes

hn

Go Reference

Package hn provides a client wrapping requests to the hackernews firebase API.

Installation

go get github.com/pkuca/hn

Basic Usage

client := hn.NewClient(nil)
topStories, _ := client.TopStories()

Custom Client

httpClient := &http.Client{
    Timeout: time.Second * 20,
}

hnClient := hn.NewClient(httpClient)
topStories, _ := hnClient.TopStories()