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=208&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 18170 results for "api"(5133ms)

TrackerEventForm.tsx1 match

@Ozyโ€ขUpdated 5 days ago
38
39 try {
40 const url = event ? `/api/events/${event.id}` : '/api/events';
41 const method = event ? 'PUT' : 'POST';
42

TrackerCalendar.tsx3 matches

@Ozyโ€ขUpdated 5 days ago
24 const endDate = getViewEndDate();
25
26 const response = await fetch(`/api/events/range?start=${startDate.toISOString()}&end=${endDate.toISOString()}`);
27 const result = await response.json();
28
109
110 try {
111 const response = await fetch(`/api/events/${eventId}`, {
112 method: 'DELETE'
113 });
354 key={mode}
355 onClick={() => setViewMode(mode)}
356 className={`px-3 py-1 text-sm rounded capitalize ${
357 viewMode === mode
358 ? 'bg-blue-600 text-white'

TrackerApp.tsx3 matches

@Ozyโ€ขUpdated 5 days ago
32 try {
33 setLoading(true);
34 const response = await fetch('/api/dashboard');
35 const result = await response.json();
36 if (result.success) {
75 const toggleTodoComplete = async (todo: TodoItem) => {
76 try {
77 const response = await fetch(`/api/todos/${todo.id}/toggle`, {
78 method: 'PATCH'
79 });
300
301 try {
302 const url = editingTodo ? `/api/todos/${editingTodo.id}` : '/api/todos';
303 const method = editingTodo ? 'PUT' : 'POST';
304

publicInsights.tsx2 matches

@MrsJDโ€ขUpdated 5 days ago
20 try {
21 setLoading(true);
22 const response = await fetch('/api/symptoms/analytics/insights');
23 if (response.ok) {
24 const data = await response.json();
90 <div className="stat-label">
91 Cycle Regularity
92 <div className="text-xs mt-1 capitalize">{insights.cycle_regularity}</div>
93 </div>
94 </div>

publicSymptomForm.tsx1 match

@MrsJDโ€ขUpdated 5 days ago
48
49 try {
50 const response = await fetch('/api/symptoms', {
51 method: 'POST',
52 headers: { 'Content-Type': 'application/json' },

publicCycleForm.tsx2 matches

@MrsJDโ€ขUpdated 5 days ago
35
36 try {
37 const url = isEditing ? `/api/cycles/${isEditing}` : '/api/cycles';
38 const method = isEditing ? 'PUT' : 'POST';
39
83 setLoading(true);
84 try {
85 const response = await fetch(`/api/cycles/${id}`, { method: 'DELETE' });
86 if (response.ok) {
87 setMessage({ type: 'success', text: 'Cycle deleted successfully!' });

untitled-5522index.ts7 matches

@favour18โ€ขUpdated 5 days ago
35});
36
37// API Routes
38app.route("/api/auth", authRoutes);
39app.route("/api/projects", projectRoutes);
40app.route("/api/tasks", taskRoutes);
41app.route("/api/templates", templateRoutes);
42app.route("/api/dashboard", dashboardRoutes);
43
44// Health check endpoint
45app.get("/api/health", (c) => {
46 return c.json({
47 status: "healthy",

Peace1UserForm.tsx1 match

@amareretaโ€ขUpdated 5 days ago
25
26 try {
27 const response = await fetch("/api/users/register", {
28 method: "POST",
29 headers: {

Peace1README.md4 matches

@amareretaโ€ขUpdated 5 days ago
19โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
20โ”‚ โ”œโ”€โ”€ routes/
21โ”‚ โ”‚ โ”œโ”€โ”€ ideas.ts # Ideas and documents API
22โ”‚ โ”‚ โ”œโ”€โ”€ chat.ts # Chat room API
23โ”‚ โ”‚ โ””โ”€โ”€ users.ts # User management API
24โ”‚ โ””โ”€โ”€ index.ts # Main Hono server
25โ”œโ”€โ”€ frontend/
47## Getting Started
48
491. The backend server handles API routes and serves static files
502. Users must enter their name before accessing chat features
513. Ideas and documents are stored with user attribution

Peace1index.ts6 matches

@amareretaโ€ขUpdated 5 days ago
17await runMigrations();
18
19// API routes
20app.route("/api/users", users);
21app.route("/api/ideas", ideas);
22app.route("/api/chat", chat);
23
24// File serving route for uploaded files
25app.get("/api/files/*", async (c) => {
26 try {
27 const filePath = c.req.path.replace("/api/files/", "");
28 const fileData = await blob.get(filePath);
29

xxxclearinghouse_validator

@toowiredโ€ขUpdated 6 hours ago
Request validator for clearance API

Apiify11 file matches

@wolfโ€ขUpdated 1 day ago
snartapi
apiry