A GraphQL wrapper for the Fantasy Premier League API, using node and graphql-yoga. Demo
A special thank you to @tanayv for his collaboration to fix errors related to axios. Collaborations are happily welcomed.
- https://fantasy.premierleague.com/api/bootstrap-static/ : events (gameweeks), teams, players, game settings, phases, and elements (players)
- https://fantasy.premierleague.com/api/fixtures/ : fixtures
- https://fantasy.premierleague.com/api/element-summary/{player_id}/ : stats of a given player.
- https://fantasy.premierleague.com/api/event/{event_id}/live/ : live stats, by player, for a given gameweek, and how much points he scored in fantasy.
- https://fantasy.premierleague.com/api/entry/{entry_id}/history/ : data for a given entry (a fantasy team) for the past gameweeks of the season, plus past seasons.
- https://fantasy.premierleague.com/api/entry/{entry_id}/event/{event_id}/picks/ : data of picks of a given fpl team for a given entry (gameweek)
- Download or clone this repository
git clone https://github.com/lastmaj/fpl-graphql.git
- Move to the project directory and install dependencies
cd fpl-graphql
npm install
- Start the server
npm start
The server will run at http://localhost:4000 with a graphql playground (browse docs and schema to know more about queries)
Aguero's live stats for the 4the gameweek. You didn't captain him did you ?
If it helps you build something awesome, let me know. Contributions are happily welcome.