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

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

Text.RSS.Syntax

Contents

- Core Types
- Default Constructors:

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

# Core Types

data RSS Source

Constructors

RSS |

Fields

rssVersion :: String
rssAttrs :: [Attr]
rssChannel :: RSSChannel
rssOther :: [Element]

Instances

Show RSS |

type URLString = String Source

type DateString = String Source

RFC 822 conforming.

data RSSChannel Source

Constructors

RSSChannel |

Fields

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

  rfc 822 conforming.

rssLastUpdate :: Maybe DateString

  rfc 822 conforming.

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

Instances

Show RSSChannel |

data RSSItem Source

Constructors

RSSItem |

Fields

rssItemTitle :: Maybe String
rssItemLink :: Maybe URLString
rssItemDescription :: Maybe String

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

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

Instances

Show RSSItem |

data RSSSource Source

Constructors

RSSSource |

Fields

rssSourceURL :: URLString
rssSourceAttrs :: [Attr]
rssSourceTitle :: String

Instances

Show RSSSource |

data RSSEnclosure Source

Constructors

RSSEnclosure |

Fields

rssEnclosureURL :: URLString
rssEnclosureLength :: Maybe Integer
rssEnclosureType :: String
rssEnclosureAttrs :: [Attr]

Instances

Show RSSEnclosure |

data RSSCategory Source

Constructors

RSSCategory |

Fields

rssCategoryDomain :: Maybe String
rssCategoryAttrs :: [Attr]
rssCategoryValue :: String

Instances

Show RSSCategory |

data RSSGuid Source

Constructors

RSSGuid |

Fields

rssGuidPermanentURL :: Maybe Bool
rssGuidAttrs :: [Attr]
rssGuidValue :: String

Instances

Show RSSGuid |

data RSSImage Source

Constructors

RSSImage |

Fields

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

Instances

Show RSSImage |

data RSSCloud Source

Constructors

RSSCloud |

Fields

rssCloudDomain :: Maybe String
rssCloudPort :: Maybe String
rssCloudPath :: Maybe String
rssCloudRegister :: Maybe String
rssCloudProtocol :: Maybe String
rssCloudAttrs :: [Attr]

Instances

Show RSSCloud |

data RSSTextInput Source

Constructors

RSSTextInput |

Fields

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

Instances

Show RSSTextInput |

# Default Constructors:

nullRSS Source

Arguments

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

nullChannel Source

Arguments

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

nullItem Source

Arguments

:: String | title
-> RSSItem |

nullSource Source

Arguments

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

nullEnclosure Source

Arguments

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

newCategory Source

Arguments

:: String | category Value
-> RSSCategory |

nullGuid Source

Arguments

:: String | guid value
-> RSSGuid |

nullPermaGuid Source

Arguments

:: String | guid value
-> RSSGuid |

nullImage Source

Arguments

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

nullCloud :: RSSCloud Source

nullTextInput Source

Arguments

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