cric-live-json
v1.0.8
Published
Get the json of cricket matches
Downloads
30
Readme
Cric-Live-Json
Node package for live cricker scores and more.
- Get latest match listing
- Get live scores
Features
Get recent matches
var cricObj = require('cric-live-json');
cricObj.getRecentMatches().then(function(matches){
console.log('matches',matches)
/*
[
{
"id": "20080",
"type": "T20",
"series": "Indian Premier League, 2018",
"title": "SRH vs CSK",
"state": "inprogress",
"status": "SRH elect to field",
"teams": [
{
"name": "Hyderabad",
"shortName": "SRH"
},
{
"name": "Chennai",
"shortName": "CSK"
}
],
"date": "Apr 22 2018",
"startTime": "10:30"
},
...
]
*/
}).catch(function(err){
console.log('Error',err)
})
Get live scores
var cricObj = require('cric-live-json');
cricObj.getLiveScore(2).then(function(liveScore){
console.log('liveScore', liveScore);
/*
{
"type": "T20",
"series": "Indian Premier League, 2018",
"status": "Sunrisers Hyderabad opt to bowl",
"state": "inprogress",
"venue": {
"name": "Rajiv Gandhi International Stadium",
"location": "Hyderabad, India"
},
"score": {
"runRate": 5.62,
"target": "",
"detail": {
"currentInnings": 1,
"batting": {
"name": "Chennai Super Kings",
"shortName": "CSK",
"score": 59,
"overs": 10.2,
"wickets": 2
}
},
"partnership": "28(21)",
"batsmen": [[Object], [Object]],
"bowlers": [[Object], [Object]],
"lastBallDetail": {
"batsman": [[Object]],
"bowler": [[Object]],
"commentary": "Deepak Hooda to Raina, 1 run, to sweeper cover",
"score": 1
}
},
"teams": {
"58": {
"name": "Chennai Super Kings",
"shortName": "CSK",
"score": 60,
"overs": 10.4,
"wickets": 2
},
"255": {
"name": "Sunrisers Hyderabad",
"shortName": "SRH"
}
}
}
*/
});
Disclaimer
This package uses cric buzz api and its an unofficial package. And it is only for your personal and non-commercial use. You may not use the package for commercial purposes or in any way that is unlawful, or harms us or any other person or entity, as determined in our sole discretion. Package contributors are not responsible for any misuse.