Biljart API
API for the Libre Billiards competition at De Club met Stootkracht
Version: 1.0.0
BasePath:/chemistry.software/biljart-api/1.0.0
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html
Access
[ Jump to Models ]
Table of Contents
Create a new club (clubsPost)
Consumes
This API call consumes the following media types via the request header:
Request body
Return type
Example data
Content-Type: application/json
{
"end_date" : "2000-01-23",
"ongoing" : true,
"members" : [ {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
}, {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
} ],
"name" : "name",
"competitions" : [ null, null ],
"id" : "id",
"start_date" : "2000-01-23"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
Successfully created
Club
Up
get /clubs/{club_id}/competitions/{competition_id}/games
Get all games of a competition (clubsClubIdCompetitionsCompetitionIdGamesGet)
Path parameters
club_id (required)
Path Parameter — ID of the club
competition_id (required)
Path Parameter — ID of the competition
Return type
Example data
Content-Type: application/json
[ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A list of games
404
Club or competition not found
Up
get /clubs/{club_id}/competitions
Get all competitions of a club (clubsClubIdCompetitionsGet)
Path parameters
club_id (required)
Path Parameter — ID of the club to retrieve competitions from
Return type
Example data
Content-Type: application/json
[ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A list of competitions
404
Club not found
Get a specific club by ID (clubsClubIdGet)
Path parameters
club_id (required)
Path Parameter — ID of the club to retrieve
Return type
Example data
Content-Type: application/json
{
"end_date" : "2000-01-23",
"ongoing" : true,
"members" : [ {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
}, {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
} ],
"name" : "name",
"competitions" : [ null, null ],
"id" : "id",
"start_date" : "2000-01-23"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A club object
Club
404
Club not found
Up
get /clubs/{club_id}/members
Get all members of a club (clubsClubIdMembersGet)
Path parameters
club_id (required)
Path Parameter — ID of the club to retrieve members from
Return type
Example data
Content-Type: application/json
[ {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
}, {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
} ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A list of club members
404
Club not found
Get all clubs (clubsGet)
Return type
Example data
Content-Type: application/json
[ {
"end_date" : "2000-01-23",
"ongoing" : true,
"members" : [ {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
}, {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
} ],
"name" : "name",
"competitions" : [ null, null ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"ongoing" : true,
"members" : [ {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
}, {
"name" : "name",
"competitions" : [ {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
}, {
"end_date" : "2000-01-23",
"club_id" : "club_id",
"name" : "name",
"games" : [ {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}, {
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
} ],
"id" : "id",
"start_date" : "2000-01-23"
} ],
"id" : "id",
"moyenne" : 0.8008281904610115
} ],
"name" : "name",
"competitions" : [ null, null ],
"id" : "id",
"start_date" : "2000-01-23"
} ]
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A list of clubs
Get a specific game by ID (gamesGameIdGet)
Path parameters
game_id (required)
Path Parameter — ID of the game to retrieve
Return type
Example data
Content-Type: application/json
{
"player1_id" : "player1_id",
"ongoing" : true,
"player2_id" : "player2_id",
"date_played" : "2000-01-23T04:56:07.000+00:00",
"competition_id" : "competition_id",
"points_player2" : 1,
"points_player1" : 6,
"id" : "id",
"outcome" : "win",
"turns" : 5
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the response header.
Responses
200
A game object
Game
404
Game not found
[ Jump to Methods ]
Table of Contents
Club
Competition
Game
Player
id (optional)
String The unique identifier for the club
name (optional)
members (optional)
competitions (optional)
ongoing (optional)
Boolean Indicates if the club is currently active
start_date (optional)
date The start date of the club's activity format: date
end_date (optional)
date The end date of the club's activity format: date
id (optional)
String The unique identifier for the competition
name (optional)
String The name of the competition
club_id (optional)
String The ID of the club hosting the competition
start_date (optional)
date The start date of the competition format: date
end_date (optional)
date The end date of the competition format: date
games (optional)
id (optional)
String The unique identifier for the game
competition_id (optional)
String The ID of the competition the game belongs to
player1_id (optional)
String The ID of the first player
player2_id (optional)
String The ID of the second player
date_played (optional)
Date The date and time when the game was played format: date-time
ongoing (optional)
Boolean Indicates if the game is currently ongoing
outcome (optional)
String The outcome of the game
win
lose
draw
maximum_turns
ongoing
points_player1 (optional)
Integer Points scored by player 1 in the game
points_player2 (optional)
Integer Points scored by player 2 in the game
turns (optional)
id (optional)
String The unique identifier for the player
name (optional)
moyenne (optional)
BigDecimal The player's moyenne (average points per turn)
competitions (optional)