UNPKG

fpl-fetch

Version:

Wrapper for the Fantasy Premier League API

34 lines (22 loc) 1.32 kB
# fpl-fetch · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/pmc-a/fpl-fetch/blob/main/LICENSE.md) · ![Run Unit Tests](https://github.com/pmc-a/fpl-fetch/actions/workflows/tests.yml/badge.svg) · [![npm version](https://img.shields.io/npm/v/fpl-fetch)](https://www.npmjs.com/package/fpl-fetch) · [![Downloads](https://img.shields.io/npm/dm/fpl-fetch)](https://www.npmjs.com/package/fpl-fetch) · [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](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) ```