feed-0.3.7: Interfacing with RSS (v 0.9x, 2.x, 1.0) + Atom feeds.Source codeContentsIndex
Text.Feed.Constructor
Stabilityprovisional
MaintainerSigbjorn Finne <sof@galois.com>
Description
Description: Module for an abstraction layer between different kinds of feeds.
Synopsis
data FeedKind
= AtomKind
| RSSKind (Maybe String)
| RDFKind (Maybe String)
newFeed :: FeedKind -> Feed
feedFromRSS :: RSS -> Feed
feedFromAtom :: Feed -> Feed
feedFromRDF :: Feed -> Feed
feedFromXML :: Element -> Feed
getFeedKind :: Feed -> FeedKind
type FeedSetter a = a -> Feed -> Feed
addItem :: Item -> Feed -> Feed
withFeedTitle :: FeedSetter String
withFeedHome :: FeedSetter URLString
withFeedHTML :: FeedSetter URLString
withFeedDescription :: FeedSetter String
withFeedPubDate :: FeedSetter String
withFeedLastUpdate :: FeedSetter DateString
withFeedDate :: FeedSetter DateString
withFeedLogoLink :: URLString -> FeedSetter URLString
withFeedLanguage :: FeedSetter String
withFeedCategories :: FeedSetter [(String, Maybe String)]
withFeedGenerator :: FeedSetter (String, Maybe URLString)
withFeedItems :: FeedSetter [Item]
newItem :: FeedKind -> Item
getItemKind :: Item -> FeedKind
atomEntryToItem :: Entry -> Item
rssItemToItem :: RSSItem -> Item
rdfItemToItem :: Item -> Item
type ItemSetter a = a -> Item -> Item
withItemTitle :: ItemSetter String
withItemLink :: ItemSetter URLString
withItemPubDate :: ItemSetter DateString
withItemDate :: ItemSetter DateString
withItemAuthor :: ItemSetter String
withItemCommentLink :: ItemSetter String
withItemEnclosure :: String -> Maybe String -> ItemSetter Integer
withItemFeedLink :: String -> ItemSetter String
withItemId :: Bool -> ItemSetter String
withItemCategories :: ItemSetter [(String, Maybe String)]
withItemDescription :: ItemSetter String
withItemRights :: ItemSetter String
Documentation
data FeedKind Source
The kinds of feed documents supported.
Constructors
AtomKind
RSSKind (Maybe String)
RDFKind (Maybe String)
show/hide Instances
newFeed :: FeedKind -> FeedSource
Construct an empty feed document, intending to output it in the fk feed format.
feedFromRSS :: RSS -> FeedSource
feedFromAtom :: Feed -> FeedSource
feedFromRDF :: Feed -> FeedSource
feedFromXML :: Element -> FeedSource
getFeedKind :: Feed -> FeedKindSource
type FeedSetter a = a -> Feed -> FeedSource
addItem :: Item -> Feed -> FeedSource
withFeedTitle :: FeedSetter StringSource
withFeedHome :: FeedSetter URLStringSource
withFeedHTML :: FeedSetter URLStringSource
withFeedHTML sets the URL where an HTML version of the feed is published.
withFeedDescription :: FeedSetter StringSource
withFeedHTML sets the URL where an HTML version of the feed is published.
withFeedPubDate :: FeedSetter StringSource
withFeedLastUpdate :: FeedSetter DateStringSource
withFeedDate :: FeedSetter DateStringSource
'withFeedDate dt' is the composition of withFeedPubDate and withFeedLastUpdate, setting both publication date and last update date to dt. Notice that RSS2.0 is the only format supporting both pub and last-update.
withFeedLogoLink :: URLString -> FeedSetter URLStringSource
withFeedLanguage :: FeedSetter StringSource
withFeedCategories :: FeedSetter [(String, Maybe String)]Source
withFeedGenerator :: FeedSetter (String, Maybe URLString)Source
withFeedItems :: FeedSetter [Item]Source
newItem :: FeedKind -> ItemSource
getItemKind :: Item -> FeedKindSource
atomEntryToItem :: Entry -> ItemSource
rssItemToItem :: RSSItem -> ItemSource
rdfItemToItem :: Item -> ItemSource
type ItemSetter a = a -> Item -> ItemSource
withItemTitle :: ItemSetter StringSource
'withItemTitle myTitle' associates a new title, myTitle, with a feed item.
withItemLink :: ItemSetter URLStringSource
'withItemTitle myLink' associates a new URL, myLink, with a feed item.
withItemPubDate :: ItemSetter DateStringSource
'withItemPubDate dt' associates the creation/ publication date dt with a feed item.
withItemDate :: ItemSetter DateStringSource
withItemDate is a synonym for withItemPubDate.
withItemAuthor :: ItemSetter StringSource
'withItemAuthor auStr' associates new author info with a feed item.
withItemCommentLink :: ItemSetter StringSource
'withItemCommentLink url' sets the URL reference to the comment page to url.
withItemEnclosure :: String -> Maybe String -> ItemSetter IntegerSource
'withItemEnclosure url mbTy len' sets the URL reference to the comment page to url.
withItemFeedLink :: String -> ItemSetter StringSource
'withItemFeedLink name myFeed' associates the parent feed URL myFeed with a feed item. It is labelled as name.
withItemId :: Bool -> ItemSetter StringSource
'withItemId isURL id' associates new unique identifier with a feed item. If isURL is True, then the id is assumed to point to a valid web resource.
withItemCategories :: ItemSetter [(String, Maybe String)]Source
withItemDescription :: ItemSetter StringSource
'withItemDescription desc' associates a new descriptive string (aka summary) with a feed item.
withItemRights :: ItemSetter StringSource
'withItemRights rightStr' associates the rights information rightStr with a feed item.
Produced by Haddock version 2.4.2