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/$%7Burl%7D?q=api&page=126&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 12948 results for "api"(1486ms)

CareerCoach20DayREADME.md1 match

@prashamtrivedi•Updated 1 week ago
32- ValTown serverless functions
33- SQLite database for persistent storage
34- OpenAI API for AI-powered analysis and recommendations
35- Email integration for notifications
36- Browser-based dashboard with interactive UI
luciaMagicLinkStarter

luciaMagicLinkStarterUserProfile.tsx1 match

@stevekrouse•Updated 1 week ago
43
44 try {
45 const response = await fetch("/api/user/username", {
46 method: "POST",
47 headers: {

HHGtoMyDaygetTodoist.ts7 matches

@lm3m•Updated 1 week ago
40
41/**
42 * Fetches tasks from Todoist API
43 * @returns Array of Todoist tasks due today or overdue
44 */
45async function fetchTodoistTasks(): Promise<TodoistTask[]> {
46 const apiToken = Deno.env.get("TODOIST_API_TOKEN");
47
48 if (!apiToken) {
49 throw new Error("Todoist API Token is required");
50 }
51
55
56 try {
57 const response = await fetch("https://api.todoist.com/rest/v2/tasks", {
58 method: "GET",
59 headers: {
60 "Authorization": `Bearer ${apiToken}`,
61 "Content-Type": "application/json",
62 },
64
65 if (!response.ok) {
66 throw new Error(`Todoist API error: ${response.statusText}`);
67 }
68

telegramBotStarterindex.ts1 match

@Omnipotente•Updated 1 week ago
30 // This is a no-op if nothing's changed
31 if (!isEndpointSet) {
32 await bot.api.setWebhook("https://omnipotente.val.run/telegramBotStarter", {
33 secret_token: SECRET_TOKEN,
34 });

HHGtoMyDaysendDailyBrief.ts8 matches

@lm3m•Updated 1 week ago
93
94export async function sendDailyBriefing(today?: DateTime) {
95 // Get API keys from environment
96 const apiKey = Deno.env.get("ANTHROPIC_API_KEY");
97 // const telegramToken = Deno.env.get("TELEGRAM_TOKEN");
98
102 // }
103
104 if (!apiKey) {
105 console.error("Anthropic API key is not configured.");
106 return;
107 }
118
119 // Initialize Anthropic client
120 const anthropic = new Anthropic({ apiKey });
121
122 // Initialize Telegram bot
166
167 // disabled title for now, it seemes unnecessary...
168 // await bot.api.sendMessage(chatId, `*${title}*`, { parse_mode: "Markdown" });
169
170 // Then send the main content
174
175 if (content.length <= MAX_LENGTH) {
176 await bot.api.sendMessage(chatId, content, { parse_mode: "Markdown" });
177 // Store the briefing in chat history
178 await storeChatMessage(
203 // Send each chunk as a separate message and store in chat history
204 for (const chunk of chunks) {
205 await bot.api.sendMessage(chatId, chunk, { parse_mode: "Markdown" });
206 // Store each chunk in chat history
207 await storeChatMessage(

untitled-1471new-file-8788.tsx1 match

@kamenxrider•Updated 1 week ago
6 <title>Gorilla Rampage: Meta & Mayhem</title>
7 <script src="https://cdn.tailwindcss.com"></script>
8 <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
9 <style>
10 body {

glastonewsindex.ts1 match

@bensomething•Updated 1 week ago
1import process from "node:process";
2import { BskyAgent } from "npm:@atproto/api";
3
4async function main() {

ga4-eventga4-util.tsx3 matches

@sprout•Updated 1 week 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 = {
1import { createRoute } from "https://esm.sh/@hono/zod-openapi@0.18.4";
2import { ErrorSchema, UpdateUserSchema, UserIdPathParamSchema, UserSchema } from "../schema.ts";
3

fiberplaneHonoZodStarterschema.ts13 matches

@usiriczman•Updated 1 week ago
1import { z } from "https://esm.sh/@hono/zod-openapi@0.18.4";
2
3// Schema that defines presence of an ID in the path
6 .coerce
7 .number()
8 .openapi({ example: 1 }),
9});
10
12export const NewUserSchema = z
13 .object({
14 name: z.string().min(2).max(50).openapi({ example: "Mark Scout" }),
15 email: z.string().email().openapi({ example: "mark@lumen.co" }),
16 age: z.number().int().min(18).max(120).openapi({ example: 35 }),
17 }).openapi("NewUser");
18
19// Schema that defines the response of a request to get a user
21 .object({
22 id: z.number().int(),
23 name: z.string().openapi({ example: "Mark Scout" }),
24 email: z.string().email().openapi({ example: "mark@lumen.co" }),
25 age: z.number().int().openapi({ example: 35 }),
26 }).openapi("User");
27
28export const UpdateUserSchema = z
29 .object({
30 name: z.string().optional().openapi({
31 example: "Marcus Scoutius",
32 }),
33 age: z.number().int().optional().openapi({
34 example: 53,
35 }),
36 })
37 .openapi("UpdateUser");
38
39// Error schema

vapi-minutes-db1 file match

@henrywilliams•Updated 2 days ago

vapi-minutes-db2 file matches

@henrywilliams•Updated 2 days ago
mux
Your friendly, neighborhood video API.
api