Hi @Carlos062 ! Ebenezer here from Engineering Support👋.
Getting this built may require some developer muscle.
I can provide a rough outline of how this would look like 👇
document.getElementById('callApi1').addEventListener('click', function() {
callApi('YOUR_API_ENDPOINT_1');
});
document.getElementById('callApi2').addEventListener('click', function() {
callApi('YOUR_API_ENDPOINT_2');
function callApi(endpoint) {
fetch(endpoint, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
})
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok');
}
console.log('API call successful');
})
.catch(error => {
console.error('There was a problem with the API request:', error);
});
Hope this helps!