Documentation ¶
Overview ¶
Package feed describes RSS format and provides parsing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Atom1 ¶
type Atom1 struct { XMLName xml.Name `xml:"http://www.w3.org/2005/Atom feed"` Title string `xml:"title"` Subtitle string `xml:"subtitle"` ID string `xml:"id"` Updated string `xml:"updated"` Rights string `xml:"rights"` Link Link `xml:"link"` Author Author `xml:"author"` EntryList []Entry `xml:"entry"` }
Atom1 is atom feed
type Enclosure ¶
type Enclosure struct { URL string `xml:"url,attr"` Length int `xml:"length,attr"` Type string `xml:"type,attr"` }
Enclosure element from item
type Entry ¶
type Entry struct { Title string `xml:"title"` Summary string `xml:"summary"` Content string `xml:"content"` ID string `xml:"id"` Updated string `xml:"updated"` Link Link `xml:"link"` Author Author `xml:"author"` Enclosure Enclosure `xml:"enclosure"` }
Entry from atom
type Item ¶
type Item struct { // Required Title string `xml:"title"` Link string `xml:"link"` Description template.HTML `xml:"description"` Enclosure Enclosure `xml:"enclosure"` GUID string `xml:"guid"` // Optional Content template.HTML `xml:"encoded,omitempty"` PubDate string `xml:"pubDate,omitempty"` Comments string `xml:"comments,omitempty"` Author string `xml:"author,omitempty"` Duration string `xml:"duration,omitempty"` // Internal DT time.Time `xml:"-"` Junk bool `xml:"-"` DurationFmt string `xml:"-"` // used for ui only in }
Item for rss
func (Item) DownloadAudio ¶
DownloadAudio return httpBody for Item's Enclosure.URL
func (Item) GetFilename ¶
GetFilename returns the filename for Item's Enclosure.URL
type ItunesImg ¶
type ItunesImg struct { XMLName xml.Name `xml:"itunes:image,omitempty"` URL string `xml:"href,attr"` }
ItunesImg image element for iTunes
type ItunesOwner ¶
type ItunesOwner struct { Email string `xml:"itunes:email,omitempty"` Name string `xml:"itunes:name,omitempty"` }
ItunesOwner owner element for iTunes
type MediaThumbnail ¶
type MediaThumbnail struct { XMLName xml.Name `xml:"media:thumbnail,omitempty"` URL string `xml:"url,attr"` }
MediaThumbnail image element for media
type Rss2 ¶
type Rss2 struct { XMLName xml.Name `xml:"rss"` Version string `xml:"version,attr"` NsItunes string `xml:"xmlns:itunes,attr"` NsMedia string `xml:"xmlns:media,attr"` Title string `xml:"channel>title"` Language string `xml:"channel>language"` Link string `xml:"channel>link"` Description string `xml:"channel>description"` PubDate string `xml:"channel>pubDate"` LastBuildDate string `xml:"channel>lastBuildDate"` ItunesImage *ItunesImg `xml:"channel>itunes:image"` MediaThumbnail *MediaThumbnail `xml:"channel>media:thumbnail"` ItunesAuthor string `xml:"channel>itunes:author"` ItunesExplicit string `xml:"channel>itunes:explicit"` ItunesOwner *ItunesOwner `xml:"channel>itunes:owner"` ItemList []Item `xml:"channel>item"` }
Rss2 feed
Click to show internal directories.
Click to hide internal directories.