-
Notifications
You must be signed in to change notification settings - Fork 0
RESTful API
Here the REST API (a good discussion about REST) will be documented after it is a bit more stable and mature. All URLs to the API start with /api/
.
Depending on the Accept-header either JSON (Accept not specified or application/json) or XML (Accept text/xml) can be served.
Resource player statistic summary
:
Get statistical summary of all players:
URL: /api/stats/summary
Method: GET
Response: A list of general player statistics for all players. For more detailed stats other resources are neccessary.
Example-Requests:
wget --header=Accept:application/json http:https://localhost:8080/api/stats/summary
wget --header=Accept:text/xml http:https://localhost:8080/api/stats/summary
Resource sheet
:
Create and update doppelkopf score sheets which will finally be used for the statistical calculations:
URL: /api/sheet
Method: POST
Params: at least 4 playerId
s
Response: A new empty and open sheet with the given parameters will be created. The URL of the new resource is returned in the Location header.
Example-Request: wget --save-headers --header="Content-Type:application/json" --post-data="{\"playerIds\" : [ 1, 3, 4, 8]}" http:https://localhost:8080/api/sheet