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=1123&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 13403 results for "fetch"(1413ms)

plumOwlmain.tsx4 matches

@tempguy•Updated 11 months ago
1import { fetch as proxyFetch } from "https://esm.town/v/std/fetch";
2const Fetch = fetch;
3
4interface ShowBox {
12}
13export default async function(req: Request): Promise<Response> {
14 const showbox = await Fetch("https://www.showbox.media/index/share_link?id=55137&type=1", {
15 headers: {
16 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0",
24 const febboxUrl = `https://www.febbox.com/share/${febboxId}`;
25 console.log(febboxId);
26 const febboxItemRequest = await fetch(`https://www.febbox.com/file/file_share_list?share_key=${febboxId}`, {
27 headers: {
28 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0",

discordBotmain.tsx2 matches

@dglazkov•Updated 11 months ago
1import { verify_discord_signature } from "https://esm.town/v/mattx/verify_discord_signature?v=8";
2import { fetch } from "https://esm.town/v/std/fetch";
3
4export type Snowflake = string;
95 (async () => {
96 const data = await response;
97 const update = await fetch(
98 `https://discord.com/api/v10/webhooks/${body.application_id}/${body.token}/messages/@original`,
99 {

blackLobstermain.tsx1 match

@boson•Updated 11 months ago
62 try {
63 await sleepRand(15);
64 const response = await fetch(NOAA_URL_TKPK, {
65 headers: { "User-Agent": "https://www.val.town/v/kingishb/blackLobster" },
66 });

googlenewsmain.tsx1 match

@dglazkov•Updated 11 months ago
53
54const getNews = async ({ query }: { query: string }) => {
55 const response = await fetch(
56 getFeedUrl(query),
57 );

detectNewWebsiteContentsmain.tsx3 matches

@vipshek•Updated 11 months ago
8
9export const detectNewWebsiteContents = async () => {
10 // Fetch contents
11 let contents;
12 try {
13 const res = await fetch(URL, { redirect: "follow" });
14 if (res.status !== 200) {
15 console.log(`bad status code: ${res.status}`);
17 contents = await res.text();
18 } catch (e) {
19 console.log(`couldn't fetch: ${e}`);
20 }
21

detectNewWebsiteContentsREADME.md1 match

@vipshek•Updated 11 months ago
1## Detect New Website Contents
2
3This val fetches a given publicly-accessible URL and detects whether its contents have changed. If they have, it sends an email to notify about the change.
4
5Changes are detected by computing a quick hash of the website's contents, storing the hash, and comparing against the previously stored hash on each request. Trivial changes to the website's contents will count as a change, which may not be desired for some use cases.

smallwebDashboardmain.tsx1 match

@pomdtr•Updated 11 months ago
65
66export default {
67 fetch: auth(app.fetch),
68};
69

cronLoggermain.tsx2 matches

@nbbaier•Updated 11 months ago
2import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
3import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
4import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=45";
5import { refs } from "https://esm.town/v/stevekrouse/refs?v=11";
6
26 headers["Authorization"] = `Bearer ${token}`;
27 }
28 const { id } = await fetchJSON(`${API_URL}/v1/alias/${userHandle}/${valName}`, { headers });
29
30 const table_name = "cron_evals";

umbrellaRemindermain.tsx2 matches

@benrobo•Updated 11 months ago
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { nominatimSearch } from "https://esm.town/v/stevekrouse/nominatimSearch";
4import { weatherGovGrid } from "https://esm.town/v/stevekrouse/weatherGovGrid";
14 lon,
15 });
16 let { properties: { periods } } = await fetchJSON(
17 grid.forecastHourly,
18 );

weather_forecast_in_the_morningmain.tsx4 matches

@benrobo•Updated 11 months ago
77};
78
79const fetchForecast = async () => {
80 const response = await fetch(
81 `https://api.openweathermap.org/data/2.5/forecast?lat=${latitude}&lon=${longitude}&units=metric&appid=${openWeatherMapAppId}`,
82 );
104 const telegramSendUrl =
105 `https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage?chat_id=${TELEGRAM_CHAT_ID}&parse_mode=HTML&disable_notification=true&text=${text}`;
106 await fetch(telegramSendUrl);
107};
108export default async function(interval: Interval) {
109 const forecast = await fetchForecast();
110 const formatted = formatWeatherForecast(forecast);
111

GithubPRFetcher

@andybak•Updated 2 days ago

proxiedfetch1 file match

@jayden•Updated 2 days ago