Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Feed data structures.
Synopsis
- data FeedLocation = FeedLocation URI Text
- type UID = Int
- data FeedQuery
- newtype FeedDefinition = FeedDefinition {
- _feedTitle :: Text
- data FeedItem = FeedItem {
- _itemDate :: Maybe UTCTime
- _itemTitle :: Text
- _itemContent :: Text
- _itemLinks :: [Link]
- _itemIdentifier :: Text
- _itemAuthors :: [Author]
- data Author = Author {
- _authorName :: Text
- _authorEmail :: Text
- _authorURI :: Maybe AnyURI
- parseFeed :: MonadCatch m => Text -> m (FeedDefinition, [FeedItem])
- feedC :: MonadCatch m => ConduitT Event o m (Maybe (FeedDefinition, [FeedItem]))
- parseFeedItem :: MonadCatch m => Text -> m FeedItem
- getMainLink :: FeedItem -> Maybe Link
- areSameItem :: FeedItem -> FeedItem -> Bool
Types
data FeedLocation Source #
Feed location identifies a feed. It is either: - the feed URI - a webpage URI that refers to the feed through an alternate link, in which case an optional feed title can be provided to disambiguate multiple such links
Instances
A query describes a set of feeds through some criteria.
newtype FeedDefinition Source #
Instances
FeedItem | |
|
Instances
Author | |
|
Instances
FromJSON Author Source # | |
ToJSON Author Source # | |
Generic Author Source # | |
Show Author Source # | |
Eq Author Source # | |
Ord Author Source # | |
Pretty Author Source # | |
type Rep Author Source # | |
Defined in Imm.Feed type Rep Author = D1 ('MetaData "Author" "Imm.Feed" "imm-2.1.2.0-D2NMr4mlUE8FsGQYPYqh5Y" 'False) (C1 ('MetaCons "Author" 'PrefixI 'True) (S1 ('MetaSel ('Just "_authorName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_authorEmail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_authorURI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AnyURI))))) |
Parsers
parseFeed :: MonadCatch m => Text -> m (FeedDefinition, [FeedItem]) Source #
feedC :: MonadCatch m => ConduitT Event o m (Maybe (FeedDefinition, [FeedItem])) Source #
Conduit version of parseFeed
parseFeedItem :: MonadCatch m => Text -> m FeedItem Source #