lila icon indicating copy to clipboard operation
lila copied to clipboard

/fide could have an API for developers

Open SergioGlorias opened this issue 3 months ago • 4 comments

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.

SergioGlorias avatar Mar 30 '24 00:03 SergioGlorias

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.

lenguyenthanh avatar Mar 30 '24 02:03 lenguyenthanh

I wouldn't mind if we added the API.

ornicar avatar Mar 30 '24 06:03 ornicar

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'

lenguyenthanh avatar Apr 04 '24 02:04 lenguyenthanh

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

lenguyenthanh avatar Apr 11 '24 06:04 lenguyenthanh