Atomex.Feed (atomex v0.5.1)
Represent an Atom feed. Embed many Atomex.Entry
Link to this section Summary
Functions
Add a custom field to the feed
Add a custom field to the feed
Add an author to the feed. See Atomex.Types.Person
for accepted attributes
Must be called before build_document, once the feed is fully prepared
Specifies a category that the feed belongs to. A feed may have multiple category elements.
Names one contributor to the feed. A feed may have multiple contributor elements.
Add given entries to the feed
Identify feed generator. Default to Atomex with current version.
Identifies a small image which provides iconic visual identification for the feed. Icons should be square.
Add a link to the feed. See Atomex.Types.Link
for accepted attributes
Identifies a larger image which provides visual identification for the feed. Images should be twice as wide as they are tall.
Create a new feed
Conveys information about rights, e.g. copyrights, held in and over the feed.
Contains a human-readable description or subtitle for the feed.
Link to this section Types
Specs
t() :: list()
Link to this section Functions
add_field(feed, xml_element)
Add a custom field to the feed
Parameters
- feed: The feed to which you want to add a field
- xml_element: An xml element as returned by
XmlBuilder.element/3
add_field(feed, tag, attributes, content)
Add a custom field to the feed
Parameters
- feed: The feed to which you want to add a field
- tag: String or atom with the name of the tag
- attributes: A map of attributes
- content: String, or list of xml_elements as created
by
XmlBuilder.element/3
author(feed, name, attributes \\ [])
Specs
Add an author to the feed. See Atomex.Types.Person
for accepted attributes
build(feed, attributes \\ %{})
Must be called before build_document, once the feed is fully prepared
category(feed, term, attributes \\ [])
Specifies a category that the feed belongs to. A feed may have multiple category elements.
See Atomex.Types.Category
for accepted attributes
contributor(feed, name, attributes \\ [])
Names one contributor to the feed. A feed may have multiple contributor elements.
See Atomex.Types.Person
for accepted attributes
entries(feed, entries)
Specs
entries(t(), [Atomex.Entry.t()]) :: t()
Add given entries to the feed
generator(feed)
Identify feed generator. Default to Atomex with current version.
Parameters
- attributes:
- uri: Generator's URI
- version: Generator's version
generator(feed, name, attributes \\ [])
icon(feed, uri)
Identifies a small image which provides iconic visual identification for the feed. Icons should be square.
link(feed, href, attributes \\ [])
Specs
Add a link to the feed. See Atomex.Types.Link
for accepted attributes
logo(feed, uri)
Identifies a larger image which provides visual identification for the feed. Images should be twice as wide as they are tall.
new(id, last_update_datetime, title, title_type \\ "text")
Specs
new(binary(), DateTime.t(), binary(), binary()) :: t()
Create a new feed
rights(feed, content, type \\ "text")
Conveys information about rights, e.g. copyrights, held in and over the feed.
See Atomex.Types.Text
for accepted types
subtitle(entry, content, type \\ "text")
Contains a human-readable description or subtitle for the feed.
See Atomex.Types.Text
for accepted types