Versions in this module Expand all Collapse all v0 v0.1.0 Jul 10, 2026 Changes in this version + const DefaultBaseURL + const DefaultUserAgent + type Client struct + BaseURL string + HTTPClient *http.Client + UserAgent string + func New(opts ...Option) *Client + func (c *Client) BestStories(ctx context.Context) ([]int, error) + func (c *Client) Item(ctx context.Context, id int) (*Item, error) + func (c *Client) NewStories(ctx context.Context) ([]int, error) + func (c *Client) Stories(ctx context.Context, kind StoryKind, limit int) ([]Item, error) + func (c *Client) TopStories(ctx context.Context) ([]int, error) + type Item struct + By string + Dead bool + Deleted bool + Descendants int + ID int + Kids []int + Score int + Text string + Time int64 + Title string + Type string + URL string + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithUserAgent(ua string) Option + type StoryKind string + const Best + const Newest + const Top