mirror of
https://github.com/System-End/My-website.git
synced 2026-04-19 22:05:07 +00:00
10 lines
No EOL
424 B
JavaScript
10 lines
No EOL
424 B
JavaScript
fetch('/spotify-data')
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
const spotifyList = document.getElementById('spotify-list');
|
|
data.items.forEach(track => {
|
|
const listItem = document.createElement('li');
|
|
listItem.textContent = `${track.name} by ${track.artists.map(artist => artist.name).join(', ')}`;
|
|
spotifyList.appendChild(listItem);
|
|
});
|
|
}); |