npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

football-data-v2

v1.0.2

Published

JS Api for using football-data.org rest api

Downloads

11

Readme

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
    • 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
    • stage - get only matches in this stage
    • status - get only matches in this status. Available values: [SCHEDULED | LIVE | IN_PLAY | PAUSED | FINISHED | POSTPONED | SUSPENDED | CANCELED]
    • matchday - get only matches in this match day
    • group - get only matches in this group
  • 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.
    • 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]
    • venue - get only matches in this venue. Available values: HOME | AWAY
  • team(id) - Get data for the specified team id
  • areas(id) - Get data for the specified area id.