9 lines
310 B
JavaScript
9 lines
310 B
JavaScript
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) => {
|
|
song.innerHTML =
|
|
`${json.track.name} - ${json.track.artist["#text"]}`;
|
|
});
|