DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
723 stars 254 forks source link

Add team's penalty time to API #317

Closed myungwoo closed 6 years ago

myungwoo commented 6 years ago

Since there is a few custom scoreboard like Spotboard, team's penalty time must show on API (e.g. /api/teams).

I'd like to add this feature to the v5.3 lineup. 😄

meisterT commented 6 years ago

Perhaps I do understand wrong what you actually want to request, but the total time of a team (which includes penalty time) is given in the scoreboard endpoint of the API: https://github.com/DOMjudge/domjudge/blob/5.3/www/api/index.php#L1266

myungwoo commented 6 years ago

Since, Spotboard only accepts data with two files, contest.json, and runs.json to show below information either. image Spotboard demo link So it needs team's default penalty instead of total penalty. And I believe there's another external scoreboard like Spotboard. Thus, for an extension purpose, it's good to serve team's default penalty on API. Thank you,

eldering commented 6 years ago

It there a particular reason you're using the contest and runs API endpoints and not the scoreboard?

I think that one would be better because then you're leaving the scoring calculation to the contest control system, which should be the correct, authoritative source of truth. Also, the team penalty time would automatically be included.

meisterT commented 6 years ago

You may want to integrate your scoreboard with https://clics.ecs.baylor.edu/index.php/Contest_API which PC^2, Kattis and DOMjudge implement.

eldering commented 6 years ago

Closing for now as the reason to add it is unclear and alternatives exist. Feel free to reopen.