This repository is a json-server created to feed data into the React Application below.
{
rating,
content,
gameId,
userName,
profilePic,
id,
wouldRecommend,
profileId,
gameName;
}{
name,
cover,
gameId,
platform,
isGameCompleted,
screenshots,
hoursPlayed,
id;
}{
id,
user,
profilePic,
storeCredit;
}| HTTP Method | URL | Request Body | Description |
|---|---|---|---|
| GET | /reviews |
Sends all reviews | |
| GET | /reviews/?gameId |
Sends all reviews of selected game | |
| GET | /reviews/?profileId |
Sends all reviews made by user | |
| GET | /reviews/:reviewId |
Sends selected review | |
| POST | /reviews |
{rating, content, gameId, userName, profilePic, id, wouldRecommend, profileId, gameName} | Creates a new review |
| PATCH | /reviews/:reviewId |
{rating, content} | Edits a review object |
| DELETE | /reviews/:reviewId |
Deletes a review object | |
| GET | /myGames |
Sends all myGames | |
| GET | /myGames/:gameId |
Sends selected game | |
| POST | /myGames |
{name, cover, gameId, platform, isGameCompleted, screenshots, hoursPlayed, id} | Creates a new myGame |
| PUT | /myGames/:myGameId |
{name, cover, gameId, platform, isGameCompleted, screenshots, hoursPlayed, id} | Edits data from myGame |
| PATCH | /myGames/:myGameId |
{screenshots} | Adds screenshots to myGame |
| DELETE | /myGames/:myGameId |
Deletes a myGame object | |
| GET | /profile |
Sends profile |