Atomex.Entry (atomex v0.5.1)

A feed entry

Link to this section Summary

Functions

Add a custom field to the entry

Add a custom field to the entry

Names one author of the entry. An entry may have multiple authors. An entry must contain at least one author element unless there is an author element in the enclosing feed, or there is an author element in the enclosed source element.

Must be called once the entry is fully prepared

Specifies a category that the entry belongs to. A entry may have multiple category elements.

Contains or links to the complete content of the entry. Content must be provided if there is no alternate link, and should be provided if there is no summary.

Names one contributor to the entry. An entry may have multiple contributor elements.

Identifies a related Web page. The type of relation is defined by the rel attribute. An entry is limited to one alternate per type and hreflang. An entry must contain an alternate link if there is no content element.

Contains the time of the initial creation or first availability of the entry.

Conveys information about rights, e.g. copyrights, held in and over the entry.

Conveys a short summary, abstract, or excerpt of the entry. Summary should be provided if there either is no content provided for the entry, or that content is not inline (i.e., contains a src attribute), or if the content is encoded in base64.

Link to this section Types

Specs

t() :: list()

Link to this section Functions

Link to this function

add_field(entry, xml_element)

Add a custom field to the entry

Parameters

  • entry: The entry 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(entry, tag, attributes, content)

Add a custom field to the entry

Parameters

  • entry: The entry 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(entry, name, attributes \\ [])

Names one author of the entry. An entry may have multiple authors. An entry must contain at least one author element unless there is an author element in the enclosing feed, or there is an author element in the enclosed source element.

See Atomex.Types.Person for accepted attributes

Must be called once the entry is fully prepared

Link to this function

category(entry, term, attributes \\ [])

Specifies a category that the entry belongs to. A entry may have multiple category elements.

See Atomex.Types.Category for accepted attributes

Link to this function

content(entry, content \\ "", attributes \\ [])

Contains or links to the complete content of the entry. Content must be provided if there is no alternate link, and should be provided if there is no summary.

See Atomex.Types.Content for accepted attributes

Link to this function

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

Names one contributor to the entry. An entry may have multiple contributor elements.

See Atomex.Types.Person for accepted attributes

Link to this function

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

Identifies a related Web page. The type of relation is defined by the rel attribute. An entry is limited to one alternate per type and hreflang. An entry must contain an alternate link if there is no content element.

See Atomex.Types.Link for accepted attributes

Link to this function

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

Build a new entry

Link to this function

published(entry, datetime)

Contains the time of the initial creation or first availability of the entry.

Link to this function

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

Conveys information about rights, e.g. copyrights, held in and over the entry.

See Atomex.Types.Text for accepted types

Link to this function

summary(entry, summary, type \\ "text")

Conveys a short summary, abstract, or excerpt of the entry. Summary should be provided if there either is no content provided for the entry, or that content is not inline (i.e., contains a src attribute), or if the content is encoded in base64.

See Atomex.Types.Text for accepted types