I hope I can get some help as well. I am trying to get JSON info from this same API using AJAX and storing it in a LocalStorage. I was able to do so using another API with the following code:
/* Makes API connection and stores the JSON info into LocalStorage */
var xmlhttp;
if (window.XMLHttpRequest){
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var jsondata = JSON.parse(xmlhttp.responseText); //retrieve result as a JavaScript object
var games_serialized = JSON.stringify(jsondata);
localStorage.setItem('gamesStored', games_serialized);
}
}
xmlhttp.open("GET","https://www.boardgameatlas.com/api/search?order_by=popularity&ascending=false&pretty=true&client_id=#########",true);
xmlhttp.send();
But I don’t know how to “setup” the url to use in the place boardgame’s url is right now. Notice that I am sending the “client_id” along with the url here. Do you guys think I can do the same with my token using football-data.org?