Free: API trustatrader.com

Request via wordpress.org: “no feed coming through”

Question: “Can’t get raw data from this feed to show up at all. Not sure what I am missing: https://www.trustatrader.com/api/consumer-reviews?username=CWYAONE&format=json

I saved this JSON to http://api.json-content-importer.com/extra/json/blog/trustatrader_com.json to have this example independent from external sites.

How to add this data to a WordPress page?
My way: Create a new page and add a “JSON Content Importer Free”-Block.

There use the above URL and switch on the debug mode.
Open https://jsoneditoronline.org in a new Browser-Tab and copypaste the JSON there: You’ll see that “consumer_reviews_api” is the wrapping name. Use this as basenode in the Block.
You also see a object “trader” with the item “reviews”.
With the Gutenberg-Block you can try templates and you see at once if it’s working or not:


The syntax of the free plugin-template is

{subloop:trader:-1}
company_name: {company_name}
{/subloop:trader}

Similar it is with the array “reviews”. Hence the syntax is

{subloop-array:reviews:-1}
reviewer_name: {reviewer_name}<br>
{/subloop-array:reviews}

So the whole shortcode is (if you don’T want to have a Gutenberg-Block):

[jsoncontentimporter url=http://api.json-content-importer.com/extra/json/blog/trustatrader_com.json numberofdisplayeditems=-1 basenode=consumer_reviews_api urlgettimeout=5]
{subloop:trader:-1}
company_name: {company_name}
{/subloop:trader}<br>
{subloop-array:reviews:-1}
reviewer_name: {reviewer_name}<br>
{/subloop-array:reviews}
[/jsoncontentimporter]

In Action:

company_name: C Wyatt Gas Services
reviewer_name: Nick Digman
reviewer_name: Rob Selby
reviewer_name: Chris Swinburn
reviewer_name: Sam Sophie
reviewer_name: S Ho

PRO & Free, Gutenberg: API raw.githubusercontent.com

Via wordpress.org the question came in on how to use raw.githubusercontent.com… (see also here) with the free plugin.

Free JCI:

[jsoncontentimporter url=https://raw.githubusercontent.com/signorejambo/tank-stock/master/tank-life.json numberofdisplayeditems=-1 basenode=tank]
fish: {subloop-array:fish:-1}quantity: {fish.quantity}<br>{/subloop-array:fish}
plants: {subloop-array:plants:-1}species: {plants.species}<br>{/subloop-array:plants}
[/jsoncontentimporter]

Another Free-Way is via the JCI-Gutenberg-Block (part of the free JCI):


PRO JCI:

{% for level_4_item in _context['tank']['fish'] %} 
quantity = {{ level_4_item['quantity'] }} 
species = {{ level_4_item['species'] }} 
{% endfor %} 
{% for level_4_item in _context['tank']['plants'] %} 
species = {{ level_4_item['species'] }} 
latin = {{ level_4_item['latin'] }}
{% endfor %} 
{% for level_4_item in _context['tank']['heaven'] %} 
quantity = {{ level_4_item['quantity'] }} 
species = {{ level_4_item['species'] }} 
reason = {{ level_4_item['reason'] }} 
{% endfor %}

Free: API www.veterans.gc.ca

1917-05-20 00:00:00.0: 54121, John Roy Gamble
1917-05-20 00:00:00.0: 54501, Stanley Milton
1917-05-20 00:00:00.0: 53752, John Baker

Gutenberg-Block using these settings:

{subloop-array:days:3}
{DATE_OF_DEATH}: {CASUALTY}, {FORENAMES} {SURNAME}<br>
{/subloop-array:days}

JCI-Template:

[jsoncontentimporter url=https://www.veterans.gc.ca/xml/jsonp/app.cfc?method=remoteGetHonourRoll&amp;language=en]{subloop-array:days:-1}
{DATE_OF_DEATH}: {CASUALTY}, {FORENAMES} {SURNAME}<br>
{/subloop-array:days}[/jsoncontentimporter]

Free: Basic JCI-Gutenberg-Block usage

Task, Show some weathedata on a page with the JCI-Gutenberg-Block

Load Gutenberg-Block “JSON Content Importer FREE” e .g. by searching the Blocks by “json”:

stationID: {stationID}}<br>
neighborhood: {neighborhood}
{subloop:metric:-1}
Station: {metric.stationID}<br>
Ort: {metric.neighborhood}<br>
Luftfeuchtigkeit: {metric.humidity} %<br>
Temperatur: {metric.temp} °C<br>
Taupunkt: {metric.dewpt} °C<br>
Wind: {metric.windspeed} km/h<br>
Windboen: {metric.windgust}km/h<br>
Luftdruck: {metric.pressure} hpa<br>
Niederschlag: {metric.precipRate} mm<br>
{/subloop:metric}

In Action:

stationID: IARGEN42}
neighborhood: EisenharzStation:
Ort:
Luftfeuchtigkeit: %
Temperatur: 22 °C
Taupunkt: 13 °C
Wind: 0 km/h
Windboen: 0km/h
Luftdruck: 1013.88 hpa
Niederschlag: 0 mm

Free Plugin: api.wordpress.org/events with Gutenberg-Block

With http://api.wordpress.org/events/1.0/?latitude=47.496&longitude=8.226 you can display the next WordPress-Events arround a geoposition. This can be displayed with the free plugin this way:

Create a new page with Gutenberg active. Insert the above URL into the Blocks API-URL. The “basenode” is “events”.
The template is:

<a href={url} target=_blank>{title}</a><br>{date}
<br>{subloop:location:-1}
<a href=https://www.google.com/maps?q={location.latitude}+{location.longitude}targt=_blank>{location.location}</a><hr>
{/subloop:location}

 

Screenshot of the Block-Settings:

Example in Action: Additional set “Number of json-top-level-items to display” to 2.

If you want to format the date you need the pro plugin.

In Action via Gutenberg-Block: