Connect with us

Milwaukee Bucks

Wisconsin Herd Acquires Returning Player Rights to Ike Nwamu

‘;
statsProfileHTML += ”;
statsProfileHTML += ”;
statsProfileHTML += ‘

‘;
$(‘.sidebar__player__stats–title’).removeClass(‘hidden’);
$(‘.sidebar__player__stats’).append(statsProfileHTML);
};

var getPlayerData = function(player){
$.getJSON(‘https://data.nba.com/data/v2015/json/mobile_teams/nba/’ + seasonYear + ‘/players/playercard_’ + player.pid + ‘_’ + seasontype_id + ‘.json’, function(playerData) {})
.done(function(playerData){
buildProfile(playerData);
})
.error(function() {
// Insert empty data if no stats exist
buildProfile({“pl”:{“fn”:player.fn,”ht”:player.ht,”ln”:player.ln,”pid”:player.pid,”pos”:player.pos,”wt”:player.wt,”ca”:{“sa”:[{“val”:”-“,”gp”:”-“,”min”:”-“,”fgp”:”-“,”tpp”:”-“,”ftp”:”-“,”reb”:”-“,”ast”:”-“,”stl”:”-“,”blk”:”-“,”tov”:”-“,”pf”:”-“,”pts”:”-“,”ta”:”-“,”tn”:”-“,”tc”:”-“}]}}});
});
};

var checkRoster = function(tagPlayerName, playerList){
for (var i in playerList) {
var compareName = playerList[i].ln + ‘, ‘ + playerList[i].fn;
if (compareName === tagPlayerName){
getPlayerData(playerList[i]);
}
}
};

$.getJSON(‘https://data.nba.com/data/v2015/json/mobile_teams/nba/’ + seasonYear + ‘/teams/bucks_roster.json’, function(rosterData) {
var playerList = rosterData.t.pl;
$(‘.tag__link’).each(function(i, tag) {
var tagPlayerName = $(tag).html();
checkRoster(tagPlayerName, playerList);
});
});
});

Source Link

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

More in Milwaukee Bucks