script.js
//function for next song on playlist
function for next song on playlist
function for next song on playlist
function next_song(ur){
  async function add_song_qu(){
    const response = await fetch (`https://api.spotify.com/v1/me/player/queue/?uri=spotify%3Atrack%3A${ur}`,{
        method: 'POST',
        headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json',
            'Authorization': "Bearer " + access_token
        }
    });
    return response.json();
}
add_song_qu();
}
function next_song ( ur ) { async function add_song_qu ( ) { const response = await fetch ( ` ${ ur } ` , { method : 'POST' , headers : { 'Accept' : 'application/json' , 'Content-Type' : 'application/json' , 'Authorization' : "Bearer " + access_token } } ) ; return response . json ( ) ; } add_song_qu ( ) ; }
function for next song on playlist
function for next song on playlist