Documentation
¶
Overview ¶
Package gohn implements a client for the Hacker News REST API from firebaseio
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Items ItemService
Users UserService
}
Client exposes the different services for the HackerNews api
type Item ¶
type Item struct {
ID int `json:"id"`
Deleted bool `json:"deleted"`
Type string `json:"type"`
By string `json:"by"`
Time encodedTime.Unix `json:"time"`
Text string `json:"text"`
Dead bool `json:"dead"`
Parent int `json:"parent"`
Kids []int `json:"kids"`
URL string `json:"url"`
Score int `json:"score"`
Title string `json:"title"`
Parts []int `json:"parts"`
}
Item represents a Story, Comments, Job, 'Ask HN' or a Poll see https://github.com/HackerNews/API#items for more
type ItemService ¶
type ItemService interface {
TopStoryIDs() ([]int, error)
TopStories() ([]*Item, error)
MaxItemID() (int, error)
Item(int) (*Item, error)
}
ItemService has all methods that the firebase api exposes for items
type User ¶
type User struct {
About string `json:"about"`
Created encodedTime.Unix `json:"created"`
Delay int `json:"delay"`
ID string `json:"id"`
Karma int `json:"karma"`
Submitted []int `json:"submitted"`
}
User is a user of HN see https://github.com/HackerNews/API#users for more
type UserService ¶
UserService has all methods that the firebase api exposes for users
Click to show internal directories.
Click to hide internal directories.