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=1111&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 16153 results for "fetch"(26682ms)

PDF2Vectorlogger1 match

@dcm31•Updated 4 months ago
61 function clearLogs() {
62 if (confirm('Are you sure you want to clear all logs?')) {
63 fetch('./clear')
64 .then(response => {
65 if (response.ok) {

pdf2vector_loggermain.tsx1 match

@dcm31•Updated 4 months ago
60 function clearLogs() {
61 if (confirm('Are you sure you want to clear all logs?')) {
62 fetch('/clear')
63 .then(response => {
64 if (response.ok) {

agentspacemain.tsx14 matches

@api•Updated 4 months ago
251 const initializeAgents = async () => {
252 try {
253 // Fetch agents from server or create defaults
254 const response = await fetch("/agents");
255
256 if (response.ok) {
407
408 // Save agents to server
409 await fetch("/agents", {
410 method: "POST",
411 headers: {
476
477 // Send request to leader agent
478 const leaderResponse = await fetch("/process-leader", {
479 method: "POST",
480 headers: {
561
562 // Send task to agent
563 const agentResponse = await fetch("/process-agent", {
564 method: "POST",
565 headers: {
619
620 // Send tool request
621 const toolResponse = await fetch("/tool", {
622 method: "POST",
623 headers: {
650
651 // Process the tool result with the agent
652 const toolProcessResponse = await fetch("/process-tool-result", {
653 method: "POST",
654 headers: {
705 // Final summary from leader
706 if (leaderPlan.tasks.length > 1) {
707 const summaryResponse = await fetch("/generate-summary", {
708 method: "POST",
709 headers: {
763
764 // Get latest agent trust scores from server
765 const agentsResponse = await fetch("/agents");
766 const updatedAgents = await agentsResponse.json();
767 setAgents(updatedAgents);
980
981 init() {
982 // Intercept fetch calls
983 const originalFetch = window.fetch;
984 window.fetch = async (input: RequestInfo | URL, init?: RequestInit) => {
985 const url = typeof input === "string" ? input : input.url;
986
1000 }
1001
1002 // Pass through to original fetch for any other requests
1003 return originalFetch(input, init);
1004 };
1005 },

honoExamplemain.tsx1 match

@cameron•Updated 4 months ago
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;

socialDataSearch_922509README.md1 match

@charmaine•Updated 4 months ago
13The following vals could not be imported:
14
15- [steve/discordWebhook](https://www.val.town/v/steve/discordWebhook) - Failed to fetch val: {"statusCode":404,"error":"Not Found","message":"Could not find that val"}
16
17
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);

socialDataSearch_922509socialDataSearch2 matches

@charmaine•Updated 4 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4 const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5 url.searchParams.set("query", query);
6 return await fetchJSON(url.toString(), {
7 bearer: Deno.env.get("valtown"),
8 });

socialDataSearch_910575discordWebhook2 matches

@charmaine•Updated 4 months ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const discordWebhook = async ({
8 content: string;
9}) => {
10 const res = await fetch(url, {
11 method: "POST",
12 redirect: "follow",
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);

socialDataSearch_910575socialDataSearch2 matches

@charmaine•Updated 4 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4 const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5 url.searchParams.set("query", query);
6 return await fetchJSON(url.toString(), {
7 bearer: Deno.env.get("valtown"),
8 });

readwise-instapaper1 file match

@welson•Updated 17 hours ago
Fetches my articles from Readwise. Syncs with/ Neon + Instapaper

manual-fetcher

@miz•Updated 1 week ago