Versions in this module Expand all Collapse all v1 v1.0.0 Aug 21, 2026 Changes in this version + const Version + type APIError struct + Body string + Code string + Message string + RequestID string + RetryAfter time.Duration + StatusCode int + func (e *APIError) Error() string + type Article struct + Category Category + ID int64 + Image string + PublishedAt time.Time + ReadTime int + Summary string + Title string + URL string + type Attribution struct + Required bool + Text string + URL string + type AuthenticationError struct + func (e *AuthenticationError) Unwrap() error + type AuthorizationError struct + func (e *AuthorizationError) Unwrap() error + type Category struct + Name string + Slug string + type Client struct + News *NewsService + func New() *Client + func NewClient(config Config) (*Client, error) + type Collection string + const CollectionLatest + const CollectionToday + type Config struct + APIKey string + Application string + BaseURL string + DisableRetries bool + HTTPClient *http.Client + Headers http.Header + Retry RetryConfig + Timeout time.Duration + UserAgent string + Website string + type ConflictError struct + func (e *ConflictError) Unwrap() error + type Digest struct + APIVersion string + Articles []Article + Attribution Attribution + Collection Collection + Date string + Direction string + GeneratedAt time.Time + Links map[string]string + Locale Locale + Publisher LinkLabel + Timezone string + type LinkLabel struct + Name string + URL string + type Locale string + const LocaleArabic + const LocaleEnglish + type NetworkError struct + Err error + func (e *NetworkError) Error() string + func (e *NetworkError) Unwrap() error + type NewsListParams struct + Category string + Limit int + Locale Locale + type NewsService struct + func (s *NewsService) Latest(ctx context.Context, params *NewsListParams) (*Digest, error) + func (s *NewsService) Today(ctx context.Context, params *NewsListParams) (*Digest, error) + type NotFoundError struct + func (e *NotFoundError) Unwrap() error + type RateLimitError struct + func (e *RateLimitError) Unwrap() error + type RetryConfig struct + InitialWait time.Duration + MaxRetries int + MaxWait time.Duration + type ServerError struct + func (e *ServerError) Unwrap() error + type TimeoutError struct + Duration time.Duration + Err error + func (e *TimeoutError) Error() string + func (e *TimeoutError) Unwrap() error + type ValidationError struct + Message string + func (e *ValidationError) Error() string