soccer.js 550 Bytes
module.exports = {
  GetPlayerInfo : function(playerID, season){
    var request = require('request');
    var options = {
        method: 'GET',
        url: 'https://v3.football.api-sports.io/players',  
        qs: {id: playerID, season: season},
        headers: {
            'x-rapidapi-host': 'v3.football.api-sports.io',
            'x-rapidapi-key': '526fc70a2e8b315e9a960ac4b4764191'
        }
    };
    request(options, function (error, response) {
      if (error) throw new Error(error);
      console.log(response.body);
    });
  }
}