verification
use it
# add to stunt.yaml
services:
reddit:
adapter: embedded:reddit-style
# then
$ stunt upThe embedded: source extracts this adapter from the binary — no git clone, fully offline.
how to mock the Reddit API locally
Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Reddit API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Reddit API 1.0 surface — the data is fake, the behavior is real.
backing stores
tokensrefresh_tokensposts
api surface (2)
generated from the adapter manifest — exactly what boots, nothing more
2 routes
POST/api/v1/access_token
POST/api/submit
VM-verified behaviors (8)
- ✓a missing or generic User-Agent is 429 on both routes
- ✓the token endpoint requires HTTP Basic client credentials
- ✓a permanent authorization_code mints access and refresh together
- ✓a refresh grant returns a fresh access token and no new refresh
- ✓submit requires a bearer the adapter itself minted
- ✓a valid submit returns the t3_ thing envelope
- ✓missing sr or title stay HTTP 200 with Reddit error triples
- ✓an access token dies after its one-hour window
Not implemented (5)
- No listing endpoints (subreddit hot/new/top, thread comment pages)
- No votes or comments (/api/vote, /api/comment)
- No identity endpoint (GET /api/v1/me)
- No token revocation (POST /api/v1/revoke_token)
- No subreddit, search, or inbox/messages endpoints
Differs from the real API (3)
- User-Agent gate simplified: any UA containing / and ( passes, else 429
- The authorization_code grant never validates code or redirect_uri — any or missing code mints tokens
- Post ids are plain sequence strings, not Reddit base36
want more of the Reddit API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.