But doing the same thing from jsonodds nodejs package , like :
exports.fetchResultsById = function(req, res) {
if (!req.body.eventId) {
res.json('Please provide eventId for this game :');
} else {
var options = {
eventId: req.body.eventId,oddType: 'Game',final: true
};
jsonOdds.getResults(options, function(err, response, body) {
if (err)
{
res.json('Error Fetching results :' + err.message);
console.log('Error Fetching results :' + err.message);
}
else if (body) {
res.json(body);
}
else {
res.json('Empty');
}
});
}
}
Is giving us an error message : "Error Fetching results :There was a problem parsing an empty result.".
Is this a problem from the JsonOdds package ? please clarify me about this.
Using curl to fetch results from jsonOdds :
curl -X GET https://jsonodds.com/api/results/{39c89710-b9e8-4903-a2e7-79e0580819a2} -H "JsonOdds-API-Key: yourapikey"
[{"ID":"39c89710-b9e8-4903-a2e7-79e0580819a2","HomeScore":null,"AwayScore":null,"Final":false,"Name":"","EventID":"39c89710-b9e8-4903-a2e7-79e0580819a2","OddType":"Game","FinalType":"Not Finished"}]
But doing the same thing from jsonodds nodejs package , like :
Is giving us an error message : "Error Fetching results :There was a problem parsing an empty result.". Is this a problem from the JsonOdds package ? please clarify me about this.