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/$2?q=fetch&page=57&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 13597 results for "fetch"(1108ms)

templateTwitterAlertmain.tsx1 match

@JUSTO•Updated 4 days ago
19 : Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
20
21 // Fetch and log tweets
22 const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23 console.log("Response from socialDataSearch:", response);

untitled-4435main.tsx13 matches

@Cfvvvvv•Updated 4 days ago
604 const triggerTelegramInteraction = async (chatId) => {
605 try {
606 const response = await fetch("/handle-telegram-interaction", {
607 method: "POST",
608 headers: { "Content-Type": "application/json" },
621 };
622
623 const fetchUserBalance = async () => {
624 let userId = null;
625 let isTelegramEnv = false;
674 if (userId) {
675 try {
676 const response = await fetch(`/get-balance?uid=${userId}`);
677 if (!response.ok) {
678 try {
699 }
700 } catch (error) {
701 console.error("Failed to fetch or process balance:", error.toString());
702 setBalance("Error");
703 }
704 } else {
705 console.error("User ID could not be determined for balance fetching.");
706 setBalance("--.--");
707 }
731 window.Telegram.WebApp.ready();
732 }
733 fetchUserBalance();
734 } else if (isTelegramWebAppPresent) {
735 console.log(
736 "Telegram script present, but user data not immediately available or ready() pending. Setting timeout for balance fetch.",
737 );
738 if (window.Telegram.WebApp.ready) {
739 window.Telegram.WebApp.ready();
740 }
741 scriptLoadTimeoutId = setTimeout(fetchUserBalance, 300);
742 } else {
743 console.log("Not in Telegram environment. Proceeding as web user for balance fetch.");
744 fetchUserBalance();
745 }
746 }
882 setShowSpinner(true);
883
884 const response = await fetch("/save-credentials", {
885 method: "POST",
886 headers: { "Content-Type": "application/json" },
1884 const sendActualTelegramAPIMessage = async (botToken, chatId, text, parseMode = "Markdown") => {
1885 try {
1886 const response = await fetch(`https://api.telegram.org/bot${botToken}/sendMessage`, {
1887 method: "POST",
1888 headers: { "Content-Type": "application/json" },
2194 if (confirm('Are you sure you want to unban this user?')) {
2195 try {
2196 const response = await fetch('/unban-telegram-user', {
2197 method: 'POST',
2198 headers: { 'Content-Type': 'application/json' },

Contextualindex.ts1 match

@c15r•Updated 4 days ago
353});
354
355export default app.fetch;

cerebras_coderindex.ts1 match

@zee1205•Updated 4 days ago
181
182 try {
183 const response = await fetch("/", {
184 method: "POST",
185 body: JSON.stringify({
6 const query = ?select=name,website,logo_url,description&plan=eq.premium&order=created_at.desc&limit=${limit};
7 const endpoint = supabaseUrl + query;
8 const response = await fetch(endpoint, {
9 headers: {
10 "Authorization":

aiREADME.md1 match

@rups•Updated 5 days ago
12
13 try {
14 const response = await fetch(url);
15 const data = await response.json();
16 return data;

aimain.tsx3 matches

@rups•Updated 5 days ago
578
579 // just launch it, don't wait for the result
580 // const taskRunResponse = await fetch(`${URL}/taskrun`, {
581 const taskRunResponse = fetch(`${URL}/taskrun`, {
582 method: 'POST',
583 headers: {
674}
675
676export default app.fetch;
677export { ModelProvider, modelProvider, ai, test };
678

untitled-424dialysis_featured_jobs1 match

@stealthorange•Updated 5 days ago
9 const endpoint = supabaseUrl + query;
10
11 const response = await fetch(endpoint, {
12 headers: {
13 "Authorization":

FarcasterSpacesHome.tsx2 matches

@moe•Updated 5 days ago
7
8import { Button, Input, Section, ShareButton } from '../components/ui.tsx'
9import { fetchUsersById } from '../util/neynar.ts'
10import { supabase } from '../util/db.ts'
11
39function Spaces() {
40 const queryFn = async () => {
41 const agoraChannels = await fetch(`/api/channels`)
42 .then((r) => r.json())
43 .then((r) => r?.data?.channels)

voicemessagesVoiceRecorder.tsx1 match

@cameronpak•Updated 5 days ago
145 }
146
147 fetch("/api/voicenotes", {
148 method: "POST",
149 body: formData,

FetchBasic2 file matches

@ther•Updated 14 hours ago

GithubPRFetcher

@andybak•Updated 3 days ago