About EnterMedia
Get EnterMedia
Support EnterMedia
|
Basic REST API
EnterMedia now has the beginnings of a REST API using JQuery. As of right now, we have only implemented retrieving the list of catalogs in EnterMedia, but it should be easy to extend and we plan on adding much more to the API in the near future.
Client Side
- Load the catalog list into the selected DIV:
<script type="text/javascript" src="$home/openedit/javascript/jquery-1.3.2.js"> jQuery.noConflict(); </script>
<script type="text/javascript" src="$home/media/tools/jquery.entermedia.js"> </script>
<div id="showcatalogs">
</div>
<script>
jQuery(document).ready(function()
{
var appid = "media";
jQuery("#showcatalogs").entermedia({ action: 'listcatalogs',appid: appid });
});
</script>
- Perform a asset search and load the results list into the selected DIV:
<script type="text/javascript" src="/openedit/javascript/jquery-1.3.2.js"> jQuery.noConflict(); </script>
<script type="text/javascript" src="/media/tools/jquery.entermedia.js"> </script>
<div id="showcatalogs">
</div>
<script>
jQuery(document).ready(function()
{
var appid = "media";
jQuery("#showcatalogs").entermedia({ action: 'search',appid: appid });
});
</script>
Server Side
The server side is located in the entermedia/services/rest folder. Each client action has to match an xml file of the same name. For example in our above code we use 'listcatalogs' which corresponds to entermedia/services/rest/listcatalogs.xml.
Last Updated: Thu Jan 21 09:36:27 EST 2010
|