A user-friendly API for the Fantasy Premier League online game.
Deployed via AWS.
Note: I've disabled this API as I'm unable to maintain it.
See https://kelanyll.com/posts/fpl-wrapper for an introduction into the API and /examples
for example usage
in Python.
The project can be imported as a Maven project using IntelliJ IDEA. To run the server using IntelliJ IDEA, create a
Run configuration that runs the class FPLWrapperApplication
with CLI argument server server-config.yml
.
The quickest way to get this running locally will be to install Docker on your machine and run the server and database as containers. You will also need Java 11 and Maven to build the server.
- Navigate to
db/
and rundocker build -t fpl-wrapper-db .
to build the database image. - Set a password for the database under an environment variable (such as
FPL_DB_PASS
). - Run
docker run --name fpl-wrapper-db -d -p 5432:5432 -e POSTGRES_PASSWORD=$FPL_DB_PASS fpl-wrapper-db
to run the container. - In
/server-config.yml
, insert the correct IP address in the JDBC url; the database container should be running at172.17.0.2
in the default bridge network but you can check this withdocker network inspect bridge
. See here for more information about Docker networking: https://docs.docker.com/network/network-tutorial-standalone/. - In the root of the project, run
mvn package
to build the server JAR. - Run
docker build -t fpl-wrapper-server .
. - Run
docker run --name fpl-wrapper-server -d -p 8080:8080 -p 8081:8081 -e FPL_DB_PASS=$FPL_DB_PASS fpl-wrapper-server
. - The server should be up and running now: http://localhost:8080/fpl-wrapper/swagger.