fpl-fetch
Version:
Wrapper for the Fantasy Premier League API
34 lines (22 loc) • 1.32 kB
Markdown
# fpl-fetch · [](https://github.com/pmc-a/fpl-fetch/blob/main/LICENSE.md) ·  · [](https://www.npmjs.com/package/fpl-fetch) · [](https://www.npmjs.com/package/fpl-fetch) · [](https://github.com/pmc-a/fpl-fetch/pulls)
A modern, type-safe TypeScript wrapper for the [Fantasy Premier League](https://fantasy.premierleague.com) (FPL) API.
## Features
- 🏆 Simple API: Fetch players, teams, fixtures, and more with minimal code.
- ⚡ TypeScript Support: Fully typed for a great developer experience.
- 🔄 Async/Await: Modern asynchronous API.
- 🛡️ Robust Error Handling: Clear and consistent error messages.
- 📦 Lightweight: No unnecessary dependencies.
## Installation
```bash
npm install fpl-fetch
```
## Basic Usage
```typescript
import FplFetch from 'fpl-fetch';
const client = new FplFetch();
async function main() {
const player = await client.getPlayer(328);
console.log(player);
}
main().catch(console.error)
```