Initial commit

This commit is contained in:
2026-08-08 11:04:45 +02:00
commit 4137962252
10 changed files with 1322 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# billboard
Public pixel-canvas / message billboard. Runs at https://billboard.pinkro.se
## API
Palette colors are indices 015 (standard ANSI colors). Origin is top-left.
```sh
# place one pixel
curl -X POST localhost:8080/api/pixel -d '{"x":10,"y":5,"color":3}'
# place many pixels atomically (1-2048 per request, fails as a whole if any is invalid)
curl -X POST localhost:8080/api/pixels -d '{"pixels":[{"x":1,"y":1,"color":3},{"x":2,"y":1,"color":4}]}'
# stamp a full image (max 32x32) at offset x,y; edges clip
curl -X POST localhost:8080/api/image -d '{"x":20,"y":8,"pixels":[[0,4,4,0],[4,4,4,4],[4,0,0,4],[0,4,4,0]]}'
# post a message (max 140 chars, last 50 kept)
curl -X POST localhost:8080/api/message -d '{"text":"hello billboard"}'
# full state snapshot
curl localhost:8080/api/state
# live event stream
curl -N localhost:8080/api/events
```