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=192&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 18500 results for "api"(2820ms)

untitled-2883workflows.ts14 matches

@ampomahโ€ขUpdated 1 week ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import type { ApiResponse, CreateWorkflowRequest } from "../../shared/types.ts";
3import {
4 createWorkflowTemplate,
15 try {
16 const templates = await getAllWorkflowTemplates();
17 const response: ApiResponse = {
18 success: true,
19 data: templates
21 return c.json(response);
22 } catch (error) {
23 const response: ApiResponse = {
24 success: false,
25 error: error.message
34 const id = c.req.param("id");
35 const template = await getWorkflowTemplate(id);
36 const response: ApiResponse = {
37 success: true,
38 data: template
40 return c.json(response);
41 } catch (error) {
42 const response: ApiResponse = {
43 success: false,
44 error: error.message
55 // Validate required fields
56 if (!data.name || !data.serviceType || !data.steps) {
57 const response: ApiResponse = {
58 success: false,
59 error: "Missing required fields: name, serviceType, and steps are required"
63
64 const template = await createWorkflowTemplate(data);
65 const response: ApiResponse = {
66 success: true,
67 data: template,
70 return c.json(response, 201);
71 } catch (error) {
72 const response: ApiResponse = {
73 success: false,
74 error: error.message
85
86 const template = await updateWorkflowTemplate(id, data);
87 const response: ApiResponse = {
88 success: true,
89 data: template,
92 return c.json(response);
93 } catch (error) {
94 const response: ApiResponse = {
95 success: false,
96 error: error.message
105 const id = c.req.param("id");
106 await deleteWorkflowTemplate(id);
107 const response: ApiResponse = {
108 success: true,
109 message: "Workflow template deleted successfully"
111 return c.json(response);
112 } catch (error) {
113 const response: ApiResponse = {
114 success: false,
115 error: error.message
141
142 const newTemplate = await createWorkflowTemplate(duplicateData);
143 const response: ApiResponse = {
144 success: true,
145 data: newTemplate,
148 return c.json(response, 201);
149 } catch (error) {
150 const response: ApiResponse = {
151 success: false,
152 error: error.message

kemmyREADME.md8 matches

@englidโ€ขUpdated 1 week ago
17โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
18โ”‚ โ”œโ”€โ”€ routes/
19โ”‚ โ”‚ โ”œโ”€โ”€ jobs.ts # Job posting API routes
20โ”‚ โ”‚ โ””โ”€โ”€ chat.ts # Chat API routes
21โ”‚ โ””โ”€โ”€ index.ts # Main Hono server
22โ”œโ”€โ”€ frontend/
34## Tech Stack
35
36- **Backend**: Hono (TypeScript API framework)
37- **Database**: SQLite
38- **Frontend**: React with TypeScript
40- **Real-time**: Polling for chat updates
41
42## API Endpoints
43
44### Jobs
45- `GET /api/jobs` - Get all job postings
46- `POST /api/jobs` - Create a new job posting
47
48### Chat
49- `GET /api/chat` - Get chat messages
50- `POST /api/chat` - Send a chat message
51
52## Getting Started

chatpappindex.ts6 matches

@yusufakanjiโ€ขUpdated 1 week ago
71});
72
73// API Routes
74
75// Get all jobs
76app.get("/api/jobs", async c => {
77 const jobs = await getRecentJobs();
78 return c.json(jobs);
80
81// Create new job posting
82app.post("/api/jobs", async c => {
83 try {
84 const jobData: CreateJobRequest = await c.req.json();
117
118// Get specific job
119app.get("/api/jobs/:id", async c => {
120 const id = parseInt(c.req.param("id"));
121 const job = await getJobById(id);
129
130// Get chat messages
131app.get("/api/chat", async c => {
132 const messages = await getRecentMessages();
133 return c.json(messages);
135
136// Post chat message
137app.post("/api/chat", async c => {
138 try {
139 const messageData: CreateMessageRequest = await c.req.json();

untitled-8262README.md1 match

@emmysmatโ€ขUpdated 1 week ago
37## Deployment
38
39This portfolio is automatically deployed on Val Town. The backend serves the frontend files and handles any API requests.

GuitarBoardREADME.md12 matches

@kyei94โ€ขUpdated 1 week ago
30โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Database schema for messages, jobs, and applications
31โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
32โ”‚ โ””โ”€โ”€ index.ts # Main Hono server with job and chat APIs
33โ”œโ”€โ”€ frontend/
34โ”‚ โ”œโ”€โ”€ components/
47## Tech Stack
48
49- **Backend**: Hono (TypeScript API framework)
50- **Frontend**: React 18.2.0 with TypeScript
51- **Database**: SQLite with three tables (messages, jobs, applications)
53- **Real-time**: Server-Sent Events (SSE) for chat
54
55## API Endpoints
56
57### Chat Endpoints
58- `GET /api/messages` - Get recent chat messages
59- `POST /api/messages` - Send a new chat message
60- `GET /api/events` - SSE endpoint for real-time chat updates
61
62### Job Endpoints
63- `GET /api/jobs` - Get job postings (with optional status filter)
64- `GET /api/jobs/:id` - Get specific job details
65- `POST /api/jobs` - Create a new job posting
66- `PATCH /api/jobs/:id/status` - Update job status
67- `GET /api/jobs/:id/applications` - Get applications for a job
68- `POST /api/jobs/:id/apply` - Apply to a specific job
69
70## Job Types

untitled-9323README.md7 matches

@zethuโ€ขUpdated 1 week ago
17โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
18โ”‚ โ”œโ”€โ”€ routes/
19โ”‚ โ”‚ โ”œโ”€โ”€ jobs.ts # Job posting API routes
20โ”‚ โ”‚ โ””โ”€โ”€ chat.ts # Chat API routes
21โ”‚ โ””โ”€โ”€ index.ts # Main Hono server
22โ”œโ”€โ”€ frontend/
32```
33
34## API Endpoints
35
36- `GET /api/jobs` - Get all job postings
37- `POST /api/jobs` - Create a new job posting
38- `GET /api/chat/messages` - Get chat messages
39- `POST /api/chat/messages` - Send a chat message
40
41## Getting Started

untitled-960README.md9 matches

@englidโ€ขUpdated 1 week ago
17โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
18โ”‚ โ”œโ”€โ”€ routes/
19โ”‚ โ”‚ โ”œโ”€โ”€ jobs.ts # Job posting API routes
20โ”‚ โ”‚ โ””โ”€โ”€ chat.ts # Chat API routes
21โ”‚ โ””โ”€โ”€ index.ts # Main Hono server
22โ”œโ”€โ”€ frontend/
34## Tech Stack
35
36- **Backend**: Hono (TypeScript API framework)
37- **Database**: SQLite
38- **Frontend**: React with TypeScript
40- **Real-time**: Polling for chat updates
41
42## API Endpoints
43
44### Jobs
45- `GET /api/jobs` - Get all job postings
46- `POST /api/jobs` - Create a new job posting
47- `DELETE /api/jobs/:id` - Delete a job posting
48
49### Chat
50- `GET /api/chat/messages` - Get chat messages
51- `POST /api/chat/messages` - Send a chat message
52
53## Getting Started

untitled-2883types.ts2 matches

@ampomahโ€ขUpdated 1 week ago
86}
87
88// API Response types
89export interface ApiResponse<T = any> {
90 success: boolean;
91 data?: T;

chatpappREADME.md7 matches

@yusufakanjiโ€ขUpdated 1 week ago
28```
29โ”œโ”€โ”€ backend/
30โ”‚ โ””โ”€โ”€ index.ts # Hono server with SQLite database and REST API
31โ”œโ”€โ”€ frontend/
32โ”‚ โ”œโ”€โ”€ index.html # Main application template
53- Job references for shared postings
54
55## API Endpoints
56
57### Jobs
58- `GET /api/jobs` - Fetch all job postings
59- `POST /api/jobs` - Create new job posting
60- `GET /api/jobs/:id` - Get specific job details
61
62### Chat
63- `GET /api/chat` - Fetch recent chat messages
64- `POST /api/chat` - Send new chat message
65
66## Usage

GuitarBoardApp.tsx2 matches

@kyei94โ€ขUpdated 1 week ago
38 if (!isUsernameSet) return;
39
40 const eventSource = new EventSource('/api/events');
41 eventSourceRef.current = eventSource;
42
75
76 try {
77 const response = await fetch('/api/messages', {
78 method: 'POST',
79 headers: {

Galacta3 file matches

@defunktโ€ขUpdated 9 hours ago
Marvel Rivals GPT via tracker.gg API

github-api2 file matches

@cricks_unmixed4uโ€ขUpdated 14 hours ago
apiry
snartapi