Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fpl-api-node

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fpl-api-node

A simple node wrapper for the Fantasy Premier League (fantasy.premierleague.com) restful web api

  • 1.0.6
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

fpl-api-node

npm npm

A simple node wrapper for the Fantasy Premier League (fantasy.premierleague.com) restful web api.

Installation

npm install fpl-api-node --save

Usage

The package is written in typescript and can be consumed either strongly-typed or in plain Javascript.

Typescript:

import * as fplapi from 'fpl-api-node';

Javascript:

const fplapi = require('fpl-api-node');

Example

fplapi.getEntry(123456).then((data) => {

    // do something with our data
    console.log(data);

}).catch((err) => {
    // something went wrong
});

Documentation

Typescript

Typescript docs can be found at https://tgreyuk.github.io/fpl-api-node

API

fplApiNode~getEntry(entryId) ⇒ Promise

Entry (Fpl manager team): A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/entry/${id}/history

Kind: inner method of fplApiNode

ParamDescription
entryIdEntry id

fplApiNode~getEntryEvent(entryId, eventNumber) ⇒ Promise

Entry event. Details of a particular event (or gameweek): A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/entry/${id}/event/${eventNumber}

Kind: inner method of fplApiNode

ParamDescription
entryIdEntry id
eventNumberThe event / gameweek number

fplApiNode~getEntryTransfers(entryId) ⇒ Promise

Entry transfers: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/entry/${id}/transfers

Kind: inner method of fplApiNode

ParamDescription
entryIdEntry id

fplApiNode~getAllStaticData() ⇒ Promise

All static game data: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/bootstrap-static

Kind: inner method of fplApiNode

fplApiNode~getTeams() ⇒ Promise

Teams (Premier Leaugue clubs): A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/teams

Kind: inner method of fplApiNode

fplApiNode~getElements() ⇒ Promise

Elements (players): A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/elements

Kind: inner method of fplApiNode

fplApiNode~getElementTypes() ⇒ Promise

Element types: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/elements-types

Kind: inner method of fplApiNode

fplApiNode~getGameSettings() ⇒ Promise

Game settings: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/game-settings

Kind: inner method of fplApiNode

fplApiNode~getEvent() ⇒ Promise

Event /gameweek details: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/event/${eventNumber}/live

Kind: inner method of fplApiNode

fplApiNode~getClassicLeagueStandings(leagueId) ⇒ Promise

Classic league standings: A promise that if fulfilled returns an object mapped to https://fantasy.premierleague.com/drf/leagues-classic-standings/${id}

Kind: inner method of fplApiNode

ParamDescription
leagueIdLeague id

Keywords

FAQs

Package last updated on 18 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc