Open ghost opened 3 years ago
NBA.stats.shots({PlayerID: 201939}).then(data => {
const final_shots = data.shot_Chart_Detail.map(shot => ({
x: (shot.locX + 250) / 10,
y: (shot.locY + 50) / 10,
action_type: shot.actionType,
shot_distance: shot.shotDistance,
shot_made_flag: shot.shotMadeFlag,
}));
console.log(final_shots[0]);
});
This works for me and will log
{
x: 13,
y: 29,
action_type: 'Pullup Jump shot',
shot_distance: 26,
shot_made_flag: 0
}
Are you getting a specific error?
Hello, I tried to fetch data about shot chart details, but it seems like stats.nba.com no longer has the servlet to handle this request. Can I still get shot chart details? Thank you!!