soundcloudnodejs.js
function removeAllTracks(tracks, token, count, callback) {
    var track = tracks[count];

    if (!track) {
        return callback('done');
    }

    var options = {
        id: track.id,
        oauth_token: token.oauth_token
    };

    removeTrack(options).then(function (track) {
        if (DEBUG_MODE_ON) {
            console.log('removeTrack, ', track);
        }
        count = count + 1;
        removeAllTracks(tracks, token, count, callback)
    }).catch(function (err) {
        console.log('ERROR: removeTrack, ', err);
        count = count + 1;
        removeAllTracks(tracks, token, count, callback)
    })
}
function removeAllTracks(tracks, token, count, callback) {
    var track = tracks[count];

    if (!track) {
        return callback('done');
    }

    var options = {
        id: track.id,
        oauth_token: token.oauth_token
    };

    removeTrack(options).then(function (track) {
        if (DEBUG_MODE_ON) {
            console.log('removeTrack, ', track);
        }
        count = count + 1;
        removeAllTracks(tracks, token, count, callback)
    }).catch(function (err) {
        console.log('ERROR: removeTrack, ', err);
        count = count + 1;
        removeAllTracks(tracks, token, count, callback)
    })
}
function removeAllTracks ( tracks , token , count , callback ) { var track = tracks [ count ] ; if ( ! track ) { return callback ( 'done' ) ; } var options = { id : track . id , oauth_token : token . oauth_token } ; removeTrack ( options ) . then ( function ( track ) { if ( DEBUG_MODE_ON ) { console . log ( 'removeTrack, ' , track ) ; } count = count + 1 ; removeAllTracks ( tracks , token , count , callback ) } ) . catch ( function ( err ) { console . log ( 'ERROR: removeTrack, ' , err ) ; count = count + 1 ; removeAllTracks ( tracks , token , count , callback ) } ) }
Remove all tracks for a account.

@param tracks
@param token
@param count
@param callback
Remove all tracks for a account .