Integration methods

Overview

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.

JS-loader

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.

JS-Loader

Wordpress Widget

  • 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.

Wordpress Plugin

Request - JSON

  • 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.

Request - JSON

Request - HTML

  • 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.

Request - HTML

IFRAME

  • For very quick integrations

  • Cons

    • Not easy to style from your side

    • Just basic functionality

IFrame

Vue.js

A simple Vue.js component wrapper for the JS loader

Vue.js

React

A simple react component wrapper for the JS loader

React

Last updated

Was this helpful?