Documentation
¶
Overview ¶
Package producthunt is the library behind the ph command: the HTTP client, request shaping, and the typed data models for Product Hunt.
Data source: the public Atom feed at https://www.producthunt.com/feed. No authentication or API key is required.
Index ¶
Constants ¶
View Source
const DefaultUserAgent = "ph/dev (+https://github.com/tamnd/producthunt-cli)"
DefaultUserAgent identifies the client to Product Hunt.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to Product Hunt over HTTP.
type Config ¶
type Config struct {
BaseURL string
UserAgent string
Rate time.Duration
Retries int
Timeout time.Duration
}
Config holds constructor parameters for Client.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns sensible defaults: no rate limiting (one request per command), two retries on transient errors, and a 30-second timeout.
Click to show internal directories.
Click to hide internal directories.