This is a RESTful web service that supports GRUD operations on a postgreSQL database storing basic video game information. JSON is the format of the video game data that will exchanged between the server and its clients.
The postgreSQL database that this application expects to interact with should have a table that stores a video games title, developer, and rating.
CREATE TABLE games (title VARCHAR(100), developer VARCHAR(100), rating CHAR(1));
The first and only command line argument should be a JSON file that will store the database credentials. The application will read this JSON file and attempt to connect to the specified database.
{
"host":"...",
"port":1234,
"user":"...",
"dbname":"..."
}
$ ./REST_game database_login.json
- gameAPI/add (POST)
- gameAPI/{title} (GET)
- gameAPI/{title} (PUT)
- gameAPI/{title} (DELETE)
- gameAPI/developer/{dev} (GET)
- gameAPI/rating/{rating} (GET)
The developer and rating endpoints will return an array of video game information.
{
"title":"...",
"developer":"...",
"rating":"..."
}