I'm using the API's node wrapper: https://github.com/MySportsFeeds/mysportsfeeds-node/blob/master/README.md https://www.mysportsfeeds.com/data-feeds/api-docs#
The call is going through fine and automatically saving on under "/results"
Here's my code:
msf.authenticate("username", "password");
var data = msf.getData('nba', '2016-2017-regular', 'cumulative_player_stats', 'json', {
player: 'nick-young'
});
request(data, function(error, response, body) {
if (!error && response.statusCode == 200) {
var parsedData = JSON.parse(body);
console.log(parsedData["cumulativeplayerstats"]["playerstatsentry"][0]["stats"]["PtsPerGame"]["#text"]);
}
});
Thanks in advance
JSON.parse(body)ifbodyis the actual JSON text response. If you are having a problem you should say what the actual problem is, and any error messages you might be receiving