DAKboard can fetch data from other online sources via a URL. To use this feature, in the DAKboard options, under Custom Screen Settings, click the "Add a Block" button and select "External Data/Fetch". Resize/move the block as needed, then click the pencil icon to edit the block settings. Here you'll see a URL field where you can enter the URL of your text/JSON file.
The format of the data DAKboard is expecting should be one of the following formats:
DAKboard will fetch and display plain text from a URL:
Sales today: 176
DAKboard can also fetch a JSON object in name-value pair format like the following example:
After adding the URL in the Fetch block settings, you can then select which data points to show on DAKboard, and set a name and optionally a description and icon:
Save changes to the Fetch block, and it will appear on your DAKboard looking like this:
DAKboard can also fetch an array of JSON data formatted as follows:
Value is a required field. The title and subtitle are optional.
DAKboard supports fetching JSON data with the following authentication methods:
- Basic (username/password)
- Bearer Token
Custom Images from JSON Data
In the JSON block settings, you can enter another JSON field name into the "Icon Name" field to display an image from a URL that is part of the returned JSON:
The icon name should be appended with two underscores (__). If it's multiple levels deep in your JSON data, it would look like: levelOne__levelTwo__url
This adds the URL to an img tag and displays it on the screen. We gave it a class name of JSON-data-icon if you need to style it further in the custom CSS.
Also, just a note: that URL field could also contain a FontAwesome icon class name as well if you wanted to provide the class name and use the existing icon set.
DAKboard supports the additional formatting of data by both rounding and truncating:
#features #featurelist #json #fetch #externaldata