GET uri/api/rounds/:roundId
Parameters:
- roundId (String, must be a valid MongoDB ID)
Returns the round with id = roundId on the form:
{
"_id": (String, valid MongoID),
"tournamentId": String, valid MongoID),
"playerId": (String, valid MongoID),
"gameId": (String, valid MongoID),
"name": (String),
"scoreValue": (Int),
"roundNr": (Int),
"hasPlayed": (Boolean),
"deadlineDate": (String, valid date),
"tournamentPoints": (Int)
}
GET uri/api/rounds/latestpoints/:tournamentId/:playerId
Parameters:
- tournamentId (String, must be a valid MongoDB ID)
- playerId (String, must be a valid MongoDB ID)
Returns the latest tournamentPoints greater than zero for a player on a specific tournament on the form:
[{
"_id": (String, valid MongoID),
"tournamentPoints": (Int)
}]
GET uri/api/rounds/tournamentpoints/:tournamentId/:playerId
Parameters:
- tournamentId (String, must be a valid MongoDB ID)
- playerId (String, must be a valid MongoDB ID)
Returns total tournamentPoints for a player on a specific tournament on the form:
{
"tournamentPoints": (Int)
}
GET uri/api/rounds/specific/:tournamentId/:playerId/:roundNr
Parameters:
- tournamentId (String, must be a valid MongoDB ID)
- playerId (String, must be a valid MongoDB ID)
- roundNr (Int)
Returns the specific round for player on a specific tournament in a specific roundnumber on the form:
{
"_id": (String, valid MongoID),
"tournamentId": String, valid MongoID),
"playerId": (String, valid MongoID),
"gameId": (String, valid MongoID),
"scoreValue": (Int),
"roundNr": (Int),
"hasPlayed": (Boolean),
"deadlineDate": (String, valid date),
"tournamentPoints": (Int)
}
POST uri/api/rounds/
Posts a new round.
body:
{
"tournamentId": String, valid MongoID),
"playerId": (String, valid MongoID),
"gameId": (String, valid MongoID),
"roundNr": (Int),
"deadlineDate": (String, valid date)
}
PUT uri/api/rounds/:roundId/:tournamentId
Parameters:
- roundId (String, must be a valid MongoDB ID)
- tournamentId (String, must be a valid MongoDB ID)
Updates the round with id=roundId with the scoreValue in the body. Also updates the highscores of the player and game.
body:
{
"scoreValue": (Int),
"playerId": (String, valid MongoID),
"gameId": (String, valid MongoID)
}