Popular Games.
{
"id" : int,
"gameName" : "string",
"category" : "string",
"totalBets" : int,
"totalWins" : int,
"averageBetAmount" : float,
"popularityScore" : float,
"lastUpdated" : "DateTime (timestamp)"
}Where:
gameNameis the name of the game.categoryis the category to which the game belongs (slots, poker..)popularityScore)is a calculated score representing the popularity of the game. This could be based on a combination of factors such as total bets, total wins and player engagement.totalBetsis the total number of bets placed on the game.totalWinsis the total number of wins accumulated by players on the gameaverageBetAmountis the average amount of money bet on the game per play.lastUpdatedis the timestamp indicating when the popularity data was last updated.
Description: Get all games data analyitics from database.
GET /gamedata Ok 200{
"id": "c4f945fc-9e6c-4c87-a773-e09bd8e28ab2",
"gameName": "Penny Poker",
"category": "Poker",
"totalBets": 7000,
"totalWins": 5200,
"averageBetAmount": 15.5,
"popularityScore": 0.72,
"lastUpdated": "2023-11-10T10:12:26.542856Z"
},Description: Get a game data by its id.
GET /gamedata/{id}*Example with id in the DDBB
Ok 200{
"id": "c4f945fc-9e6c-4c87-a773-e09bd8e28ab2",
"gameName": "Penny Poker",
"category": "Poker",
"totalBets": 7000,
"totalWins": 5200,
"averageBetAmount": 15.5,
"popularityScore": 0.72,
"lastUpdated": "2023-11-10T10:12:26.542856Z"
},Example with id not in the DDBB
Not found 404{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"traceId": "00-f0da4faa097bbade88c782224b7f8816-4e67ce9941304f5a-00"
}Description: Create a new game data from the request body
POST /gamedataBody:
{
"gameName": "Penny Poker", -- Required
"category": "Poker", -- Required
"popularityScore": 0.72,
"totalBets": 7000,
"totalWins": 5200,
"averageBetAmount": 15.50,
} Created 201{
"id": "c4f945fc-9e6c-4c87-a773-e09bd8e28ab2",
"gameName": "Penny Poker",
"category": "Poker",
"totalBets": 7000,
"totalWins": 5200,
"averageBetAmount": 15.5,
"popularityScore": 0.72,
"lastUpdated": "2023-11-10T10:12:26.542856Z"
}, Bad Request 400Bad Request: Validation errors. gameName and category are required values. JSON is required.
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-6ab201249909ff0b0a1915c518ed9f6b-b0ec6624b51b2c56-00",
"errors": {
"Category": [
"The Category field is required."
]
}
} Description: Updates a new game data from the request body. All values are replaced by the new ones or its default.
PUT /gamedata/{id}Body:
{
"gameName": "Penny Poker", -- Required
"category": "Poker", -- Required
"popularityScore": 0.72,
"totalBets": 7000,
"totalWins": 5200,
"averageBetAmount": 15.50,
} No content 204Example with id not in the DDBB
Not found 404{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"traceId": "00-f0da4faa097bbade88c782224b7f8816-4e67ce9941304f5a-00"
}Description: Deletes a game data by its id.
DELETE /gamedata/{id}Example with id = c4f945fc-9e6c-4c87-a773-e09bd8e28ab2
No content 204Example with id not in the DDBB
Not found 404{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"traceId": "00-f0da4faa097bbade88c782224b7f8816-4e67ce9941304f5a-00"
}