-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFantasy_matchscorcard.js
More file actions
28 lines (24 loc) · 1.03 KB
/
Fantasy_matchscorcard.js
File metadata and controls
28 lines (24 loc) · 1.03 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
var axios = require('axios');
const port = 8080;
const apikey = "%APIKEY%";
const id = "fc4a5881-fb19-4d21-933c-45e913dc0d3c"
axios.get(`https://api.cricapi.com/v1/match_scorecard?apikey=${apikey}&offset=0&id=${id}`)
.then((result)=>{
console.log("Name" + result.data.data.name);
console.log("matchType" + result.data.data.matchType);
console.log("status" + result.data.data.status);
console.log("venue" + result.data.data.venue);
console.log("date" + result.data.data.date);
console.log("dateTimeGMT" + result.data.data.dateTimeGMT);
console.log("tossWinner" + result.data.data.tossWinner);
console.log("tossChoice" + result.data.data.tossChoice);
console.log("matchWinner" + result.data.data.matchWinner);
console.log("series_id" + result.data.data.series_id);
result.data.data.teamInfo.forEach(res => {
console.log("name" + res.name);
console.log("shortname" + res.shortname);
console.log("img" + res.img);
});
}).catch((err)=>{
console.log(err);
})