1 Atom Documents and Resources
Many web services use the
Atom Syndication
Format. This library provides utilities for manipulating Atom
documents and resources represented with Atom documents.
1.1 Atom Documents
An Atom document is represented by an atom<%>
object. Specifically, an atom<%> object is a thin, immutable
wrapper around the SXML representation of an Atom document. The
wrapper object provides methods for accessing some common Atom
elements and attributes, but most nontrivial operations must be done
on the underlying SXML.
Returns an
atom<%> object encapsulating the given Atom
document.
Represents an Atom document. Obtain an instance via
atom.
Returns #t if the Atom document is a feed element,
#f if it is an entry element. Note that the same
resource can be represented in one context as a feed and in another
as an entry.
Returns the encapsulated SXML document.
Returns the contents of the document’s id element.
Returns the contents of the document’s title element.
Returns the contents of the document’s updated element (a
timestamp in string form).
Returns the value of the link having relation (rel
attribute) rel. If no such link is found, default
is applied if it is a procedure or returned otherwise.
Returns the link element having relation (rel attribute)
rel. If no such link is found, default is applied
if it is a procedure or returned otherwise.
If the document is a
feed, returns the list of its entries as
atom<%> objects. If the document is an
entry, returns
'().
If the document is a feed, returns the list of its entry
elements. If the document is an entry, returns '().
Returns the text content of the (first) element named
tag among the immediate children of the Atom document’s
root element. If no such element exists, default is applied
if it is a procedure or returned otherwise.
1.2 Atom Resources
An atom-resource<%> object represents a resource (such as a
blog or photo album) that is represented and manipulated via Atom
documents.
Represents an Atom-backed resource. Consult the documentation for
specific web services for information on obtaining instances.
Gets the Atom document describing the resource. If reload?
is false, a cached version may be used (but the cached version may
be out-of-date); otherwise, the document is refetched from the
server.
Many resources have descriptions both as Atom feeds and Atom
entries. The
get-atom method may return
either one, depending on which is cached. See also
get-feed-atom.
Like
get-atom, but always gets the Atom
feed describing the resource, if one exists.
Gets the SXML of the resource’s Atom description.
Gets the id of the resource’s Atom description.
Gets the title of the resource’s Atom description.
Represents a resource backed by an Atom feed. Consult the
documentation for specific web services for information on obtaining
instances.
Returns a list of the resource’s entries.
Returns a list of the resource’s entries having the
title title. (Titles are not required to be unique.)
Returns the resource’s first entry having the title
title. If no such entry exists, #f is returned.
Returns the resource’s entry having the identifier id. If
no such entry exists, #f is returned.