1.0.2 • Published 6 years ago

football-data-v2 v1.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

football-data-v2

Node js service for football-data.org V2 rest api

Very simple node package for interacting with the new football-data.org rest api

For more information about the methods responses and parameters, look at football-data.org docs

Basic usage

const myApiToken = '123412341234';
const footballData = new FootballData(myApiToken);
footballData.competitions().then(res => {
  console.log({res})
}).catch(e => {
  console.log({e})
})

Available Methods

  • competitions({area} = {}) - List all competitions.
    • area - Will list only competitions within this area
  • competition(competitionId) - Get data for the specified competitionId
  • teams(competitionId, {stage} = {}) - Get all the teams in the specified competition
    • stage - will get all the teams that appears in the specified stage
  • standings(competitionId) - Get the standings for the specified competitionId
  • competitionMatches(competitionId, {dateFrom, dateTo, stage, status, matchday, group} = {}) - Get all matches for the specified competitionId
  • matches({competitions, dateFrom, dateTo, status} = {}) - Get all matches that apply the passed filters
  • competitions - An array of competition Ids
  • dateFrom - get only matches after at this date. e.g. 2018-06-22
  • dateTo - get only matches until at this date. e.g. 2018-06-22
  • status - get only matches in this status. Available values: SCHEDULED | LIVE | IN_PLAY | PAUSED | FINISHED | POSTPONED | SUSPENDED | CANCELED
  • match(id) - Get all data for the specified match id
  • teamMatches(id,{dateFrom, dateTo, status, venue} = {}) - Get all matches for the specified team id.
  • team(id) - Get data for the specified team id
  • areas(id) - Get data for the specified area id.
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago