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.
Build a new entry
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
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
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
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
build(entry)
Must be called once the entry is fully prepared
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
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
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(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
new(id, last_update_datetime, title, title_type \\ "text")
Build a new entry
published(entry, datetime)
Contains the time of the initial creation or first availability of the entry.
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
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