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%22Optional%20title%22?q=api&page=60&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 11752 results for "api"(1211ms)

myApi1 file match

@jqxuUpdated 1 year ago

myApi1 file match

@ndom91Updated 1 year ago

myApi1 file match

@mattrossmanUpdated 1 year ago

myApi1 file match

@marckrawUpdated 1 year ago

myApi1 file match

@plecongUpdated 1 year ago

myApi1 file match

@joshbeckmanUpdated 1 year ago

myApi1 file match

@markosUpdated 1 year ago

privateAPIAuthenticated2 file matches

@stevekrouseUpdated 1 year ago

myApi1 file match

@HungQu2Updated 1 year ago

myApi1 file match

@sgqUpdated 1 year ago

whatsapp-callbackindex.tsx13 matches

@yawnxyzUpdated 41 mins ago
6// Retrieve environment variables
7const WHATSAPP_WEBHOOK_VERIFY_TOKEN = Deno.env.get("WHATSAPP_WEBHOOK_VERIFY_TOKEN");
8const WHATSAPP_GRAPH_API_TOKEN = Deno.env.get("WHATSAPP_GRAPH_API_TOKEN");
9
10// In-memory store for conversation histories (keyed by user's phone number)
36 console.log(`Sending to MCP for ${userIdentifier}:`, JSON.stringify(mcpPayload, null, 2));
37
38 const mcpApiResponse = await fetch("https://mcp.labspace.ai/chat", {
39 method: "POST",
40 headers: {
44 });
45
46 if (!mcpApiResponse.ok) {
47 const errorText = await mcpApiResponse.text();
48 console.error(`Error from MCP for ${userIdentifier}: ${mcpApiResponse.status} ${mcpApiResponse.statusText}`, errorText);
49 return { error: true, data: { text: "Sorry, I couldn't get a response from the assistant.", details: errorText, status: mcpApiResponse.status } };
50 } else {
51 const mcpResponseData = await mcpApiResponse.json();
52 console.log(`Response from MCP for ${userIdentifier}:`, JSON.stringify(mcpResponseData, null, 2));
53
85 console.log(`Message from: ${userPhoneNumber}, Query: ${userQuery}`);
86
87 if (WHATSAPP_GRAPH_API_TOKEN && business_phone_number_id) {
88 const result = await processQueryWithMCP(userQuery, userPhoneNumber);
89
105 method: "POST",
106 headers: {
107 "Authorization": `Bearer ${WHATSAPP_GRAPH_API_TOKEN}`,
108 "Content-Type": "application/json",
109 },
135 try {
136 console.log(`Attempting to mark message as read for ${userPhoneNumber} (message_id: ${message.id})`);
137 console.log("using API token:", WHATSAPP_GRAPH_API_TOKEN);
138 const markReadResponse = await fetch(
139 `https://graph.facebook.com/v18.0/${business_phone_number_id}/messages`,
141 method: "POST",
142 headers: {
143 "Authorization": `Bearer ${WHATSAPP_GRAPH_API_TOKEN}`,
144 "Content-Type": "application/json",
145 },
168 } else {
169 console.error(
170 "WHATSAPP_GRAPH_API_TOKEN or business_phone_number_id is missing.",
171 );
172 }
196
197 if (directQuery) {
198 const userIdentifier = "direct_api_user"; // Fixed identifier for direct API calls
199
200 const result = await processQueryWithMCP(directQuery, userIdentifier);

glastonewsindex.ts1 match

@bensomethingUpdated 1 hour ago
1import fetch from "npm:node-fetch";
2import process from "node:process";
3import { BskyAgent } from "npm:@atproto/api";
4import * as cheerio from "npm:cheerio";
5
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration