Very new coder, go easy on me: I'm currently trying to put together an html webpage that contains updating/live information pulled from the Spotify API. I'd like to be able to compare metadata for the most popular tracks (preferably from the Today's Top Hits playlist here.) Is it possible to do so in my previously used format as such:
var base = 'https://api.scryfall.com/';
var endpoint = 'cards/lea/232';
var url = base + endpoint;
jQuery.getJSON(url).done(processResult)
// append will add the bracketed text to the #specified_bit.
function processResult(data) {
jQuery("#intro").append("<h1 style='text-align:center;'> Today, the average price for currently listed Alpha Lotuses in Euros is €" + data.prices.eur + ".</h1>"); // https://www.w3schools.com/jquery/html_append.asp
jQuery("#lotuscard").append("<img src=" + data.image_uris.normal + ">")
// pulls most up-to-date scan of the black lotus card
}
Can I use this method for the Spotify API? I know I need to authenticate to access it; how do I do so in the simplest possible way? Thanks for your patience.