Trumpets for everyone! The JSON API of Pouët.net, on https://api.pouet.net, which lists the endpoints.
The API runs on www's code. config.inc.php (gitignored, template
config.inc.php.dist) points POUETAPI_POUET_ROOT_LOCAL at a
pouet-www checkout, whose
bootstrap gives the database access. The POUETAPI_RATELIMIT_* constants
turn on rate limiting, which uses www's Redis. .htaccess sends every
request to _rewrite.php, which picks the v1_*.php endpoint.
The local stack (Docker images matching production, configs and sample data) lives in pouet-infra, which is only open to the team for now. If you have access:
git clone git@github.com:pouetnet/pouet-infra.git
cd pouet-infra
just setupThis clones this repo and the other site repos under sites/, starts
everything and loads sample data. The API is then on
http://localhost:8081. pouet-infra's ARCHITECTURE.md describes how it
runs in production.
Open a pull request against master. PRs are squash-merged once CI
passes, and a merged PR is live on api.pouet.net within a minute.