cURL
curl --request GET \ --url https://api.example.com/game/{id}
{ "200": {}, "404": {}, "gameId": "<string>", "playerId": "<string>", "status": "<string>", "playerScore": 123, "dealerScore": 123, "playerCards": [ { "rank": "<string>", "suit": "<string>", "hidden": true } ], "dealerCards": [ { "rank": "<string>", "suit": "<string>", "hidden": true } ] }
Retrieve the current state of a Blackjack game
curl http://localhost:8080/game/550e8400-e29b-41d4-a716-446655440000
IN_PROGRESS
PLAYER_WIN
DEALER_WIN
TIE
Show Card Object
false
true
{ "gameId": "550e8400-e29b-41d4-a716-446655440000", "playerId": "660e8400-e29b-41d4-a716-446655440001", "status": "IN_PROGRESS", "playerScore": 19, "dealerScore": 10, "playerCards": [ { "rank": "KING", "suit": "HEARTS", "hidden": false }, { "rank": "NINE", "suit": "DIAMONDS", "hidden": false } ], "dealerCards": [ { "rank": "TEN", "suit": "CLUBS", "hidden": false }, { "rank": null, "suit": null, "hidden": true } ] }
{ "gameId": "550e8400-e29b-41d4-a716-446655440000", "playerId": "660e8400-e29b-41d4-a716-446655440001", "status": "PLAYER_WIN", "playerScore": 20, "dealerScore": 19, "playerCards": [ { "rank": "KING", "suit": "HEARTS", "hidden": false }, { "rank": "QUEEN", "suit": "DIAMONDS", "hidden": false } ], "dealerCards": [ { "rank": "TEN", "suit": "CLUBS", "hidden": false }, { "rank": "NINE", "suit": "SPADES", "hidden": false } ] }