Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$2?q=fetch&page=1070&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 12794 results for "fetch"(1339ms)

blushAardwolfmain.tsx3 matches

@stevekrouse•Updated 11 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3const blog_bookmark = await fetchJSON(
4 "https://datasette.simonwillison.net/simonwillisonblog/blog_blogmark.json?_labels=on&_shape=objects",
5);
6
7const blog_quotation = await fetchJSON(
8 "https://datasette.simonwillison.net/simonwillisonblog/blog_quotation.json?_labels=on&_shape=objects",
9);

cmdkmain.tsx1 match

@pomdtr•Updated 11 months ago
3const app = createApp(Deno.env.get("valtown"));
4
5export default app.fetch;

date_me_formmain.tsx2 matches

@vawogbemi•Updated 11 months ago
3import { sqlite } from "https://esm.town/v/std/sqlite?v=5";
4import date_me_doc_locations from "https://esm.town/v/stevekrouse/date_me_doc_locations";
5import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
6import Layout from "https://esm.town/v/vawogbemi/dateme_layout";
7import { Hono } from "npm:hono@3";
196form.get("/", Form);
197form.post("/", Submit);
198export default reloadOnSaveFetchMiddleware(form.fetch);

sqliteExplorerAppmain.tsx4 matches

@vawogbemi•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import { iframeHandler } from "https://esm.town/v/nbbaier/iframeHandler";
5import { resetStyle } from "https://esm.town/v/nbbaier/resetStyle";
16import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
17import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite";
18import { reloadOnSaveFetchMiddleware } from "https://esm.town/v/stevekrouse/reloadOnSave";
19import { Hono } from "npm:hono";
20import type { FC } from "npm:hono/jsx";
175});
176
177export const handler = app.fetch;
178export default iframeHandler(modifyFetchHandler(passwordAuth(handler, { verifyPassword: verifyToken })));

blob_adminmain.tsx2 matches

@vawogbemi•Updated 11 months ago
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
133});
134
135export default modifyFetchHandler(passwordAuth(app.fetch));

readwiseHighlightsmain.tsx1 match

@zerovox•Updated 11 months ago
12 }
13 console.log("Making export api request with params " + queryParams.toString());
14 const response = await fetch("https://readwise.io/api/v2/export/?" + queryParams.toString(), {
15 method: "GET",
16 headers: {

readwiseReaderDocumentListmain.tsx1 match

@zerovox•Updated 11 months ago
44 }
45 console.log("Making export api request with params " + queryParams.toString());
46 const response = await fetch("https://readwise.io/api/v3/list/?" + queryParams.toString(), {
47 method: "GET",
48 headers: {

readwiseReaderDocumentListREADME.md1 match

@zerovox•Updated 11 months ago
1Reader docs here: https://readwise.io/reader_api
2
3Adapted from the example code. Fetches items from Readwise Reader given a token, and optional updatedAfter and location parameters.

readwiseReaderReadItemsRssREADME.md1 match

@zerovox•Updated 11 months ago
5In order to get read items from Readwise Reader -> Workflowy, this turns the read items (aka "archive") into an RSS feed, which Zapier picks up, and creates bullets in Workflowy.
6
7Ideally would store the generated RSS or the last fetch date, and only get new items, but for now `readwiseReaderDocumentList` re-fetches the full history each time.

valTownChatGPTmain.tsx2 matches

@simonw•Updated 11 months ago
33
34 // Post the message so we can deal with large text data.
35 await fetch(`/post-message?threadId=${input.getAttribute("data-thread-id")}`, {
36 method: "post",
37 body: msgDiv.textContent,
147 return new Response(body, { headers: { "Content-Type": "text/event-stream" } });
148});
149export default app.fetch;

fetch-socials4 file matches

@welson•Updated 2 days ago
fetch and archive my social posts

fetchRssForSubcurrent2 file matches

@ashryanio•Updated 2 days ago