generate functionMon, 27 Mar 2023

Una web que lea una API de cómics

const url = 'https://cors-anywhere.herokuapp.com/https://comicvine.gamespot.com/api/' const key = 'c8869ee6b0c6f7d6f81b6dcff7a8f9fc9b7d3d3a' const limit = 100 function getVolumes() { fetch(`${url}volumes/?api_key=${key}&field_list=id,name,count_of_issues,publisher&format=json&limit=${limit}`) .then(function(response) { return response.json(); }) .then(function(data) { showVolumes(data.results); }); function showVolumes(volumes) { let html = '' volumes.forEach(function(volume){ html += ` <div class="col-6 col-md-4 col-lg-2"> <div class="card"> <img src="img/volumes/${volume

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant