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=748&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 7885 results for "fetch"(1402ms)

fetchTimelinemain.tsx3 matches

@dpetrouk•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchTimeline(url, options) {
4 // const tweetId = url.match(/\/(\d*)\?+/)[1];
5 // const tweetUrl =
6 // `https://cdn.syndication.twimg.com/tweet-result?id=${tweetId}&lang=en`;
7 // return { url, tweetId, tweetUrl };
8 const res = await fetch(
9 "https://syndication.twimg.com/srv/timeline-profile/screen-name/patttten",
10 // "https://cdn.syndication.twimg.com/timeline/profile?screen_name=patttten",

LoginPelotonmain.tsx2 matches

@steveb1313•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
6 res: express.Response,
7) {
8 let response = await fetch("https://api.onepeloton.com/auth/login", {
9 method: "POST",
10 mode: "no-cors",

GetPelotonUsermain.tsx3 matches

@steveb1313•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3
6 res: express.Response,
7) {
8 let response = await fetch("https://api.onepeloton.com/auth/login", {
9 method: "POST",
10 mode: "no-cors",
20 });
21 const session = await response.json();
22 let userResponse = await fetch(
23 `https://api.onepeloton.com/api/user/${session["user_id"]}`,
24 {

replitDeletemain.tsx2 matches

@claytn•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let replitDelete = (REPLIT_DB_URL, key) =>
4 fetch(`${REPLIT_DB_URL}/${key}`, { method: "DELETE" });

githubStarredmain.tsx2 matches

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

reactSSRExamplemain.tsx2 matches

@jonbo•Updated 1 year ago
1import { fetchBcycleCounts } from "https://esm.town/v/jonbo/fetchBcycleCounts";
2
3export const reactSSRExample = async (req: express.Request, res: express.Response) => {
26 return React.createElement("ul", null, bikeEls);
27 }
28 const data = fetchBcycleCounts;
29 const filtered = data.filter((row) => row.id == 7305 || row.id == 1871);
30 // Get current time in MST

duckdbExamplemain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let duckdbExample = (async () => {
4 async function createWorker(url: string) {
5 const workerScript = await fetch(url);
6 const workerURL = URL.createObjectURL(await workerScript.blob());
7 return new Worker(workerURL, { type: "module" });

rimemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { rimeRateLimitExceeded } from "https://esm.town/v/stevekrouse/rimeRateLimitExceeded";
4
12 if (rimeRateLimitExceeded(text))
13 return "Rime rate limit exceeded";
14 return fetchJSON(
15 "https://rjmopratfrdjgmfmaios.functions.supabase.co/rime-tts",
16 {

testNasamain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export const testNasa = fetchJSON(
5 `https://api.nasa.gov/planetary/apod?api_key=${process.env.nasa}&date=1995-06-16`,
6);

untitled_scarletHoverflymain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export let untitled_scarletHoverfly = fetchJSON(
5 "https://api.val.town/v1/eval",
6 {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago