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/?q=fetch&page=284&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 3120 results for "fetch"(393ms)

val_town_clientmain.tsx1 match

@stevekrouse•Updated 12 months ago
1import { paths } from "https://esm.town/v/pomdtr/openapi_schema";
2import createClient2 from "npm:openapi-fetch";
3
4/**

amaranthTakinmain.tsx2 matches

@stevekrouse•Updated 12 months ago
1import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
2import { form } from "https://esm.town/v/stevekrouse/date_me_form";
3import browse from "https://esm.town/v/stevekrouse/dateme_browse";
13app.get("/faq", faq);
14app.get("/rss.xml", c => dateMeRSS(c.req as unknown as Request));
15export default modifyFetchHandler(app.fetch, {
16 style: `@media (max-width: 500px) {
17 .github-fork-ribbon {

getColormain.tsx1 match

@stevekrouse•Updated 12 months ago
65
66const app = new Hono();
67export default app.fetch;
68app.get("/", async (c) => {
69 const url = c.req.query("url");

newValTownOpenAPImain.tsx2 matches

@stevekrouse•Updated 12 months ago
1import { blob } from "https://esm.town/v/std/blob?v=12";
2import { email } from "https://esm.town/v/std/email?v=9";
3import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
4
5export let newValTownOpenAPI = async () => {
6 const savedSpec = await blob.getJSON("vtOpenAPI");
7 let currentSpec = await fetchText(
8 "https://www.val.town/docs/openapi.yaml",
9 );

telegrammain.tsx1 match

@stevekrouse•Updated 1 year ago
25
26async function telegramRequest(path, body, authorization?: string) {
27 const response = await fetch("https://stevekrouse-telegramValTownAPI.web.val.run/" + path, {
28 method: "POST",
29 body: JSON.stringify(body),

telegramSendMessagemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendMessage = async (botToken: string, options: TelegramSendMessageOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendMessage`,
6 {

telegramSendPhotomain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const telegramSendPhoto = async (botToken: string, options: TelegramSendPhotoOptions) =>
4 fetchJSON(
5 `https://api.telegram.org/bot${botToken}/sendPhoto`,
6 {

passkey_scriptmain.tsx1 match

@stevekrouse•Updated 1 year ago
35
36async function postJson(url, body?) {
37 return await fetch(url, {
38 method: "POST",
39 headers: { "Content-Type": "application/json" },

passkeys_demomain.tsx1 match

@stevekrouse•Updated 1 year ago
298 return c.json("success");
299});
300export default app.fetch;

myspacemain.tsx2 matches

@stevekrouse•Updated 1 year ago
2import { Hono } from "npm:hono@3";
3
4// TODO: Fetch from key-value
5const profile = {
6 displayName: "Jordan",
169app.get("/", (c) => c.html(myspaceHtml(profile)));
170
171export default app.fetch;

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago