Webanizr Logo
Open / sluit menu
Module callApi

The callApi module retreives data from an external server. It calls the given url as a GET request. It can be used to retreive data from static sources or simple rest APIs.


webanizr.collect('callApi', parameters, callback)


The callApi module accepts one parameter:

url__api (required)

The url of the static source or simple API. The URL should return valid JSON data.

type__caching (optional)

This parameter only accepts one value: "inmodule". If this value is present, the json is cached and the url will no longer be used to retreive the data. The cache is cleared when reloading the page.

If this parameter is omitted no caching is applied.


This callback function is called when the data is retrieved. The function gets the retreived data as parameter. If the retreival of the data results in an error the callback function is not called.