feed-1.0.1.0: Interfacing with RSS (v 0.9x, 2.x, 1.0) + Atom feeds.

Copyright | (c) Galois Inc. 2008 (c) Sigbjorn Finne 2009-
License | BSD3
Maintainer | Sigbjorn Finne <sof@forkIO.com>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Text.Atom.Feed

Description

# Documentation

type URI = Text Source #

type NCName = Text Source #

type Date = Text Source #

type MediaType = Text Source #

type Attr = (Name, [Content]) Source #

data Feed Source #

Constructors

Feed |

Fields

- feedId :: URI
- feedTitle :: TextContent
- feedUpdated :: Date
- feedAuthors :: [Person]
- feedCategories :: [Category]
- feedContributors :: [Person]
- feedGenerator :: Maybe Generator
- feedIcon :: Maybe URI
- feedLinks :: [Link]
- feedLogo :: Maybe URI
- feedRights :: Maybe TextContent
- feedSubtitle :: Maybe TextContent
- feedEntries :: [Entry]
- feedAttrs :: [Attr]
- feedOther :: [Element]

Instances

Show Feed Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> Feed -> ShowS Source # show :: Feed -> String Source # showList :: [Feed] -> ShowS Source #

data Entry Source #

Constructors

Entry |

Fields

- entryId :: URI
- entryTitle :: TextContent
- entryUpdated :: Date
- entryAuthors :: [Person]
- entryCategories :: [Category]
- entryContent :: Maybe EntryContent
- entryContributor :: [Person]
- entryLinks :: [Link]
- entryPublished :: Maybe Date
- entryRights :: Maybe TextContent
- entrySource :: Maybe Source
- entrySummary :: Maybe TextContent
- entryInReplyTo :: Maybe InReplyTo
- entryInReplyTotal :: Maybe InReplyTotal
- entryAttrs :: [Attr]
- entryOther :: [Element]

Instances

Show Entry Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> Entry -> ShowS Source # show :: Entry -> String Source # showList :: [Entry] -> ShowS Source #

data EntryContent Source #

Constructors

TextContent Text |
HTMLContent Text |
XHTMLContent Element |
MixedContent (Maybe Text) [Node] |
ExternalContent (Maybe MediaType) URI |

Instances

Show EntryContent Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> EntryContent -> ShowS Source # show :: EntryContent -> String Source # showList :: [EntryContent] -> ShowS Source #

data Category Source #

Constructors

Category |

Fields

- catTerm :: Text

  the tag/term of the category.

- catScheme :: Maybe URI

  optional URL for identifying the categorization scheme.

- catLabel :: Maybe Text

  human-readable label of the category

- catOther :: [Element]

  unknown elements, for extensibility.

Instances

Show Category Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> Category -> ShowS Source # show :: Category -> String Source # showList :: [Category] -> ShowS Source #

data Generator Source #

Constructors

Generator |

Fields

- genURI :: Maybe URI
- genVersion :: Maybe Text
- genText :: Text

Instances

Eq Generator Source # |
Instance details Defined in Text.Atom.Feed Methods (==) :: Generator -> Generator -> Bool Source # (/=) :: Generator -> Generator -> Bool Source #
Show Generator Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> Generator -> ShowS Source # show :: Generator -> String Source # showList :: [Generator] -> ShowS Source #

data Link Source #

Constructors

Link |

Fields

- linkHref :: URI
- linkRel :: Maybe (Either NCName URI)
- linkType :: Maybe MediaType
- linkHrefLang :: Maybe Text
- linkTitle :: Maybe Text
- linkLength :: Maybe Text
- linkAttrs :: [Attr]
- linkOther :: [Element]

Instances

Show Link Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> Link -> ShowS Source # show :: Link -> String Source # showList :: [Link] -> ShowS Source #

data TextContent Source #

Constructors

TextString Text |
HTMLString Text |
XHTMLString Element |

Instances

Show TextContent Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> TextContent -> ShowS Source # show :: TextContent -> String Source # showList :: [TextContent] -> ShowS Source #

txtToString :: TextContent -> String Source #

data Source Source #

Constructors

Source |

Fields

- sourceAuthors :: [Person]
- sourceCategories :: [Category]
- sourceGenerator :: Maybe Generator
- sourceIcon :: Maybe URI
- sourceId :: Maybe URI
- sourceLinks :: [Link]
- sourceLogo :: Maybe URI
- sourceRights :: Maybe TextContent
- sourceSubtitle :: Maybe TextContent
- sourceTitle :: Maybe TextContent
- sourceUpdated :: Maybe Date
- sourceOther :: [Element]

Instances

Show Source Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> Source -> ShowS Source # show :: Source -> String Source # showList :: [Source] -> ShowS Source #

data Person Source #

Constructors

Person |

Fields

- personName :: Text
- personURI :: Maybe URI
- personEmail :: Maybe Text
- personOther :: [Element]

Instances

Show Person Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> Person -> ShowS Source # show :: Person -> String Source # showList :: [Person] -> ShowS Source #

data InReplyTo Source #

Constructors

InReplyTo |

Fields

- replyToRef :: URI
- replyToHRef :: Maybe URI
- replyToType :: Maybe MediaType
- replyToSource :: Maybe URI
- replyToOther :: [Attr]
- replyToContent :: [Node]

Instances

Show InReplyTo Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> InReplyTo -> ShowS Source # show :: InReplyTo -> String Source # showList :: [InReplyTo] -> ShowS Source #

data InReplyTotal Source #

Constructors

InReplyTotal |

Fields

- replyToTotal :: Integer
- replyToTotalOther :: [Attr]

Instances

Show InReplyTotal Source # |
Instance details Defined in Text.Atom.Feed Methods showsPrec :: Int -> InReplyTotal -> ShowS Source # show :: InReplyTotal -> String Source # showList :: [InReplyTotal] -> ShowS Source #

newCategory Source #

Arguments

:: Text | catTerm
-> Category |

nullFeed Source #

Arguments

:: URI | feedId
-> TextContent | feedTitle
-> Date | feedUpdated
-> Feed |

nullEntry Source #

Arguments

:: URI | entryId
-> TextContent | entryTitle
-> Date | entryUpdated
-> Entry |

nullGenerator Source #

Arguments

:: Text | genText
-> Generator |

nullLink Source #

Arguments

:: URI | linkHref
-> Link |

nullSource :: Source Source #

nullPerson :: Person Source #