Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-fpl-api

keslerm5MIT0.2.0TypeScript support: included

This is a really simple typescript/node module for retreiving a days power consumption and cost from FPL.

readme

FPL API

This is a really simple typescript/node module for retreiving a days power consumption and cost from FPL.

Thanks to https://github.com/Klathmon/python-fpl-api for the original reverse engineering work.

Warning: This uses undocumented APIs and could break at any moment.

Usage

import FPLAPI from "node-fpl-api";

const main = async () => {
    const api = new FPLAPI("user@name.com", "password");
    const account = await api.login();

    const consumption = await api.getDailyConsumption(account!, "20191110", "20191111");

    console.log(JSON.stringify(consumption));
}

main();