test json addon:
No URL defined: Check the shortcode – one typical error: is there a blank after url= ? DEBUG: wp_remote_get to https://api1.testplug.events/api1/embed/embed1?token=cbaabaee-fb65-4f3c-b2e4-435b81ae6186
DEBUG: arguments: Array ( [timeout] => 5 )
DEBUG: error getting URL:cURL error 6: Could not resolve host: api1.testplug.events
DEBUG: no data received: check url of json-feed
API-Server does not answer:
cURL error 6: Could not resolve host: api1.testplug.events
Please check the API URL in the block!
Next 30 days in Json
const opts = {mode:’cors’,headers:{allow:’application/json’}}
const eventRoot = document.getElementById(‘events’);
fetch(‘https://api1.plug.events/api1/embed/embed1?token=cbaabaee-fb65-4f3c-b2e4-435b81ae6186’, opts)
.then((r) => r.json().then((data) => {
data.events.forEach((e) => {
const eventEl = document.createElement(‘div’);
eventEl.append(e.name + ‘ will be held on ‘ + e.timeDisplay);
eventRoot.append(eventEl);
}); }));