footballdata-api-js

NodeJS wrapper for the football-data.org JSON API. Not meant to be full-featured at the point.

Usage no npm install needed!

<script type="module">
  import footballdataApiJs from 'https://cdn.skypack.dev/footballdata-api-js';
</script>

README

footballdata-api-js

NodeJS wrapper for the football-data.org JSON API. Not meant to be full-featured at the point.

forthebadge forthebadge

Installation

yarn add footballdata-api-js

Requirements

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