Closed jengle-dev closed 1 year ago
https://api.api-ninjas.com/v1/animals?name=
const axios = require("axios");
const options = { method: 'GET', url: 'https://animals-by-api-ninjas.p.rapidapi.com/v1/animals', params: {name: 'cheetah'}, headers: { 'X-RapidAPI-Key': '9669d39c2emsh061a8c7293d8ce8p1fb057jsn0823798c42bf', 'X-RapidAPI-Host': 'animals-by-api-ninjas.p.rapidapi.com' } };
axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); });
trivia.js created and we're getting the response back from the api
trivia created and then concatenated for fact in modal
https://rapidapi.com/orthosie/api/trivia5/