# node-fpl-api

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

Latest version **0.2.0** (published 2019-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-fpl-api
pnpm add node-fpl-api
yarn add node-fpl-api
bun add node-fpl-api
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-11-12 |
| First published | 2019-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 (+27 in 3 direct dependencies) |
| Install scripts | no |
| Author | Morgan Kesler |
| Maintainers | keslerm |

## Links

- npm: https://www.npmjs.com/package/node-fpl-api
- Repository: https://git.aegiszero.is/keslerm/node-fpl-api
- npm.io page: https://npm.io/package/node-fpl-api

## Dependencies (5)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19
- [tough-cookie](https://npm.io/package/tough-cookie.md) ^3.0.1
- [axios-cookiejar-support](https://npm.io/package/axios-cookiejar-support.md) ^0.5.0

## Recent versions

- 0.2.0 (latest) — 2019-11-12
- 0.1.3 — 2019-11-12
- 0.1.1 — 2019-11-12
- 0.1.0 — 2019-11-12

## 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();
```

---
_Source: https://npm.io/package/node-fpl-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
