2024-08-20 09:53:33 -06:00
|
|
|
const user = "limepotato";
|
|
|
|
const url = `https://lastfm-last-played.biancarosa.com.br/${user}/latest-song`;
|
|
|
|
const song = document.querySelector("#song");
|
|
|
|
fetch(url)
|
|
|
|
.then((response) => response.json())
|
|
|
|
.then((json) => {
|
2024-08-20 19:18:23 -06:00
|
|
|
song.innerHTML = `${json.track.name} - ${json.track.artist["#text"]}`;
|
2024-08-20 09:53:33 -06:00
|
|
|
});
|