-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMatchpoints.js
More file actions
32 lines (30 loc) · 1.22 KB
/
Matchpoints.js
File metadata and controls
32 lines (30 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var axios = require('axios');
const port = 8080;
const id = "dd5dcdcd-f09b-4a44-a50e-12f52d9d3d8c";
const apikey = "%APIKEY%";
axios.get(`https://api.cricapi.com/v1/match_points?apikey=${apikey}&offset=0&id=${id}`)
.then((result)=>{
var data = result.data.data;
var innings = data.innings;
console.log("Match Point..............................................");
innings.forEach(element => {
console.log("Innings - "+element.inning);
console.log("batting results...........................................");
element.batting.forEach(batting => {
console.log("Name - "+batting.name)
console.log("points - "+batting.points)
});
console.log("Bowling results...........................................");
element.bowling.forEach(bowling => {
console.log("Name - "+bowling.name)
console.log("points - "+bowling.points)
});
console.log("catching results...........................................");
element.catching.forEach(catching => {
console.log("Name - "+catching.name)
console.log("points - "+catching.points)
});
});
}).catch((err)=>{
console.log(err);
})