lichess-org / lichess-org/api

Suggestion on improving the crosstable API

Open
#610 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.