juliaguas17 / Hardcore-Memory-Game

3 stars 2 forks source link

API to pull in random fact of same theme chosen for matching images #10

Closed jengle-dev closed 1 year ago

juliaguas17 commented 1 year ago

https://rapidapi.com/orthosie/api/trivia5/

jengle-dev commented 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); });

jengle-dev commented 1 year ago

https://api-ninjas.com/api/animals

jengle-dev commented 1 year ago

trivia.js created and we're getting the response back from the api

jengle-dev commented 1 year ago

trivia created and then concatenated for fact in modal