-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer_info.js
More file actions
20 lines (19 loc) · 763 Bytes
/
Player_info.js
File metadata and controls
20 lines (19 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var axios = require('axios');
const port = 8080;
const id = "77da5a6d-7c67-4a76-9d24-709ba6e5e1d8";
const apikey = "%APIKEY%";
axios.get(`https://api.cricapi.com/v1/players_info?apikey=${apikey}&offset=0&id=${id}`)
.then((result)=>{
var data = result.data.data;
console.log("Player Information..............................................");
console.log("Name -"+data.name);
console.log("dateOfBirth -"+data.dateOfBirth);
console.log("role -"+data.role);
console.log("battingStyle -"+data.battingStyle);
console.log("bowlingStyle -"+data.bowlingStyle);
console.log("placeOfBirth -"+data.placeOfBirth);
console.log("country -"+data.country);
console.log("playerImg -"+data.playerImg);
}).catch((err)=>{
console.log(err);
})