You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Bart_info.art.src%7D?q=api&page=67&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 15476 results for "api"(765ms)
20app.get("/shared/*", c => serveFile(c.req.path, import.meta.url));
2122// API Routes
23app.get("/api/presentations", async c => {
24const presentations = await getPresentations();
25return c.json(presentations);
26});
2728app.post("/api/presentations", async c => {
29const body = await c.req.json();
30const { title, presenter } = body;
38});
3940app.put("/api/presentations/:id", async c => {
41const id = c.req.param("id");
42const body = await c.req.json();
51});
5253app.delete("/api/presentations/:id", async c => {
54const id = c.req.param("id");
55await deletePresentation(parseInt(id));
3738try {
39const response = await fetch('/api/presentations', {
40method: 'POST',
41headers: {