Documentation
¶
Overview ¶
Package reuters is the library behind the reuters command: the HTTP client, feed URL resolution, and RSS parsing for Reuters news.
The client fetches RSS feeds from the public Reuters agency endpoint at https://www.reutersagency.com. No authentication is required. It sets a real User-Agent, paces requests, and retries transient 429/5xx errors with exponential backoff.
Index ¶
Constants ¶
View Source
const DefaultUserAgent = "reuters/dev (+https://github.com/tamnd/reuters-cli)"
DefaultUserAgent identifies the client to Reuters.
Variables ¶
View Source
var ErrUnknownSection = errors.New("unknown section")
ErrUnknownSection is returned when an unknown section name is requested.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client fetches Reuters RSS feeds.
type Config ¶
type Config struct {
BaseURL string
UserAgent string
Rate time.Duration
Retries int
Timeout time.Duration
}
Config holds constructor parameters.
Click to show internal directories.
Click to hide internal directories.