yesod-newsfeed-1.2.0: Helper functions and data types for producing News feeds.

Safe Haskell | None

Yesod.RssFeed

Synopsis

- rssFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m RepRss
- rssLink :: MonadWidget m => Route (HandlerSite m) -> Text -> m ()
- newtype RepRss = RepRss Content
- data Feed url = Feed {
  - feedTitle :: Text
  - feedLinkSelf :: url
  - feedLinkHome :: url
  - feedAuthor :: Text
  - feedDescription :: Html
  - feedLanguage :: Text
  - feedUpdated :: UTCTime
  - feedEntries :: [FeedEntry url]
  }
- data FeedEntry url = FeedEntry {
  - feedEntryLink :: url
  - feedEntryUpdated :: UTCTime
  - feedEntryTitle :: Text
  - feedEntryContent :: Html
  }

# Documentation

rssFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m RepRss Source

Generate the feed

rssLink Source

Arguments

:: MonadWidget m |
=> Route (HandlerSite m) |
-> Text | title
-> m () |

Generates a link tag in the head of a widget.

newtype RepRss Source

Constructors

RepRss Content |

Instances

ToContent RepRss |
HasContentType RepRss |
ToTypedContent RepRss |

data Feed url Source

The overall feed

Constructors

Feed |

Fields

feedTitle :: Text
feedLinkSelf :: url
feedLinkHome :: url
feedAuthor :: Text
feedDescription :: Html

  note: currently only used for Rss

feedLanguage :: Text

  note: currently only used for Rss, possible values: http://www.rssboard.org/rss-language-codes

feedUpdated :: UTCTime
feedEntries :: [FeedEntry url]

data FeedEntry url Source

Each feed entry

Constructors

FeedEntry |

Fields

feedEntryLink :: url
feedEntryUpdated :: UTCTime
feedEntryTitle :: Text
feedEntryContent :: Html