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/image-url.jpg%20%22Image%20title%22?q=fetch&page=3&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 8251 results for "fetch"(512ms)

FetchBasic1 file match

@stevekrouse•Updated 5 months ago

cfetch2 file matches

@temptemp•Updated 5 months ago

brooklynWeatherFetcher1 file match

@jjoak3•Updated 5 months ago

fetchNewPublicGitHubRepos1 file match

@toowired•Updated 5 months ago

fetchXML2 file matches

@g000m•Updated 5 months ago

FetchBasic2 file matches

@julesb22•Updated 6 months ago

FetchBasic_deleted_17295039551 file match

@julesb22•Updated 6 months ago

fetchValInfo2 file matches

@pomdtr•Updated 6 months ago

mlbScoreFetcher1 file match

@charmaine•Updated 6 months ago

ThreadmarkLISTFetcher22 file matches

@willthereader•Updated 7 months ago

EEPMOnitoringApp.tsx8 matches

@solomonferede•Updated 15 mins ago
42 const handleLogin = async (username, password) => {
43 try {
44 const response = await fetch("/login", {
45 method: "POST",
46 headers: { "Content-Type": "application/json" },
377 }
378
379 if (path === "/fetch-news" && method === "GET") {
380 const newsArticles = await sqlite.execute(`SELECT * FROM ${KEY}_news_articles ORDER BY created_at DESC`);
381 return new Response(JSON.stringify({ articles: newsArticles.rows }), {
384 }
385
386 if (path === "/fetch-media" && method === "GET") {
387 const mediaEntries = await sqlite.execute(`SELECT * FROM ${KEY}_media_monitoring ORDER BY created_at DESC`);
388 return new Response(JSON.stringify({ entries: mediaEntries.rows }), {
476
477 if (result.rowsAffected > 0) {
478 // Fetch the updated article to return it to the client
479 const updatedArticle = await sqlite.execute(`SELECT * FROM ${KEY}_news_articles WHERE id = ?`, [id]);
480
487 // This case should ideally not happen if rowsAffected > 0, but good for robustness
488 return new Response(
489 JSON.stringify({ success: false, message: "Article updated but could not be refetched" }),
490 {
491 status: 500, // Internal Server Error
538
539 if (result.rowsAffected > 0) {
540 // Fetch the updated entry to return it
541 const updatedEntry = await sqlite.execute(`SELECT * FROM ${KEY}_media_monitoring WHERE id = ?`, [id]);
542 return new Response(JSON.stringify({ success: true, entry: updatedEntry.rows[0] }), {
573 const sevenDaysAgoISO = sevenDaysAgo.toISOString(); // e.g., "2023-10-27T10:00:00.000Z"
574
575 // Fetch news article counts per author in the last 7 days
576 const newsCountsResult = await sqlite.execute(
577 `
584 );
585
586 // Fetch media monitoring counts per author in the last 7 days
587 const mediaCountsResult = await sqlite.execute(
588 `

stevensDemosendDailyBrief.ts1 match

@lm3m•Updated 17 mins ago
135 const lastSunday = today.startOf("week").minus({ days: 1 });
136
137 // Fetch relevant memories using the utility function
138 const memories = await getRelevantMemories();
139