Suggestion on improving the crosstable API
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 597
- Forks
- 176
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 6
Description
Right now the crosstable API receives just two users and returns a total number of games and the score for each user.
These are my issues with it:
- the number of games is pointless, as it is the total of the two player scores
- it matters what kind of games they were. It makes no sense to add bullet scores to correspondence or variants scores
- the output of the API contains a lot less information that the graphical component called crosstable, which makes this endpoint feel like something else.
- it's inefficient when having to show crosstables in lists, like in any list of games or the lobby - where a user requested it specifically.
So my recommendation is a second POST endpoint for crosstable which receives a JSON array of tuples of player ids and returns the array of crosstable scores split per game type (blitz, bullet, atomic, etc.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documented GET /api/crosstable/{user1}/{user2} endpoint and compare its response with the graphical crosstable component. Clarify the POST request and per-game-type response shape, batching behavior, and completion criteria before identifying the implementation and documentation changes.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100