rss

package
v2.0.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidDurationFormat = errors.New("rss: invalid duration format")

Functions

func Parse

func Parse(baseURL string, data io.Reader) (*model.Feed, error)

Parse returns a normalized feed struct from a RSS feed.

Types

type FeedBurnerElement

type FeedBurnerElement struct {
	FeedBurnerLink          string `xml:"http://rssnamespace.org/feedburner/ext/1.0 origLink"`
	FeedBurnerEnclosureLink string `xml:"http://rssnamespace.org/feedburner/ext/1.0 origEnclosureLink"`
}

FeedBurnerElement represents FeedBurner XML elements.

type Image

type Image struct {
	URL string `xml:"href,attr"`
}

Image represents podcast artwork.

type PodcastEntryElement

type PodcastEntryElement struct {
	Subtitle              string `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd subtitle"`
	Summary               string `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd summary"`
	Duration              string `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd duration"`
	GooglePlayDescription string `xml:"http://www.google.com/schemas/play-podcasts/1.0 description"`
}

PodcastEntryElement represents iTunes and GooglePlay entry XML elements.

func (*PodcastEntryElement) PodcastDescription

func (e *PodcastEntryElement) PodcastDescription() string

PodcastDescription returns the description of the podcast.

type PodcastFeedElement

type PodcastFeedElement struct {
	ItunesAuthor     string       `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd channel>author"`
	Subtitle         string       `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd channel>subtitle"`
	Summary          string       `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd channel>summary"`
	PodcastOwner     PodcastOwner `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd channel>owner"`
	GooglePlayAuthor string       `xml:"http://www.google.com/schemas/play-podcasts/1.0 channel>author"`
}

PodcastFeedElement represents iTunes and GooglePlay feed XML elements. Specs: - https://github.com/simplepie/simplepie-ng/wiki/Spec:-iTunes-Podcast-RSS - https://developers.google.com/search/reference/podcast/rss-feed

func (*PodcastFeedElement) PodcastAuthor

func (e *PodcastFeedElement) PodcastAuthor() string

PodcastAuthor returns the author of the podcast.

type PodcastOwner

type PodcastOwner struct {
	Name  string `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd name"`
	Email string `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd email"`
}

PodcastOwner represents contact information for the podcast owner.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL