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=300&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 3114 results for "fetch"(348ms)

1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const politelyinvinciblepointerHandleFormEx = (async () => {
4 let body = { args: [{ email: "example@example.com" }] };
5 const response =
6 (await fetch(
7 "https://api.val.town/v1/run/politelyinvinciblepointer.handleForm",
8 {

postWebhookTest1main.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let postWebhookTest1 = fetchJSON(
4 "https://stevekrouse-postWebhook1.express.val.run",
5 {

textToImageDallemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export const textToImageDalle = async (
16 message: string;
17 };
18 } = await fetchJSON(
19 "https://api.openai.com/v1/images/generations",
20 {

valTownApiExampleUsermain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let valTownApiExampleUser = (async () => {
4 const handle = "tmcw";
5 const response = await fetch(`https://api.val.town/v1/alias/${handle}`);
6 const json = await response.json();
7 return json;

githubStarredmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3// Cities named Brooklyn
4export let githubStarred = fetchJSON(
5 "https://api.github.com/users/stevekrouse/starred",
6);

openAqNowcastAQImain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { nowcastPMAqi } from "https://esm.town/v/stevekrouse/nowcastPMAqi";
2import { msHour } from "https://esm.town/v/stevekrouse/msHour";
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
4
5export async function openAqNowcastAQI({ location_id }) {
6 const { results } = await fetchJSON(
7 "https://api.openaq.org/v2/measurements?" +
8 new URLSearchParams({

exampleBirdmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchABird } from "https://esm.town/v/crsven/fetchABird?v=1";
2
3export let exampleBird = fetchABird();

fetchHTMLmain.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { parseHTML } from "https://esm.town/v/stevekrouse/parseHTML";
2import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
3
4// this function doesn't work yet, I'm still iterating on it
5export function fetchHTML(url: string, options?: any) {
6 return fetchText(url, options)
7 .then(parseHTML);
8}

noProxyExmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
2
3export const noProxyEx = fetchText(
4 "https://www.schools.nyc.gov/docs/default-source/school-menus/2022-2023/june/pre-k---8-lunch-menu",
5 {

dateMeProfilesmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { dateMeURL } from "https://esm.town/v/stevekrouse/dateMeURL";
2import { fetchTable } from "https://esm.town/v/stevekrouse/fetchTable";
3
4export const dateMeProfiles = fetchTable(
5 dateMeURL,
6);

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago