This app makes use of the Star Wars API (SWAPI), found here: https://swapi.dev/api/. The aim of this app is to parse the following directories from the API:
- Planets
- People
- Species
- Films
The parsed values will save to four PostgreSQL tables of the same name.
The app contains four SQL queries:
- Drop all tables
- Join people with planets to get people's homeworld
- Delete all people with species Droid
- Insert a new film into the Films table
- Select all films' names and producers
- Select the planet with the highest ground
If postgres is not installed, follow instructions below, otherwise skip
- install postgres if not installed already with:
brew install postgres
- initialise postgres server
- install postgres from https://www.postgresql.org/download/
- Make sure you have a postgres server running:
pg_ctl -D /usr/local/var/postgres start
The database used in this app is 'postgres'
- Compile code
stack build
- Run the code using the returned value from stack build:
stack exec <returned-value-here>
Alternatively, compile and run in one command:
stack run
All documentation is created by Haddock and can be found in the ./documentation
folder.
To view the documentation, drag index.html
from the documentation folder into your browser, e.g. Chrome.
Armaan Maniar Mohammed | Catherine Oxley | Luca Ricagni | Luca Santarelli |
---|---|---|---|
github.com/Arm500 |
github.com/Bibiiii |
github.com/Luca133 |
github.com/ghostbustersrock |