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.

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

Link to this function

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
Link to this function

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
Link to this function

author(feed, name, attributes \\ [])

Specs

author(t(), binary(), list()) :: t()

Add an author to the feed. See Atomex.Types.Person for accepted attributes

Link to this function

build(feed, attributes \\ %{})

Must be called before build_document, once the feed is fully prepared

Link to this function

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

Link to this function

contributor(feed, name, attributes \\ [])

Names one contributor to the feed. A feed may have multiple contributor elements.

See Atomex.Types.Person for accepted attributes

Link to this function

entries(feed, entries)

Specs

entries(t(), [Atomex.Entry.t()]) :: t()

Add given entries to the feed

Link to this function

generator(feed)

Identify feed generator. Default to Atomex with current version.

Parameters

  • attributes:
    • uri: Generator's URI
    • version: Generator's version
Link to this function

generator(feed, name, attributes \\ [])

Link to this function

icon(feed, uri)

Identifies a small image which provides iconic visual identification for the feed. Icons should be square.

Link to this function

link(feed, href, attributes \\ [])

Specs

link(t(), binary(), list()) :: t()

Add a link to the feed. See Atomex.Types.Link for accepted attributes

Link to this function

logo(feed, uri)

Identifies a larger image which provides visual identification for the feed. Images should be twice as wide as they are tall.

Link to this function

new(id, last_update_datetime, title, title_type \\ "text")

Specs

new(binary(), DateTime.t(), binary(), binary()) :: t()

Create a new feed

Link to this function

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

Link to this function

subtitle(entry, content, type \\ "text")

Contains a human-readable description or subtitle for the feed.

See Atomex.Types.Text for accepted types