0.2.0 • Published 4 years ago
node-fpl-api v0.2.0
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();