copypasta-010
Daily Challenge - by arlix
Last updated
TARGET="lab-1784407345160-nv7vdo.labs-app.bugforge.io"curl -sk -X POST https://$TARGET/api/register -H "Content-Type: application/json" -d '{"username":"0xb0b","email":"0xb0b@bugforge.io","password":"0xb0b0xb0b"}'TOKEN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NiwidXNlcm5hbWUiOiIweGIwYiIsImlhdCI6MTc4NDQwODEzOX0.yl_01KuuQyXqLnU5osEayxyl2qVa7kH0AWgLUBDi9tM"https://lab-1784407345160-nv7vdo.labs-app.bugforge.io/snippet/8Quick notes for anyone scripting against our snippet search.
Basic:
GET /api/snippets/public?search=<text>&language=<lang>
Advanced field filters (narrow the public list by a stored field):
GET /api/snippets/public?filter[language]=python
GET /api/snippets/public?filter[title]=Fetch API Helper
This endpoint only ever lists snippets that are marked public.curl -sk -G "https://$TARGET/api/snippets/public" --data-urlencode 'filter[is_public][$ne]' -H "Authorization: Bearer $TOKEN"