-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | JSON Feed
--
-- This is an implementation of the JSON Feed spec in Haskell. The spec
-- is available at https://jsonfeed.org. JSON Feed is similar to
-- the Atom and RSS feed formats, but it is serialized as JSON rather
-- than XML.
@package json-feed
@version 1.0.4
-- | https://jsonfeed.org
module JsonFeed
parseFeed :: ByteString -> Either String Feed
renderFeed :: Feed -> ByteString
data Feed
Feed :: Maybe Author -> Maybe Text -> Maybe Bool -> Maybe Url -> Maybe Url -> Maybe Url -> Maybe [Hub] -> Maybe Url -> [Item] -> Maybe Url -> Text -> Maybe Text -> Url -> Feed
-- | The feed author. The author object has several members. These are all
-- optional --- but if you provide an author object, then at least one is
-- required.
[feedAuthor] :: Feed -> Maybe Author
-- | Provides more detail, beyond the title, on what the feed is about. A
-- feed reader may display this text.
[feedDescription] :: Feed -> Maybe Text
-- | Says whether or not the feed is finished --- that is, whether or not
-- it will ever update again. A feed for a temporary event, such as an
-- instance of the Olympics, could expire. If the value is True,
-- then it's expired. Any other value, or the absence of
-- feedExpired, means the feed may continue to update.
[feedExpired] :: Feed -> Maybe Bool
-- | The URL of an image for the feed suitable to be used in a source list.
-- It should be square and relatively small, but not smaller than 64 x 64
-- (so that it can look good on retina displays). As with
-- feedIcon, this image should use transparency where appropriate,
-- since it may be rendered on a non-white background.
[feedFavicon] :: Feed -> Maybe Url
-- | The URL of the feed, and serves as the unique identifier for the feed.
-- As with feedHomePageUrl, this should be considered required for
-- feeds on the public web.
[feedFeedUrl] :: Feed -> Maybe Url
-- | The URL of the resource that the feed describes. This resource may or
-- may not actually be a "home" page, but it should be an HTML page. If a
-- feed is published on the public web, this should be considered as
-- required. But it may not make sense in the case of a file created on a
-- desktop computer, when that file is not shared or is shared only
-- privately.
[feedHomePageUrl] :: Feed -> Maybe Url
-- | Describes endpoints that can be used to subscribe to real-time
-- notifications from the publisher of this feed. Each object has a type
-- and URL, both of which are required.
[feedHubs] :: Feed -> Maybe [Hub]
-- | The URL of an image for the feed suitable to be used in a timeline,
-- much the way an avatar might be used. It should be square and
-- relatively large --- such as 512 x 512 --- so that it can be
-- scaled-down and so that it can look good on retina displays. It should
-- use transparency where appropriate, since it may be rendered on a
-- non-white background.
[feedIcon] :: Feed -> Maybe Url
-- | An array of objects that describe each object in the list.
[feedItems] :: Feed -> [Item]
-- | The URL of a feed that provides the next n items, where
-- n is determined by the publisher. This allows for pagination,
-- but with the expectation that reader software is not required to use
-- it and probably won't use it very often. feedNextUrl must not
-- be the same as feedFeedUrl, and it must not be the same as a
-- previous feedNextUrl (to avoid infinite loops).
[feedNextUrl] :: Feed -> Maybe Url
-- | The name of the feed, which will often correspond to the name of the
-- website (blog, for instance), though not necessarily.
[feedTitle] :: Feed -> Text
-- | A description of the purpose of the feed. This is for the use of
-- people looking at the raw JSON, and should be ignored by feed readers.
[feedUserComment] :: Feed -> Maybe Text
-- | The URL of the version of the format the feed uses.
[feedVersion] :: Feed -> Url
data Author
Author :: Maybe Url -> Maybe Text -> Maybe Url -> Author
-- | The URL for an image for the author. As with icon, it should be square
-- and relatively large --- such as 512 x 512 --- and should use
-- transparency where appropriate, since it may be rendered on a
-- non-white background.
[authorAvatar] :: Author -> Maybe Url
-- | The author's name.
[authorName] :: Author -> Maybe Text
-- | The URL of a site owned by the author. It could be a blog, micro-blog,
-- Twitter account, and so on. Ideally the linked-to page provides a way
-- to contact the author, but that's not required. The URL could be a
-- mailto: link, though we suspect that will be rare.
[authorUrl] :: Author -> Maybe Url
data Item
Item :: Maybe [Attachment] -> Maybe Author -> Maybe Url -> Maybe Html -> Maybe Text -> Maybe UTCTime -> Maybe UTCTime -> Maybe Url -> Value -> Maybe Url -> Maybe Text -> Maybe [Text] -> Maybe Text -> Maybe Url -> Item
-- | Lists related resources. Podcasts, for instance, would include an
-- attachment that's an audio or video file.
[itemAttachments] :: Item -> Maybe [Attachment]
-- | Has the same structure as the top-level feedAuthor. If not
-- specified in an item, then the top-level author, if present, is the
-- author of the item.
[itemAuthor] :: Item -> Maybe Author
-- | The URL of an image to use as a banner. Some blogging systems (such as
-- Medium) display a different banner image chosen to go with each post,
-- but that image wouldn't otherwise appear in the content_html. A feed
-- reader with a detail view may choose to show this banner image at the
-- top of the detail view, possibly with the title overlaid.
[itemBannerImage] :: Item -> Maybe Url
-- | itemContentHtml and itemContentText are each optional
-- strings --- but one or both must be present. This is the HTML or plain
-- text of the item. Important: the only place HTML is allowed in this
-- format is in itemContentHtml. A Twitter-like service might use
-- itemContentText, while a blog might use itemContentHtml.
-- Use whichever makes sense for your resource. (It doesn't even have to
-- be the same for each item in a feed.)
[itemContentHtml] :: Item -> Maybe Html
-- | See itemContentHtml.
[itemContentText] :: Item -> Maybe Text
-- | Specifies the modification date in RFC 3339 format.
[itemDateModified] :: Item -> Maybe UTCTime
-- | Specifies the date in RFC 3339 format. (Example:
-- 2010-02-07T14:04:00-05:00.)
[itemDatePublished] :: Item -> Maybe UTCTime
-- | The URL of a page elsewhere. This is especially useful for linkblogs.
-- If itemUrl links to where you're talking about a thing, then
-- itemExternalUrl links to the thing you're talking about.
[itemExternalUrl] :: Item -> Maybe Url
-- | Unique for the item in the feed over time. If an item is ever updated,
-- the ID should be unchanged. New items should never use a
-- previously-used ID. If an ID is presented as a number or other type, a
-- JSON Feed reader must coerce it to a string. Ideally, the ID is the
-- full URL of the resource described by the item, since URLs make great
-- unique identifiers.
[itemId] :: Item -> Value
-- | The URL of the main image for the item. This image may also appear in
-- the itemContentHtml --- if so, it's a hint to the feed reader
-- that this is the main, featured image. Feed readers may use the image
-- as a preview (probably resized as a thumbnail and placed in a
-- timeline).
[itemImage] :: Item -> Maybe Url
-- | A plain text sentence or two describing the item. This might be
-- presented in a timeline, for instance, where a detail view would
-- display all of itemContentHtml or itemContentText.
[itemSummary] :: Item -> Maybe Text
-- | Can have any plain text values you want. Tags tend to be just one
-- word, but they may be anything. Note: they are not the equivalent of
-- Twitter hashtags. Some blogging systems and other feed formats call
-- these categories.
[itemTags] :: Item -> Maybe [Text]
-- | Plain text. Microblog items in particular may omit titles.
[itemTitle] :: Item -> Maybe Text
-- | The URL of the resource described by the item. It's the permalink.
-- This may be the same as the ID --- but should be present regardless.
[itemUrl] :: Item -> Maybe Url
data Attachment
Attachment :: Maybe Natural -> Mime -> Maybe Natural -> Maybe Text -> Url -> Attachment
-- | Specifies how long it takes to listen to or watch, when played at
-- normal speed.
[attachmentDurationInSeconds] :: Attachment -> Maybe Natural
-- | Specifies the type of the attachment, such as audio/mpeg.
[attachmentMimeType] :: Attachment -> Mime
-- | Specifies how large the file is.
[attachmentSizeInBytes] :: Attachment -> Maybe Natural
-- | Is a name for the attachment. Important: if there are multiple
-- attachments, and two or more have the exact same title (when title is
-- present), then they are considered as alternate representations of the
-- same thing. In this way a podcaster, for instance, might provide an
-- audio recording in different formats.
[attachmentTitle] :: Attachment -> Maybe Text
-- | Specifies the location of the attachment.
[attachmentUrl] :: Attachment -> Url
data Hub
Hub :: Text -> Url -> Hub
[hubType] :: Hub -> Text
[hubUrl] :: Hub -> Url
newtype Html
Html :: [Tag Text] -> Html
[htmlValue] :: Html -> [Tag Text]
newtype Mime
Mime :: MimeType -> Mime
[mimeValue] :: Mime -> MimeType
newtype Url
Url :: URI -> Url
[urlValue] :: Url -> URI
instance GHC.Show.Show JsonFeed.Feed
instance GHC.Generics.Generic JsonFeed.Feed
instance GHC.Classes.Eq JsonFeed.Feed
instance GHC.Show.Show JsonFeed.Item
instance GHC.Generics.Generic JsonFeed.Item
instance GHC.Classes.Eq JsonFeed.Item
instance GHC.Show.Show JsonFeed.Author
instance GHC.Generics.Generic JsonFeed.Author
instance GHC.Classes.Eq JsonFeed.Author
instance GHC.Show.Show JsonFeed.Attachment
instance GHC.Generics.Generic JsonFeed.Attachment
instance GHC.Classes.Eq JsonFeed.Attachment
instance GHC.Show.Show JsonFeed.Hub
instance GHC.Generics.Generic JsonFeed.Hub
instance GHC.Classes.Eq JsonFeed.Hub
instance GHC.Show.Show JsonFeed.Url
instance GHC.Classes.Eq JsonFeed.Url
instance GHC.Show.Show JsonFeed.Mime
instance GHC.Classes.Eq JsonFeed.Mime
instance GHC.Show.Show JsonFeed.Html
instance GHC.Classes.Eq JsonFeed.Html
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Feed
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Feed
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Item
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Item
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Author
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Author
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Attachment
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Attachment
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Hub
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Hub
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Url
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Url
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Mime
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Mime
instance Data.Aeson.Types.FromJSON.FromJSON JsonFeed.Html
instance Data.Aeson.Types.ToJSON.ToJSON JsonFeed.Html