/hn

HTTP wrapper for hackernews firebase API

Primary LanguageGoMIT LicenseMIT

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()