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=154&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 17774 results for "api"(1209ms)

ExcellentSportCentreindex.ts2 matches

@Midigoโ€ขUpdated 2 days ago
18});
19
20// API route for contact form (placeholder)
21app.post("/api/contact", async c => {
22 const body = await c.req.json();
23

ExcellentSportCentreContact.tsx1 match

@Midigoโ€ขUpdated 2 days ago
27
28 try {
29 const response = await fetch('/api/contact', {
30 method: 'POST',
31 headers: {

CrimeMapCrimeMap.tsx8 matches

@realcoderโ€ขUpdated 2 days ago
17export default function CrimeMap({ reports, selectedLocation, onLocationSelect }: CrimeMapProps) {
18 const mapRef = useRef<HTMLDivElement>(null);
19 const mapInstanceRef = useRef<any>(null);
20 const markersRef = useRef<any[]>([]);
21 const selectedMarkerRef = useRef<any>(null);
52 });
53
54 mapInstanceRef.current = map;
55
56 return () => {
61 // Update crime report markers
62 useEffect(() => {
63 if (!mapInstanceRef.current) return;
64
65 // Clear existing markers
66 markersRef.current.forEach(marker => {
67 mapInstanceRef.current.removeLayer(marker);
68 });
69 markersRef.current = [];
80 const marker = window.L.marker([report.latitude, report.longitude], {
81 icon: crimeIcon,
82 }).addTo(mapInstanceRef.current);
83
84 // Add popup with crime details
102 // Update selected location marker
103 useEffect(() => {
104 if (!mapInstanceRef.current) return;
105
106 // Remove existing selected marker
107 if (selectedMarkerRef.current) {
108 mapInstanceRef.current.removeLayer(selectedMarkerRef.current);
109 selectedMarkerRef.current = null;
110 }
121 selectedMarkerRef.current = window.L.marker([selectedLocation.lat, selectedLocation.lng], {
122 icon: selectedIcon,
123 }).addTo(mapInstanceRef.current);
124
125 selectedMarkerRef.current.bindPopup("Selected location for crime report").openPopup();

F_managerindex.ts4 matches

@Dev_Jโ€ขUpdated 2 days ago
15await runMigrations();
16
17// API routes
18app.route("/api/transactions", transactions);
19app.route("/api/analytics", analytics);
20
21// Serve static files
30 const dataScript = `<script>
31 window.__INITIAL_DATA__ = {
32 apiBase: '/api',
33 appName: 'Finance Manager'
34 };

habitsREADME.md2 matches

@tfsopsโ€ขUpdated 2 days ago
15โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
16โ”‚ โ”œโ”€โ”€ routes/
17โ”‚ โ”‚ โ””โ”€โ”€ habits.ts # Habit-related API routes
18โ”‚ โ””โ”€โ”€ index.ts # Main Hono server entry point
19โ”œโ”€โ”€ frontend/
40## Tech Stack
41
42- **Backend**: Hono (TypeScript API framework)
43- **Database**: SQLite
44- **Frontend**: React with TypeScript

F_managerTransactionList.tsx1 match

@Dev_Jโ€ขUpdated 2 days ago
60
61 try {
62 const response = await fetch(`/api/transactions/${id}`, {
63 method: 'DELETE',
64 });

F_managerTransactionForm.tsx2 matches

@Dev_Jโ€ขUpdated 2 days ago
55
56 const url = editTransaction
57 ? `/api/transactions/${editTransaction.id}`
58 : '/api/transactions';
59
60 const method = editTransaction ? 'PUT' : 'POST';

WorkOutTrackingAppREADME.md1 match

@wisdommaroreโ€ขUpdated 2 days ago
20โ”‚ โ”œโ”€โ”€ routes/
21โ”‚ โ”‚ โ”œโ”€โ”€ workouts.ts # Workout CRUD operations
22โ”‚ โ”‚ โ””โ”€โ”€ quotes.ts # Motivational quotes API
23โ”‚ โ””โ”€โ”€ index.ts # Main Hono server
24โ”œโ”€โ”€ frontend/

F_managerApp.tsx2 matches

@Dev_Jโ€ขUpdated 2 days ago
18 const fetchTransactions = async () => {
19 try {
20 const response = await fetch('/api/transactions');
21 const result = await response.json();
22
35 const fetchAnalytics = async () => {
36 try {
37 const response = await fetch('/api/analytics/dashboard');
38 const result = await response.json();
39

APPindex.ts4 matches

@ITHILIโ€ขUpdated 2 days ago
16await runMigrations();
17
18// API routes
19app.route("/api/auth", authRoutes);
20app.route("/api/users", userRoutes);
21app.route("/api/chat", chatRoutes);
22
23// Static file serving and main app

dailyQuoteAPI

@Soukyโ€ขUpdated 3 hours ago

HTTP

@Ncharityโ€ขUpdated 5 hours ago
Daily Quote API
Kapil01
apiv1