WandererXII / lishogi

☗ lishogi.org: the forever free, adless and open source shogi server forked from lichess.org ☗
https://lishogi.org
GNU Affero General Public License v3.0
265 stars 40 forks source link

Document endpoint /api/player/autocomplete (fix #847) #848

Closed ddugovic closed 2 months ago

ddugovic commented 2 months ago

I am struggling to test this patch at the moment, however I think this should be close to correct.

WandererXII commented 2 months ago

/player/autocomplete is used in some places, so I think it would be better to keep that url.

ddugovic commented 2 months ago

OK... other lila-based sites use prefix /api for API endpoints, but Lishogi can be different for backward compatibility reasons.

ddugovic commented 2 months ago

Sorry... actually, could I update the "ui" references to this endpoint to use /api/player/autocomplete ? Long-term it may help both future lishogi development (copying code from lila) and help client API designers to expect the same endpoint on both Lichess and Lishogi.

I can't imagine there being many other consumers of this endpoint (like mobile applications) since for Lishogi this endpoint wasn't documented/announced yet.

WandererXII commented 2 months ago

LGTM, thanks!