|
|
webresizer - APIAdvanced IntegrationThis section is suitable if you are comfortable writing your own javascript. The most commonly used features of the API (e.g. replacing duck with a custom image) are all available in the Quick Start API parameters. If you are not experienced with javascript use the Quick Start API Guide and you won't have to worry about getting the {}:;'' in the right place! The following sections outline the currently available features for advanced integration using the webresizer API:
Object NotationTo use the API object notation you first need to create a new Object named 'webresizerAPI'. var webresizerAPI = new Object; Now that you have the webresizerAPI object you can add properties as required. Use optional API parameters to customize webresizer to suit your needs ... API ParametersAll of the Quick Start API parameters are also available using object notation by adding the property parameters to the webresizerAPI object. Simply remove the prefix 'webresizer_' when using object notation. For example, the below script produces an identical result to the Quick Start example shown earlier. <script type="text/javascript">
var webresizerAPI = new Object;
webresizerAPI.parameters = {
apikey : 'your API Key here',
language : 'en'
};
</script>
<script type="text/javascript"
src="http://api.webresizer.com/ext/js/webresizer_api.js">
</script>
Any parameters defined using object notation will take precedence over values defined using the Quick Start variables. Customizing the Tool PaletteThe following properites may be used to customize the webresizer tool palette:
Please note each API key is unique and authenticated for use on your domain only. The API will not work if you attempt to use someone elses API key or cut and paste the demo API key ... you'll need to sign up first! |