SergioGlorias / fide

Experimental FIDE Api

Home Page:https://fide.thanh.se/docs/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experimental FIDE API

How to use

Check Open API docs

Examples

Get all players

curl 'fide.thanh.se/api/players'

Get top 10 players by standard rating with descending order

curl 'fide.thanh.se/api/players?sort_by=standard&order=desc&size=10'

Get all players sort by blitz rating and is active on page 5

curl 'fide.thanh.se/api/players?sort_by=blitz&order=desc&page=5&is_active=true'

Development

Prerequisites:

  • Docker

Run (with sbt locally)

Also requires JDK 21 with sbt

cp .env.example .env
docker compose up -d
sbt backend/run

Run (with sbt in Docker)

COMPOSE_PROFILES=sbt docker compose up -d

Usage

open http://localhost:9669/docs // you may need to wait a bit for syncing
curl http://localhost:9669/api/players

Database viewer

http://localhost:8180/?pgsql=db&username=admin&db=fide&ns=fide (password: dummy)

Before submitting PR

sbt test
sbt lint

About

Experimental FIDE Api

https://fide.thanh.se/docs/index.html

License:GNU Affero General Public License v3.0


Languages

Language:Scala 89.2%Language:Smithy 7.9%Language:PLpgSQL 2.3%Language:Procfile 0.3%Language:Dockerfile 0.3%