API Home       Error Codes       Your API Keys

imageloop API - JavaScript/HTTP-Client language library



The JavaScript language library works with the following browsers:

  • Firefox 1.5
  • Mozilla 1.7
  • Microsoft Internet Explorer 6
  • Opera 8.5


Demos

Demo 1 - Live demonstration for basic functions

Demo 2 - Live demonstration of a looop and image viewer

Demo 3 - Live demonstration of an image meta data editor

Demo 4 - Live demonstration of another image viewer

Demo 5 - Content upload demonstration



Using the library



1. Add imageloop API proxy server script to your web site

The imageloop JavaScript library uses AJAX (XMLHttpRequest resp. Microsoft.XMLHTTP resp. Msxml2.XMLHTTP) to communicate with the server. This technology does only allow the code to request information from the same domain. So we implemented some proxy code, that runs on your web server and forwards all requests to imageloop.com.



Adding the proxy to your web site is just adding a new server executable script (downloads: ASP.NET or JSP or PHP (*)) to your web site or web application.

Downloads:
imageloop API proxy for ASP.NET
imageloop API proxy for JSP
imageloop API proxy for PHP (see note *)



2. Add JavaScript code to your web pages

To use the imageloop JavaScript library in your own HTML files, you just need to include two JavaScript files from our web server. Please do always load these JavaScript files from our webserver and not from your site to ensure, that you will always use the latest version of our library on your web site.



<script src="http://www.imageloop.com/js/behaviour/prototype.js"></script>
<script src="http://www.imageloop.com/js/api/il-api.js"></script>
<script>
// construct the main object and provide the API-key
var il = new Imagelooop.Main("INSERT-YOUR-API-KEY-HERE");
// set the location of your proxy script
// for example: http://www.mydomain.de/il-proxy/il-api-proxy.jsp
// or: http://www.mydomain.de/il-proxy/il-api-proxy.aspx
il.baseUrl="URL-OF-PROXY-CODE"; </script>



3. Start developing your imageloop application

After this initialization code you can use the il object to inquire, create, modify and delete looops and images.



You can view the JavaScript libaray source code to see all objects, functions and properties and in-line documentation.



Note: You can only use your API-Key from web pages that come from the domain that you have registered using the API-Key generation tool. Otherwise our server will refuse all request and indicate an invalid API-Key.


Local Development

To develop your web pages that use our library you cannot use the imageloop JavaScript library from web pages, that have been loaded from your local hard drive (for example URLs starting with file:/// or C:\). But you can register an API-Key for the domain "localhost" and test with a web server running on your local machine.




* = The PHP proxy cannot tunnel all API methods to the imageloop server due to limitations in PHP by design. PHP does not allow scripts to access the complete HTTP POST data (please inform me if you know how I can access the POST data from a PHP script).