digital object javascript API
api/do_api.js provides javascript methods to data objects in the XTF JSONP results
item = new do_api.Item(item);
if (typeof item.data !== 'undefined') {
var image = item.getImg();
var caption = item.caption();
var href = item.href();
}
-
class do_api.Item(json)
Arguments: |
- json – JSON returned from XTF
|
Returns: | digital library item object
|
-
item.getImg()
Returns: | href to image file |
-
item.caption()
Returns: | caption to the image (HTML fragment) |
-
item.thumbnail()
Returns: | href to thumbnail image |
-
item.href()
Returns: | cannonical URL for the object (HTML web page) |