lila
lila copied to clipboard
/fide could have an API for developers
I know it might be controversial, but we could provide a simple API for /fide
developers.
FIDE doesn't officially provide an API, and many people don't know about the transferable database or for some code it would be a burden to have to take care of it or scrap it from the FIDE website.
I realise it could increase the load on the server, but it could help developers who want to get some data from FIDE.
I think, as you said, it would increase unnecessary load to our sever.
And it's quite easy to develop a standalone service for it as well.
mm, I may have time to do it soonish.
I wouldn't mind if we added the API.
My experiment with a standalone fide api: https://github.com/lenguyenthanh/fide
Not saying We should go with it, but I just having fun trying new things.
I'm using smithy with smithy4s to create design API (actually just copy what We have). It's really enjoyable process.
By just writing the smithy
protocol and few lines of code, We can bootstrap the server and have openapi specification ready for us.
If anyone wants to try, just clone it and run:
sbt backend/run
open 'http://localhost:9000/docs'
My experiment with a standalone fide api: https://github.com/lenguyenthanh/fide
I published this at: https://fide.thanh.se/docs/index.html. Anyone feel free to try (Just expand an endpoint, and click Try it out
button) and give me feedback.
Currently only support /api/players
endpoint with a lot of filters. Will support other endpoints eventually.
Edit: You can find some curl examples here: https://github.com/lenguyenthanh/fide?tab=readme-ov-file#examples