Skip to content
eschnou edited this page Mar 6, 2011 · 1 revision

ActivityStreams is a format for syndicating social activities around the web. It started as an extension to Atom, but now also provide a JSON serialization of activities. Spec: http://activitystrea.ms/

fromUrl(url, callback)

Attempt to retrieve an Atom feed from the given URL and returns a JSON serialization of the parsed feed to the callback.

Note: The current version only provides mapping for some basic elements. More work need to be done.

TODO: Add an example

fromXml(xml, callback)

Parse a string containing an XML representation of an Atom feed and returns a JSON serialization of the parsed feed to the callback.

Note: The current version only provides mapping for some basic elements. More work need to be done.

TODO: Add an example

render(hostname, activities, profile, callback)

Produces an Atom feed XML from the provided input. In practice, it uses the input to render the updates.xml.mu template. The activities argument is an array of JSON serialized activities. The profile is a JSON version of the user HCard.