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

Safe Haskell | None
Language | Haskell98

Yesod.Feed

Synopsis

- newsFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m TypedContent
- newsFeedText :: MonadHandler m => Feed Text -> m TypedContent
- data Feed url = Feed {
  - feedTitle :: Text
  - feedLinkSelf :: url
  - feedLinkHome :: url
  - feedAuthor :: Text
  - feedDescription :: Html
  - feedLanguage :: Text
  - feedUpdated :: UTCTime
  - feedLogo :: Maybe (url, Text)
  - feedEntries :: [FeedEntry url]
  }
- data FeedEntry url = FeedEntry {
  - feedEntryLink :: url
  - feedEntryUpdated :: UTCTime
  - feedEntryTitle :: Text
  - feedEntryContent :: Html
  - feedEntryEnclosure :: Maybe (url, Int, Text)
  }

# Documentation

newsFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m TypedContent Source

newsFeedText :: MonadHandler m => Feed Text -> m TypedContent Source

Same as ``newsFeed`` but for `'Feed Text'`. Useful for cases where you are generating a feed of external links.

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
feedLogo :: Maybe (url, Text)
feedEntries :: [FeedEntry url]

data FeedEntry url Source

Each feed entry

Constructors

FeedEntry |

Fields

feedEntryLink :: url
feedEntryUpdated :: UTCTime
feedEntryTitle :: Text
feedEntryContent :: Html
feedEntryEnclosure :: Maybe (url, Int, Text)