WSO2 Mashup Server, Atom Publishing Protocol (APP) Host Object Guide
This document describes the set of host objects available for publishing using the Atom Publishing Protocol (APP).
1.0 Introduction
The APP implementation consists of three main host objects, namely AtomFeed, AtomEntry and APPClient.
1.1 AtomFeed
The "AtomFeed" host object serves as the top level element of an Atom Feed Document, acting as a container for meta data and data associated with the feed. Its element children consist of meta data elements followed by zero or more "AtomEntry" child elements.
1.2 AtomEntry
The "AtomEntry" host object represents an individual entry, acting as a container for meta data and data associated with the entry. This element can appear as a child of the "AtomFeed" element, or it can appear as the document (i.e., top-level) element of a stand-alone Atom Entry Document.
1.3 APPClient
The "APPClient" host object acts as a client to an APP server. It is capable of authenticating using the given credentials and performing HTTP operations GET, POST, PUT and DELETE.
2.0 Examples
// Creating an instance of APPClient
var client = new APPClient();
// Creating an instance of AtomFeed
var feed = new AtomFeed();
// Setting login credentials for the client
client.credentials={username:"you@email.com",password:"xxx",service:"blogger",authtype:"google"};
// Retrieving and online feed
feed = client.getFeed("http://www.blogger.com/feeds/000/posts/full/000");
// Getting an array of individual entries from the feed
var entries = new Array();
entries = feed.getEntries();
// Writing the retrieved feed to a file
feed.writeTo("my-file-name.xml");
3.0 References
- JavaDoc for the AtomFeed host Object
- JavaDoc for the AtomEntry host Object
- JavaDoc for the APPClient host Object