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=72&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 12412 results for "api"(2051ms)

luciaMagicLinkStarterindex.ts2 matches

@cameronpakUpdated 1 week ago
27});
28
29// API endpoint to update username
30app.post("/api/user/username", async c => {
31 const user = c.get("user");
32
luciaMagicLinkStarter

luciaMagicLinkStarterREADME.md4 matches

@stevekrouseUpdated 1 week ago
27- **Database**:[Val Town SQLite](https://docs.val.town/std/sqlite/) for storing users, sessions, and magic link tokens
28- **Frontend**: React with Tailwind CSS
29- **Backend**: Hono.js for API routes and middleware
30- **Authentication**: Built by following the [Lucia guide](https://lucia-next.pages.dev/)
31
32## API Endpoints
33
34Provided by the Auth Middleware in `backend/auth.ts`:
38- `POST /auth/logout` - Log out the current user
39
40In the app's API, in `backend/index.ts`:
41
42- `POST /api/user/username` - Update the user's username
43
44## Notes
11 const path = url.pathname;
12
13 // Forward API requests to the leads API
14 if (path.startsWith("/api/")) {
15 const leadsHandler = (await import("./leads.ts")).default;
16 return await leadsHandler.handler(req);
571
572 try {
573 const response = await fetch('/api/leads', {
574 method: 'POST',
575 headers: {
601 try {
602 // Get lead data
603 const response = await fetch('/api/leads?id=' + leadId);
604 const result = await response.json();
605
653
654 try {
655 const response = await fetch('/api/leads', {
656 method: 'PUT',
657 headers: {
705
706 try {
707 const response = await fetch('/api/leads', {
708 method: 'PUT',
709 headers: {

slackmain.tsx1 match

@dinavinterUpdated 1 week ago
16 // like the sender and the message text
17 const result = await fetchJSON(
18 "https://slack.com/api/chat.postMessage",
19 {
20 headers: {
luciaMagicLinkStarter

luciaMagicLinkStarterindex.ts2 matches

@stevekrouseUpdated 1 week ago
27});
28
29// API endpoint to update username
30app.post("/api/user/username", async c => {
31 const user = c.get("user");
32

CareerCoach20Daysetup.ts1 match

@prashamtrivediUpdated 1 week ago
16 console.log("👤 Lead Management: https://prashamtrivedi--b3b406582c1111f080de569c3dd06744.web.val.run");
17 console.log("📝 Log Entries: https://prashamtrivedi--f1bc92542c1011f0bb1f569c3dd06744.web.val.run/log");
18 console.log("🔄 API Endpoints:");
19 console.log(" - Log Entry: https://prashamtrivedi--afdccfb62c1011f0b351569c3dd06744.web.val.run");
20 console.log(" - Todo Management: https://prashamtrivedi--694775142c1111f08a2b569c3dd06744.web.val.run");

CareerCoach20DayREADME.md1 match

@prashamtrivediUpdated 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
43
44 try {
45 const response = await fetch("/api/user/username", {
46 method: "POST",
47 headers: {

HHGtoMyDaygetTodoist.ts7 matches

@lm3mUpdated 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

@OmnipotenteUpdated 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 });

social_data_api_project3 file matches

@tsuchi_yaUpdated 2 days ago

simple-scrabble-api1 file match

@bryUpdated 6 days ago
snartapi
papimark21