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

Safe Haskell | None
Language | Haskell98

Yesod.AtomFeed

Description

Generation of Atom newsfeeds.

Synopsis

- atomFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m RepAtom
- atomFeedText :: MonadHandler m => Feed Text -> m RepAtom
- atomLink :: MonadWidget m => Route (HandlerSite m) -> Text -> m ()
- newtype RepAtom = RepAtom Content
- 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

atomFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m RepAtom Source

atomFeedText :: MonadHandler m => Feed Text -> m RepAtom Source

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

atomLink Source

Arguments

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

Generates a link tag in the head of a widget.

newtype RepAtom Source

Constructors

RepAtom Content |

Instances

ToContent RepAtom Source |
HasContentType RepAtom Source |
ToTypedContent RepAtom Source |

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)