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=api&page=13&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 11716 results for "api"(1374ms)

api1 file match

@zeroftdev•Updated 1 year ago

postHogAPICapture1 file match

@daisuke•Updated 1 year ago

myApi1 file match

@fahimfoysal•Updated 1 year ago

vtApiExample2 file matches

@neverstew•Updated 1 year ago

updateVtApiTypes2 file matches

@neverstew•Updated 1 year ago

jsrApi_example2 file matches

@vladimyr•Updated 1 year ago

jsrApi2 file matches

@vladimyr•Updated 1 year ago

myApi1 file match

@tonycheal•Updated 1 year ago

APIAyeee

@Negash•Updated 1 year ago

apiProxy1 file match

@postpostscript•Updated 1 year ago

EEPMOnitoringApp.tsx4 matches

@solomonferede•Updated 20 mins ago
294==========================*/
295// The server function remains the same as in the previous single-file solution,
296// as it handles API requests and serves the main HTML.
297// Its logic is independent of how the client-side components are structured into files.
298export default async function server(
346 const method = request.method;
347
348 // API Routes (same logic as before)
349 if (path === "/login" && method === "POST") {
350 const body = await request.json();
463 }
464
465 // API endpoint to handle editing a news article
466 if (path === "/edit-news" && method === "PUT") {
467 try {
588 }
589
590 // --- End Media Monitoring Specific API Routes ---
591 // --- NEW ENDPOINT: Generate Weekly Summary ---
592 if (path === "/generate-weekly-summary" && method === "GET") {

ga4-eventga4-util.tsx3 matches

@sprout•Updated 45 mins ago
2export async function trackGA4Event(req, clientPrefix) {
3 const GA4_MEASUREMENT_ID = Deno.env.get(`${clientPrefix}_GA4_MEASUREMENT_ID`);
4 const GA4_API_SECRET = Deno.env.get(`${clientPrefix}_GA4_API_KEY`);
5
6 if (!GA4_MEASUREMENT_ID || !GA4_API_SECRET) {
7 return new Response(`Missing GA4 environment variables for ${clientPrefix}`, { status: 500 });
8 }
24
25 const GA4_ENDPOINT =
26 `https://www.google-analytics.com/mp/collect?measurement_id=${GA4_MEASUREMENT_ID}&api_secret=${GA4_API_SECRET}`;
27
28 const ga4Payload = {
apiv1
papimark21