Files
billboard/README.md
T
2026-08-08 11:22:27 +02:00

30 lines
911 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
```
![amogus](https://stuff.pinkro.se/amogi.png)