feed-1.3.2.1: 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
Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.RSS.Syntax

Description

The basic syntax for putting together feeds.

For instance, to create a feed with a single item item: (nullRSS "rss title" "link") {rssChannel=(nullChannel "channel title" "link") {rssItems=[(nullItem "item title")]}}

Synopsis

- data RSS = RSS {
  - rssVersion :: Text
  - rssAttrs :: [Attr]
  - rssChannel :: RSSChannel
  - rssOther :: [Element]
  }
- type URLString = Text
- type DateString = Text
- data RSSChannel = RSSChannel {
  - rssTitle :: Text
  - rssLink :: URLString
  - rssDescription :: Text
  - rssItems :: [RSSItem]
  - rssLanguage :: Maybe Text
  - rssCopyright :: Maybe Text
  - rssEditor :: Maybe Text
  - rssWebMaster :: Maybe Text
  - rssPubDate :: Maybe DateString
  - rssLastUpdate :: Maybe DateString
  - rssCategories :: [RSSCategory]
  - rssGenerator :: Maybe Text
  - rssDocs :: Maybe URLString
  - rssCloud :: Maybe RSSCloud
  - rssTTL :: Maybe Integer
  - rssImage :: Maybe RSSImage
  - rssRating :: Maybe Text
  - rssTextInput :: Maybe RSSTextInput
  - rssSkipHours :: Maybe [Integer]
  - rssSkipDays :: Maybe [Text]
  - rssChannelOther :: [Element]
  }
- data RSSItem = RSSItem {
  - rssItemTitle :: Maybe Text
  - rssItemLink :: Maybe URLString
  - rssItemDescription :: Maybe Text
  - rssItemAuthor :: Maybe Text
  - rssItemCategories :: [RSSCategory]
  - rssItemComments :: Maybe URLString
  - rssItemContent :: Maybe Text
  - rssItemEnclosure :: Maybe RSSEnclosure
  - rssItemGuid :: Maybe RSSGuid
  - rssItemPubDate :: Maybe DateString
  - rssItemSource :: Maybe RSSSource
  - rssItemAttrs :: [Attr]
  - rssItemOther :: [Element]
  }
- data RSSSource = RSSSource {
  - rssSourceURL :: URLString
  - rssSourceAttrs :: [Attr]
  - rssSourceTitle :: Text
  }
- data RSSEnclosure = RSSEnclosure {
  - rssEnclosureURL :: URLString
  - rssEnclosureLength :: Maybe Integer
  - rssEnclosureType :: Text
  - rssEnclosureAttrs :: [Attr]
  }
- data RSSCategory = RSSCategory {
  - rssCategoryDomain :: Maybe Text
  - rssCategoryAttrs :: [Attr]
  - rssCategoryValue :: Text
  }
- data RSSGuid = RSSGuid {
  - rssGuidPermanentURL :: Maybe Bool
  - rssGuidAttrs :: [Attr]
  - rssGuidValue :: Text
  }
- data RSSImage = RSSImage {
  - rssImageURL :: URLString
  - rssImageTitle :: Text
  - rssImageLink :: URLString
  - rssImageWidth :: Maybe Integer
  - rssImageHeight :: Maybe Integer
  - rssImageDesc :: Maybe Text
  - rssImageOther :: [Element]
  }
- data RSSCloud = RSSCloud {
  - rssCloudDomain :: Maybe Text
  - rssCloudPort :: Maybe Text
  - rssCloudPath :: Maybe Text
  - rssCloudRegisterProcedure :: Maybe Text
  - rssCloudProtocol :: Maybe Text
  - rssCloudAttrs :: [Attr]
  }
- data RSSTextInput = RSSTextInput {
  - rssTextInputTitle :: Text
  - rssTextInputDesc :: Text
  - rssTextInputName :: Text
  - rssTextInputLink :: URLString
  - rssTextInputAttrs :: [Attr]
  - rssTextInputOther :: [Element]
  }
- nullRSS :: Text -> URLString -> RSS
- nullChannel :: Text -> URLString -> RSSChannel
- nullItem :: Text -> RSSItem
- nullSource :: URLString -> Text -> RSSSource
- nullEnclosure :: URLString -> Maybe Integer -> Text -> RSSEnclosure
- newCategory :: Text -> RSSCategory
- nullGuid :: Text -> RSSGuid
- nullPermaGuid :: Text -> RSSGuid
- nullImage :: URLString -> Text -> URLString -> RSSImage
- nullCloud :: RSSCloud
- nullTextInput :: Text -> Text -> URLString -> RSSTextInput

# Documentation

data RSS #

Constructors

RSS |

Fields

- rssVersion :: Text
- rssAttrs :: [Attr]
- rssChannel :: RSSChannel
- rssOther :: [Element]

#### Instances

Instances details

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

type URLString = Text #

type DateString = Text #

RFC 822 conforming.

data RSSChannel #

Constructors

RSSChannel |

Fields

- rssTitle :: Text
- rssLink :: URLString
- rssDescription :: Text
- rssItems :: [RSSItem]
- rssLanguage :: Maybe Text
- rssCopyright :: Maybe Text
- rssEditor :: Maybe Text
- rssWebMaster :: Maybe Text
- rssPubDate :: Maybe DateString

  rfc 822 conforming.

- rssLastUpdate :: Maybe DateString

  rfc 822 conforming.

- rssCategories :: [RSSCategory]
- rssGenerator :: Maybe Text
- rssDocs :: Maybe URLString
- rssCloud :: Maybe RSSCloud
- rssTTL :: Maybe Integer
- rssImage :: Maybe RSSImage
- rssRating :: Maybe Text
- rssTextInput :: Maybe RSSTextInput
- rssSkipHours :: Maybe [Integer]
- rssSkipDays :: Maybe [Text]
- rssChannelOther :: [Element]

#### Instances

Instances details

Show RSSChannel # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSChannel -> ShowS # show :: RSSChannel -> String # showList :: [RSSChannel] -> ShowS #

data RSSItem #

Constructors

RSSItem |

Fields

- rssItemTitle :: Maybe Text
- rssItemLink :: Maybe URLString
- rssItemDescription :: Maybe Text

  if not present, the title is. (per spec, at least.)

- rssItemAuthor :: Maybe Text
- rssItemCategories :: [RSSCategory]
- rssItemComments :: Maybe URLString
- rssItemContent :: Maybe Text
- rssItemEnclosure :: Maybe RSSEnclosure
- rssItemGuid :: Maybe RSSGuid
- rssItemPubDate :: Maybe DateString
- rssItemSource :: Maybe RSSSource
- rssItemAttrs :: [Attr]
- rssItemOther :: [Element]

#### Instances

Instances details

Show RSSItem # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSItem -> ShowS # show :: RSSItem -> String # showList :: [RSSItem] -> ShowS #

data RSSSource #

Constructors

RSSSource |

Fields

- rssSourceURL :: URLString
- rssSourceAttrs :: [Attr]
- rssSourceTitle :: Text

#### Instances

Instances details

Show RSSSource # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSSource -> ShowS # show :: RSSSource -> String # showList :: [RSSSource] -> ShowS #

data RSSEnclosure #

Constructors

RSSEnclosure |

Fields

- rssEnclosureURL :: URLString
- rssEnclosureLength :: Maybe Integer
- rssEnclosureType :: Text
- rssEnclosureAttrs :: [Attr]

#### Instances

Instances details

Show RSSEnclosure # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSEnclosure -> ShowS # show :: RSSEnclosure -> String # showList :: [RSSEnclosure] -> ShowS #

data RSSCategory #

Constructors

RSSCategory |

Fields

- rssCategoryDomain :: Maybe Text
- rssCategoryAttrs :: [Attr]
- rssCategoryValue :: Text

#### Instances

Instances details

Show RSSCategory # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSCategory -> ShowS # show :: RSSCategory -> String # showList :: [RSSCategory] -> ShowS #

data RSSGuid #

Constructors

RSSGuid |

Fields

- rssGuidPermanentURL :: Maybe Bool
- rssGuidAttrs :: [Attr]
- rssGuidValue :: Text

#### Instances

Instances details

Show RSSGuid # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSGuid -> ShowS # show :: RSSGuid -> String # showList :: [RSSGuid] -> ShowS #

data RSSImage #

Constructors

RSSImage |

Fields

- rssImageURL :: URLString
- rssImageTitle :: Text
- rssImageLink :: URLString
- rssImageWidth :: Maybe Integer
- rssImageHeight :: Maybe Integer
- rssImageDesc :: Maybe Text
- rssImageOther :: [Element]

#### Instances

Instances details

Show RSSImage # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSImage -> ShowS # show :: RSSImage -> String # showList :: [RSSImage] -> ShowS #

data RSSCloud #

Constructors

RSSCloud |

Fields

- rssCloudDomain :: Maybe Text
- rssCloudPort :: Maybe Text
- rssCloudPath :: Maybe Text
- rssCloudRegisterProcedure :: Maybe Text
- rssCloudProtocol :: Maybe Text
- rssCloudAttrs :: [Attr]

#### Instances

Instances details

Show RSSCloud # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSCloud -> ShowS # show :: RSSCloud -> String # showList :: [RSSCloud] -> ShowS #

data RSSTextInput #

Constructors

RSSTextInput |

Fields

- rssTextInputTitle :: Text
- rssTextInputDesc :: Text
- rssTextInputName :: Text
- rssTextInputLink :: URLString
- rssTextInputAttrs :: [Attr]
- rssTextInputOther :: [Element]

#### Instances

Instances details

Show RSSTextInput # |
Instance details Defined in Text.RSS.Syntax Methods showsPrec :: Int -> RSSTextInput -> ShowS # show :: RSSTextInput -> String # showList :: [RSSTextInput] -> ShowS #

nullRSS #

Arguments

:: Text | channel title
-> URLString | channel link
-> RSS |

nullChannel #

Arguments

:: Text | rssTitle
-> URLString | rssLink
-> RSSChannel |

nullItem #

Arguments

:: Text | title
-> RSSItem |

nullSource #

Arguments

:: URLString | source URL
-> Text | title
-> RSSSource |

nullEnclosure #

Arguments

:: URLString | enclosure URL
-> Maybe Integer | enclosure length
-> Text | enclosure type
-> RSSEnclosure |

newCategory #

Arguments

:: Text | category Value
-> RSSCategory |

nullGuid #

Arguments

:: Text | guid value
-> RSSGuid |

nullPermaGuid #

Arguments

:: Text | guid value
-> RSSGuid |

nullImage #

Arguments

:: URLString | imageURL
-> Text | imageTitle
-> URLString | imageLink
-> RSSImage |

nullCloud :: RSSCloud #

nullTextInput #

Arguments

:: Text | inputTitle
-> Text | inputName
-> URLString | inputLink
-> RSSTextInput |