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

Portability | portable
Stability | provisional
Maintainer | Sigbjorn Finne <sof@forkIO.com>
Safe Haskell | Safe-Inferred

Text.Atom.Feed

Contents

- Core types
- Smart Constructors

Description

Synopsis

- type URI = String
- type NCName = String
- type Date = String
- type MediaType = String
- data Feed = Feed {
  - feedId :: String
  - 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]
  }
- data Entry = Entry {
  - entryId :: String
  - 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]
  }
- data EntryContent
  - = TextContent String
  - | HTMLContent String
  - | XHTMLContent Element
  - | MixedContent (Maybe String) [Content]
  - | ExternalContent (Maybe MediaType) URI
- data Category = Category {
  - catTerm :: String
  - catScheme :: Maybe URI
  - catLabel :: Maybe String
  - catOther :: [Element]
  }
- data Generator = Generator {
  - genURI :: Maybe URI
  - genVersion :: Maybe String
  - genText :: String
  }
- data Link = Link {
  - linkHref :: URI
  - linkRel :: Maybe (Either NCName URI)
  - linkType :: Maybe MediaType
  - linkHrefLang :: Maybe String
  - linkTitle :: Maybe String
  - linkLength :: Maybe String
  - linkAttrs :: [Attr]
  - linkOther :: [Element]
  }
- data TextContent
  - = TextString String
  - | HTMLString String
  - | XHTMLString Element
- txtToString :: TextContent -> String
- data Source = Source {
  - sourceAuthors :: [Person]
  - sourceCategories :: [Category]
  - sourceGenerator :: Maybe Generator
  - sourceIcon :: Maybe URI
  - sourceId :: Maybe String
  - sourceLinks :: [Link]
  - sourceLogo :: Maybe URI
  - sourceRights :: Maybe TextContent
  - sourceSubtitle :: Maybe TextContent
  - sourceTitle :: Maybe TextContent
  - sourceUpdated :: Maybe Date
  - sourceOther :: [Element]
  }
- data Person = Person {
  - personName :: String
  - personURI :: Maybe URI
  - personEmail :: Maybe String
  - personOther :: [Element]
  }
- data InReplyTo = InReplyTo {
  - replyToRef :: URI
  - replyToHRef :: Maybe URI
  - replyToType :: Maybe MediaType
  - replyToSource :: Maybe URI
  - replyToOther :: [Attr]
  - replyToContent :: [Content]
  }
- data InReplyTotal = InReplyTotal {
  - replyToTotal :: Integer
  - replyToTotalOther :: [Attr]
  }
- newCategory :: String -> Category
- nullFeed :: String -> TextContent -> Date -> Feed
- nullEntry :: String -> TextContent -> Date -> Entry
- nullGenerator :: String -> Generator
- nullLink :: URI -> Link
- nullSource :: Source
- nullPerson :: Person

# Core types

type URI = String Source

type NCName = String Source

type Date = String Source

type MediaType = String Source

data Feed Source

Constructors

Feed |

Fields

feedId :: String
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 |

data Entry Source

Constructors

Entry |

Fields

entryId :: String
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 |

data EntryContent Source

Constructors

TextContent String |
HTMLContent String |
XHTMLContent Element |
MixedContent (Maybe String) [Content] |
ExternalContent (Maybe MediaType) URI |

Instances

Show EntryContent |

data Category Source

Constructors

Category |

Fields

catTerm :: String

  the tag/term of the category.

catScheme :: Maybe URI

  optional URL for identifying the categorization scheme.

catLabel :: Maybe String

  human-readable label of the category

catOther :: [Element]

  unknown elements, for extensibility.

Instances

Show Category |

data Generator Source

Constructors

Generator |

Fields

genURI :: Maybe URI
genVersion :: Maybe String
genText :: String

Instances

Eq Generator |
Show Generator |

data Link Source

Constructors

Link |

Fields

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

Instances

Show Link |

data TextContent Source

Constructors

TextString String |
HTMLString String |
XHTMLString Element |

Instances

Show TextContent |

txtToString :: TextContent -> String Source

data Source Source

Constructors

Source |

Fields

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

Instances

Show Source |

data Person Source

Constructors

Person |

Fields

personName :: String
personURI :: Maybe URI
personEmail :: Maybe String
personOther :: [Element]

Instances

Show Person |

data InReplyTo Source

Constructors

InReplyTo |

Fields

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

Instances

Show InReplyTo |

data InReplyTotal Source

Constructors

InReplyTotal |

Fields

replyToTotal :: Integer
replyToTotalOther :: [Attr]

Instances

Show InReplyTotal |

# Smart Constructors

newCategory Source

Arguments

:: String | catTerm
-> Category |

nullFeed Source

Arguments

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

nullEntry Source

Arguments

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

nullGenerator Source

Arguments

:: String | genText
-> Generator |

nullLink Source

Arguments

:: URI | linkHref
-> Link |

nullSource :: Source Source

nullPerson :: Person Source