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/$%7BsvgDataUrl%7D?q=fetch&page=4&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 14071 results for "fetch"(2915ms)

zerto-lifecycle-matrixREADME.md1 match

@captn3m0Updated 11 hours ago
5Generated using Val.town
6
7Relies on the Zoomin Software bundle API to fetch the data using the JSON API, and then pluck and render the HTML part.

zerto-lifecycle-matrixmain.tsx2 matches

@captn3m0Updated 11 hours ago
1export default async function (req: Request): Promise<Response> {
2 try {
3 const response = await fetch("https://help-be.zerto.com/api/bundle/Lifecycle.Matrix.HTML/page/product_version_lifecycle_matrix_for_zerto.html");
4
5 if (!response.ok) {
16 });
17 } catch (error) {
18 console.error('Error fetching data:', error);
19 return new Response(`<p>Error: ${error.message}</p>`, {
20 status: 500,

Loudaily_lineup_scheduler.tsx10 matches

@jeffvincentUpdated 12 hours ago
188 // Call MLB Stats API for probable pitchers
189 const dateStr = date.toISOString().split("T")[0];
190 const response = await fetch(
191 `https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=${dateStr}&hydrate=probablePitcher`,
192 );
221 return pitchers;
222 } catch (error) {
223 console.error(`❌ Error fetching probable pitchers:`, error);
224 return [];
225 }
465 private async refreshAccessToken(): Promise<void> {
466 try {
467 const response = await fetch("https://api.login.yahoo.com/oauth2/get_token", {
468 method: "POST",
469 headers: {
530 console.log(`🔍 Making request to: ${url.toString()}`);
531
532 const response = await fetch(url.toString(), {
533 headers: {
534 "Authorization": `Bearer ${this.config.access_token}`,
543
544 // Retry the request with new token
545 const retryResponse = await fetch(url.toString(), {
546 headers: {
547 "Authorization": `Bearer ${this.config.access_token}`,
593 // Get user's leagues using the specific game key
594 const leaguesEndpoint = `/users;use_login=1/games;game_keys=${gameKey}/leagues`;
595 console.log(`🔍 Fetching leagues with endpoint: ${leaguesEndpoint}`);
596 const leaguesResponse = await this.makeRequest(leaguesEndpoint);
597
625 return leagues;
626 } catch (error) {
627 console.error("❌ Error fetching user leagues:", error);
628 return [];
629 }
735 return players;
736 } catch (error) {
737 console.error(`Error fetching roster for team ${teamKey}:`, error);
738 return [];
739 }
764 console.log(`📝 XML body: ${xmlBody}`);
765
766 const response = await fetch(`${this.baseUrl}/team/${teamKey}/roster`, {
767 method: "PUT",
768 headers: {
796
797 // Store results in Val.town's blob storage for history
798 await fetch("https://api.val.town/v1/blob/scheduler_results", {
799 method: "POST",
800 headers: {

NewPerspctovologyAppmain.tsx1 match

@hxseidmanUpdated 13 hours ago
15 // 🧠 Optional: Call your GPT API here (if you want real answers)
16 // Example:
17 // const response = await fetch("https://YOUR-GPT-ENDPOINT", ...)
18
19 // For now: respond with a success confirmation

invest-trackercrypto_news_cron.tsx2 matches

@samxii777Updated 13 hours ago
7
8export default async function run() {
9 /* 1 ▸ fetch 10 freshest business headlines that mention our coins */
10 const q = encodeURIComponent(COINS.slice(0, 3).join(" OR "));
11 const url = `https://newsdata.io/api/1/latest?apikey=${KEY}`
12 + `&q=${q}&language=en&size=10&category=business`;
13
14 const res = await fetch(url).then(r => r.json());
15 const hits = Array.isArray(res.results) ? res.results : [];
16

invest-trackermacro_news_daily.tsx1 match

@samxii777Updated 14 hours ago
11 })&language=en&sortBy=publishedAt&pageSize=10&apiKey=${KEY}`;
12
13 const arts = (await fetch(query).then(r => r.json())).articles ?? [];
14 const top2 = arts.slice(0, 2).map(a => ({
15 title: a.title,

beeminder-apimain.tsx8 matches

@cricks_unmixed4uUpdated 14 hours ago
76 };
77
78 const response = await fetch(`${baseUrl}/users/me/goals/${goalSlug}/datapoints.json`, {
79 method: 'POST',
80 headers: {
113
114 // First, get the current goal to retrieve the roadall
115 const getResponse = await fetch(`${baseUrl}/users/me/goals/${goalSlug}.json?auth_token=${authToken}`);
116 if (!getResponse.ok) {
117 const error = await getResponse.json();
118 throw new Error(JSON.stringify({ error: 'Failed to fetch current goal', details: error }));
119 }
120
143 };
144
145 const response = await fetch(`${baseUrl}/users/me/goals/${goalSlug}.json`, {
146 method: 'PUT',
147 headers: {
206 }
207
208 const response = await fetch(`${baseUrl}/users/me/goals/${goalSlug}.json?auth_token=${token}`);
209 const goal: BeeminderGoal = await response.json();
210
211 if (!response.ok) {
212 return new Response(JSON.stringify({ error: 'Failed to fetch goal', details: goal }), {
213 status: response.status,
214 headers: { 'Content-Type': 'application/json' }
251 }
252
253 const response = await fetch(`${baseUrl}/users/me/goals/${goalSlug}/datapoints.json?auth_token=${token}`);
254 const datapoints = await response.json();
255
256 if (!response.ok) {
257 return new Response(JSON.stringify({ error: 'Failed to fetch datapoints', details: datapoints }), {
258 status: response.status,
259 headers: { 'Content-Type': 'application/json' }

gissue-rolodexApp.tsx1 match

@cricks_unmixed4uUpdated 14 hours ago
21
22 try {
23 const response = await fetch("/api/config", {
24 method: "POST",
25 headers: {

gissue-rolodexindex.ts1 match

@cricks_unmixed4uUpdated 14 hours ago
47});
48
49export default app.fetch;

honoExampleBkndmain.tsx1 match

@dswbxUpdated 15 hours ago
3const app = await createAdapterApp();
4
5export default app.fetch;

FetchBasic2 file matches

@therUpdated 6 days ago

GithubPRFetcher

@andybakUpdated 1 week ago