Documentation
¶
Overview ¶
Package rss provides parsing for RSS, Atom, and JSON Feed formats.
This package allows you to parse RSS feeds from various sources and formats into a unified interface. It supports RSS 2.0, Atom 1.0, and JSON Feed 1.1 formats.
Example usage:
import "git.quad4.io/Go-Libs/RSS"
feed, err := rss.Parse([]byte(feedData))
if err != nil {
// handle error
}
fmt.Println("Feed title:", feed.Title)
for _, item := range feed.Items {
fmt.Println("Item:", item.Title)
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enclosure ¶
type Enclosure struct {
// URL of the enclosure
URL string
// Length in bytes
Length int64
// MIME type
Type string
}
Enclosure represents an attachment or media file associated with an item.
type Feed ¶
type Feed struct {
// Title of the feed
Title string
// Description of the feed
Description string
// Link to the feed's website
Link string
// FeedURL is the URL of the feed itself
FeedURL string
// Language of the feed
Language string
// Author of the feed
Author *Person
// Published date of the feed
Published *time.Time
// Updated date of the feed (for feeds that support it)
Updated *time.Time
// Items in the feed
Items []*Item
}
Feed represents a parsed RSS feed with a unified interface across all formats.
type Item ¶
type Item struct {
// Title of the item
Title string
// Description/Content of the item
Description string
// Link to the item
Link string
// GUID uniquely identifies the item
GUID string
// Published date of the item
Published *time.Time
// Updated date of the item (for items that support it)
Updated *time.Time
// Author of the item
Author *Person
// Categories/Tags for the item
Categories []string
// Enclosures (attachments, media)
Enclosures []*Enclosure
}
Item represents an individual item/entry in a feed.
Click to show internal directories.
Click to hide internal directories.