Integration methods
Overview
Last updated
Was this helpful?
Overview
Last updated
Was this helpful?
There are several ways to integrate with the API. Most of the widgets can handle all of the integration methods, but there are some exceptions.
The JS-loader is the preferred way to integrate Datablocks widgets. It's basically a script wrapping (and executing) a function that takes as it's input a set of widget tokens and corresponding DOM-element selectors, then fetches the widgets and inserts them into the DOM-elements.
The MF Datablocks Wordpress Widget is a plugin which lets you add one (or multiple) Datablocks widgets to your Wordpress site.
It enables an easy way to embed various types of Datablocks data from MFN for a particular company, onto different sections of your site.
The API support JSON formatted responses.
This solution puts higher requirements on the integration since the data isn't formatted. It means you have to handle the locale, percent formation, signs for positives/negatives and so on.
The API support templated HTML responses.
This solution puts lower requirements on the integration since the data is formatted. This means you don't have to handle the locale, percent formation, signs for positives/negatives and so on.
Specific css-classes are also appended when needed.
For very quick integrations
Cons
Not easy to style from your side
Just basic functionality
A simple Vue.js component wrapper for the JS loader
A simple react component wrapper for the JS loader