Documentation (API v1.0)
Basic Flow in a RoamAbout App
When the user clicks the app icon in the tray, the following function gets called in the widgelet.
function App_handleClick() {
RoamAbout.getSelection(function(status, data, context)
{selectionReceived(status, data, context);}, null, 120);
return 0;
}
This will call the getSelection API in the RA platform to get the selected content in the document.
function selectionReceived(status, data, context) {
var query = "?keyword="+data
RoamAbout.createOverlay(function(status, data, context)
{overlayCreated(status, data, context);}, null, 500, 300, query);
}
This is the callback function in the getSelection API in the App_handleclick. So after receiving the current selection from RA platform, it will call the createOverlay API with query string, width and height.
RA will create the overlay with specified width and height and host the app URL in the overlay.


