Documentation
¶
Overview ¶
A high performance, robust library for parsing RSS1.0/2.0 Including Itunes and MediaRSS Extensions
Index ¶
- type Channel
- type GUIDField
- type Image
- type Item
- func (i Item) Date() (*time.Time, error)
- func (i Item) Description() (string, error)
- func (i Item) EnclosureURL() string
- func (i Item) HasEnclosure() bool
- func (i *Item) ItunesAuthor() (string, error)
- func (i Item) ItunesDuration() (*time.Duration, error)
- func (i *Item) ItunesImage() (*Image, error)
- func (i *Item) ItunesSubtitle() (string, error)
- func (i *Item) ItunesSummary() (string, error)
- func (i Item) Link() (string, error)
- func (i Item) Title() (string, error)
- type ItunesMeta
- type MediaChannelMeta
- type MediaMeta
- type RSS
- func (r *RSS) Categories() ([]string, error)
- func (r *RSS) Description() (string, error)
- func (r *RSS) Generator() (string, error)
- func (r *RSS) IsItunes() bool
- func (r *RSS) IsMRSS() bool
- func (r *RSS) Items() ([]Item, error)
- func (r *RSS) ItunesAuthor() (string, error)
- func (r *RSS) ItunesExplicit() (string, error)
- func (r *RSS) ItunesImage() (*Image, error)
- func (r *RSS) ItunesSubtitle() (string, error)
- func (r *RSS) ItunesSummary() (string, error)
- func (r *RSS) Keywords() ([]string, error)
- func (r *RSS) Language() (string, error)
- func (r *RSS) MRSSCategories() ([]string, error)
- func (r *RSS) MRSSCopyright() (string, error)
- func (r *RSS) MRSSRating() (string, error)
- func (r *RSS) Thumbnail() (*Image, error)
- func (r *RSS) Title() (string, error)
- type RSSEnclosure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func (*Image) Height ¶
Returns the url image width in pixels, if available. If not, a width of 0 is returned along with an error.
func (*Image) Link ¶
Returns the url where the image links to, if available. If not, an empty string is returned along with an error.
func (*Image) Title ¶
Returns image title, if available. If not, an empty string is returned along with an error.
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (Item) Date ¶
Returns the item date. If the item date is not populated, you'll get nil and an error.
func (Item) Description ¶
Returns the item . If the item title is not populated, you'll get an empty string and an error.
func (Item) HasEnclosure ¶
Whether or not the item has a media enclosure.
func (*Item) ItunesAuthor ¶
Returns the Itunes "author" field for the item. If the item doesn't contain ITunes Extensions or hasn't populated the Itunes "author" field, will return an empty string and an error
func (Item) ItunesDuration ¶
Returns Itunes episode duration. If this information wasn't available or the item doesn't contain Itunes Extensions then we return nil and an error.
func (*Item) ItunesImage ¶
Returns the Itunes "image" field for the item. If the item doesn't contain ITunes Extensions or hasn't populated the Itunes "image" field, will return nil and an error.
func (*Item) ItunesSubtitle ¶
Returns the Itunes "author" field for the item. If the item doesn't contain ITunes Extensions or hasn't populated the Itunes "subtitle" field, will return an empty string and an error
func (*Item) ItunesSummary ¶
Returns the Itunes "summary" field for the item. If the item doesn't contain ITunes Extensions or hasn't populated the Itunes "summary" field, will return an empty string and an error
type ItunesMeta ¶
type ItunesMeta struct {
// contains filtered or unexported fields
}
type MediaChannelMeta ¶
type MediaChannelMeta struct {
// contains filtered or unexported fields
}
MediaRSS Channel Metadata
type MediaMeta ¶
type MediaMeta struct {
// contains filtered or unexported fields
}
MediaRSS Item Metadata
type RSS ¶
type RSS struct {
// contains filtered or unexported fields
}
func Decode ¶
Pass in a byte slice containing the feed, get an *RSS back. You can then explore the feed easily.
func (*RSS) Categories ¶
Returns the feed categories. If no category tags were found for the channel, you'll get a nil result with an accompanying error.
func (*RSS) Description ¶
Returns the feed description. If the field is not populated, will return an empty string and an error.
func (*RSS) Generator ¶
Returns the feed generator. If the field is not populated, will return an empty string and an error.
func (*RSS) ItunesAuthor ¶
Returns the Itunes "author" field for the channel. If the channel doesn't contain ITunes Extensions or hasn't populated the channel-wide Itunes "author" field, will return an empty string and an error
func (*RSS) ItunesExplicit ¶
Returns the Itunes "explicit" field for the channel. If the channel doesn't contain ITunes Extensions or hasn't populated the channel-wide Itunes "explicit" field, will return an empty string and an error func (r *RSS) ItunesExplicit() (string, error) {
func (*RSS) ItunesImage ¶
Returns the Itunes "image" field for the channel. If the channel doesn't contain ITunes Extensions or hasn't populated the channel-wide Itunes "image" field, will return nil and an error.
func (*RSS) ItunesSubtitle ¶
Returns the Itunes "author" field for the channel. If the channel doesn't contain ITunes Extensions or hasn't populated the channel-wide Itunes "subtitle" field, will return an empty string and an error
func (*RSS) ItunesSummary ¶
Returns the Itunes "summary" field for the channel. If the channel doesn't contain ITunes Extensions or hasn't populated the channel-wide Itunes "summary" field, will return an empty string and an error
func (*RSS) Keywords ¶
MediaRSS Feed keywords. If the MRSS feed "keywords" field is not populated or if the feed doesn't implement MediaRSS extensions, this will return nil and an error.
func (*RSS) Language ¶
Returns the feed language. This isn't always that standardized so be careful while parsing the field. An empty string and error will be returned if the field is not populated.
func (*RSS) MRSSCategories ¶
MediaRSS Feed categories. If the MRSS feed "categories" field is not populated or if the feed doesn't implement MediaRSS extensions, this will return nil and an error.
func (*RSS) MRSSCopyright ¶
MediaRSS Feed Copyright. If the MRSS feed "copyright" field is not populated or if the feed doesn't implement MediaRSS extensions, you'll receive an empty string and an error.
func (*RSS) MRSSRating ¶
MediaRSS Feed Rating. If the MRSS feed "rating" field is not populated or if the feed doesn't implement MediaRSS extensions, you'll receive an empty string and an error.
type RSSEnclosure ¶
type RSSEnclosure struct {
// contains filtered or unexported fields
}