footballdata-api-js
v0.0.2
Published
> NodeJS wrapper for the football-data.org JSON API. Not meant to be full-featured at the point.
Downloads
1
Readme
footballdata-api-js
NodeJS wrapper for the football-data.org JSON API. Not meant to be full-featured at the point.
Installation
yarn add footballdata-api-js
Requirements
- NodeJS 6+
- An API key from football-data.org
Usage
Get Ligue 1 standings using NodeJS
const FootballDataAPI = require('footballdata-api-js');
(async () => {
const api = FootballDataAPI.getAPIWrapper('YOUR_API_KEY');
try {
const standings = await api.getCompetitionStandings('FL1', {standingType: 'TOTAL'});
console.log(standings.season);
console.table(standings.standings[0].table);
} catch (e) {
// Do something with this error
}
})();
License
MIT