0.0.2 • Published 5 years ago

footballdata-api-js v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

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

0.0.2

5 years ago

0.0.1

5 years ago