-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Helper functions and data types for producing News feeds.
--   
--   API docs and the README are available at
--   http://www.stackage.org/package/yesod-newsfeed
@package yesod-newsfeed
@version 1.6

module Yesod.RssFeed

-- | Generate the feed
rssFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m RepRss

-- | Same as rssFeed but for 'Feed Text'. Useful
--   for cases where you are generating a feed of external links.
rssFeedText :: MonadHandler m => Feed Text -> m RepRss

-- | Generates a link tag in the head of a widget.
rssLink :: MonadWidget m => Route (HandlerSite m) -> Text -> m ()
newtype RepRss
RepRss :: Content -> RepRss

-- | The overall feed
data Feed url
Feed :: Text -> url -> url -> Text -> Html -> Text -> UTCTime -> Maybe (url, Text) -> [FeedEntry url] -> Feed url
[feedTitle] :: Feed url -> Text
[feedLinkSelf] :: Feed url -> url
[feedLinkHome] :: Feed url -> url
[feedAuthor] :: Feed url -> Text

-- | note: currently only used for Rss
[feedDescription] :: Feed url -> Html

-- | note: currently only used for Rss, possible values:
--   http://www.rssboard.org/rss-language-codes
[feedLanguage] :: Feed url -> Text
[feedUpdated] :: Feed url -> UTCTime
[feedLogo] :: Feed url -> Maybe (url, Text)
[feedEntries] :: Feed url -> [FeedEntry url]

-- | Each feed entry
data FeedEntry url
FeedEntry :: url -> UTCTime -> Text -> Html -> Maybe (EntryEnclosure url) -> FeedEntry url
[feedEntryLink] :: FeedEntry url -> url
[feedEntryUpdated] :: FeedEntry url -> UTCTime
[feedEntryTitle] :: FeedEntry url -> Text
[feedEntryContent] :: FeedEntry url -> Html

-- | Allows enclosed data: RSS <enclosure> or Atom <link
--   rel=enclosure>
[feedEntryEnclosure] :: FeedEntry url -> Maybe (EntryEnclosure url)

-- | RSS and Atom allow for linked content to be enclosed in a feed entry.
--   This represents the enclosed content.
--   
--   Atom feeds ignore enclosedSize and enclosedMimeType.
data EntryEnclosure url
EntryEnclosure :: url -> Int -> Text -> EntryEnclosure url
[enclosedUrl] :: EntryEnclosure url -> url

-- | Specified in bytes
[enclosedSize] :: EntryEnclosure url -> Int
[enclosedMimeType] :: EntryEnclosure url -> Text
instance Yesod.Core.Content.ToContent Yesod.RssFeed.RepRss
instance Yesod.Core.Content.HasContentType Yesod.RssFeed.RepRss
instance Yesod.Core.Content.ToTypedContent Yesod.RssFeed.RepRss

-- | Generation of Atom newsfeeds.
module Yesod.AtomFeed
atomFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m RepAtom

-- | Same as atomFeed but for 'Feed Text'. Useful
--   for cases where you are generating a feed of external links.
atomFeedText :: MonadHandler m => Feed Text -> m RepAtom

-- | Generates a link tag in the head of a widget.
atomLink :: MonadWidget m => Route (HandlerSite m) -> Text -> m ()
newtype RepAtom
RepAtom :: Content -> RepAtom

-- | The overall feed
data Feed url
Feed :: Text -> url -> url -> Text -> Html -> Text -> UTCTime -> Maybe (url, Text) -> [FeedEntry url] -> Feed url
[feedTitle] :: Feed url -> Text
[feedLinkSelf] :: Feed url -> url
[feedLinkHome] :: Feed url -> url
[feedAuthor] :: Feed url -> Text

-- | note: currently only used for Rss
[feedDescription] :: Feed url -> Html

-- | note: currently only used for Rss, possible values:
--   http://www.rssboard.org/rss-language-codes
[feedLanguage] :: Feed url -> Text
[feedUpdated] :: Feed url -> UTCTime
[feedLogo] :: Feed url -> Maybe (url, Text)
[feedEntries] :: Feed url -> [FeedEntry url]

-- | Each feed entry
data FeedEntry url
FeedEntry :: url -> UTCTime -> Text -> Html -> Maybe (EntryEnclosure url) -> FeedEntry url
[feedEntryLink] :: FeedEntry url -> url
[feedEntryUpdated] :: FeedEntry url -> UTCTime
[feedEntryTitle] :: FeedEntry url -> Text
[feedEntryContent] :: FeedEntry url -> Html

-- | Allows enclosed data: RSS <enclosure> or Atom <link
--   rel=enclosure>
[feedEntryEnclosure] :: FeedEntry url -> Maybe (EntryEnclosure url)

-- | RSS and Atom allow for linked content to be enclosed in a feed entry.
--   This represents the enclosed content.
--   
--   Atom feeds ignore enclosedSize and enclosedMimeType.
data EntryEnclosure url
EntryEnclosure :: url -> Int -> Text -> EntryEnclosure url
[enclosedUrl] :: EntryEnclosure url -> url

-- | Specified in bytes
[enclosedSize] :: EntryEnclosure url -> Int
[enclosedMimeType] :: EntryEnclosure url -> Text
instance Yesod.Core.Content.ToContent Yesod.AtomFeed.RepAtom
instance Yesod.Core.Content.HasContentType Yesod.AtomFeed.RepAtom
instance Yesod.Core.Content.ToTypedContent Yesod.AtomFeed.RepAtom

module Yesod.Feed
newsFeed :: MonadHandler m => Feed (Route (HandlerSite m)) -> m TypedContent

-- | Same as newsFeed but for 'Feed Text'. Useful
--   for cases where you are generating a feed of external links.
newsFeedText :: MonadHandler m => Feed Text -> m TypedContent

-- | The overall feed
data Feed url
Feed :: Text -> url -> url -> Text -> Html -> Text -> UTCTime -> Maybe (url, Text) -> [FeedEntry url] -> Feed url
[feedTitle] :: Feed url -> Text
[feedLinkSelf] :: Feed url -> url
[feedLinkHome] :: Feed url -> url
[feedAuthor] :: Feed url -> Text

-- | note: currently only used for Rss
[feedDescription] :: Feed url -> Html

-- | note: currently only used for Rss, possible values:
--   http://www.rssboard.org/rss-language-codes
[feedLanguage] :: Feed url -> Text
[feedUpdated] :: Feed url -> UTCTime
[feedLogo] :: Feed url -> Maybe (url, Text)
[feedEntries] :: Feed url -> [FeedEntry url]

-- | Each feed entry
data FeedEntry url
FeedEntry :: url -> UTCTime -> Text -> Html -> Maybe (EntryEnclosure url) -> FeedEntry url
[feedEntryLink] :: FeedEntry url -> url
[feedEntryUpdated] :: FeedEntry url -> UTCTime
[feedEntryTitle] :: FeedEntry url -> Text
[feedEntryContent] :: FeedEntry url -> Html

-- | Allows enclosed data: RSS <enclosure> or Atom <link
--   rel=enclosure>
[feedEntryEnclosure] :: FeedEntry url -> Maybe (EntryEnclosure url)

-- | RSS and Atom allow for linked content to be enclosed in a feed entry.
--   This represents the enclosed content.
--   
--   Atom feeds ignore enclosedSize and enclosedMimeType.
data EntryEnclosure url
EntryEnclosure :: url -> Int -> Text -> EntryEnclosure url
[enclosedUrl] :: EntryEnclosure url -> url

-- | Specified in bytes
[enclosedSize] :: EntryEnclosure url -> Int
[enclosedMimeType] :: EntryEnclosure url -> Text
