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=203&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 18084 results for "api"(1049ms)

AIHandsOnReportForm.tsx1 match

@starx_25โ€ขUpdated 5 days ago
32
33 try {
34 const response = await fetch('/api/reports', {
35 method: 'POST',
36 headers: {

AIHandsOnApp.tsx2 matches

@starx_25โ€ขUpdated 5 days ago
23 const loadReports = async () => {
24 try {
25 const response = await fetch('/api/reports');
26 if (!response.ok) throw new Error('Failed to load reports');
27 const data = await response.json();
35 const loadMessages = async () => {
36 try {
37 const response = await fetch('/api/chat/messages');
38 if (!response.ok) throw new Error('Failed to load messages');
39 const data = await response.json();

CrimeMapindex.ts2 matches

@realcoderโ€ขUpdated 5 days ago
14await initializeDatabase();
15
16// API routes
17app.route("/api/reports", reports);
18
19// Static file serving and main page

mywebsitescript.js8 matches

@Yetundeโ€ขUpdated 5 days ago
59 updateActiveNav();
60
61 // Enhanced contact form handling with API integration
62 const contactForm = document.getElementById('contact-form');
63 if (contactForm) {
75
76 try {
77 const response = await fetch('/api/contact', {
78 method: 'POST',
79 headers: {
119 }
120
121 // Enhanced movie request form with API integration
122 const movieRequestForm = document.getElementById('movie-request-form');
123 if (movieRequestForm) {
135
136 try {
137 const response = await fetch('/api/movie-requests', {
138 method: 'POST',
139 headers: {
178
179 try {
180 const response = await fetch('/api/comments', {
181 method: 'POST',
182 headers: {
226 async function loadComments(postId, page = 1) {
227 try {
228 const response = await fetch(`/api/comments/${postId}?page=${page}&limit=10`);
229 const result = await response.json();
230
278
279 try {
280 const response = await fetch(`/api/comments/${commentId}/react`, {
281 method: 'POST',
282 headers: {
416 async function loadBlogStats() {
417 try {
418 const response = await fetch('/api/stats');
419 const stats = await response.json();
420

AIHandsOnREADME.md8 matches

@starx_25โ€ขUpdated 5 days ago
18โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
19โ”‚ โ”œโ”€โ”€ routes/
20โ”‚ โ”‚ โ”œโ”€โ”€ reports.ts # Weekly reports API
21โ”‚ โ”‚ โ””โ”€โ”€ chat.ts # Chat API
22โ”‚ โ””โ”€โ”€ index.ts # Main Hono server
23โ”œโ”€โ”€ frontend/
33```
34
35## API Endpoints
36
37- `GET /api/reports` - Get all weekly reports
38- `POST /api/reports` - Submit a new weekly report
39- `GET /api/chat/messages` - Get chat messages
40- `POST /api/chat/messages` - Send a chat message
41
42## Getting Started
43
44This app runs on Val Town. The backend serves both the API and static files, with real-time updates for the chat functionality.

CrimeMapApp.tsx2 matches

@realcoderโ€ขUpdated 5 days ago
16 try {
17 setLoading(true);
18 const response = await fetch('/api/reports');
19 if (!response.ok) {
20 throw new Error('Failed to fetch reports');
40 const handleReportSubmit = async (reportData: any) => {
41 try {
42 const response = await fetch('/api/reports', {
43 method: 'POST',
44 headers: {
92|------|-------------|--------|----------------------|
93| **Technology Failures** | System crashes, bugs, or technical issues | High | โ€ข Robust testing procedures<br>โ€ข Backup systems<br>โ€ข Regular maintenance<br>โ€ข Technical reviews |
94| **Integration Issues** | Problems connecting different systems | Medium-High | โ€ข Early integration testing<br>โ€ข API documentation<br>โ€ข Proof of concepts<br>โ€ข Technical architecture reviews |
95| **Performance Issues** | System not meeting performance requirements | Medium | โ€ข Performance testing<br>โ€ข Scalability planning<br>โ€ข Load testing<br>โ€ข Performance monitoring |
96| **Security Vulnerabilities** | Cybersecurity threats and data breaches | High | โ€ข Security assessments<br>โ€ข Regular updates and patches<br>โ€ข Access controls<br>โ€ข Security training |

mywebsiteindex.ts9 matches

@Yetundeโ€ขUpdated 5 days ago
77});
78
79// API Routes
80
81// Get comments for a specific post
82app.get("/api/comments/:postId", async c => {
83 try {
84 const postId = c.req.param("postId");
113
114// Post a new comment
115app.post("/api/comments", async c => {
116 try {
117 const body = await c.req.json();
146
147// Update comment reactions
148app.post("/api/comments/:id/react", async c => {
149 try {
150 const commentId = c.req.param("id");
190
191// Submit movie request
192app.post("/api/movie-requests", async c => {
193 try {
194 const body = await c.req.json();
215
216// Get movie requests (for admin)
217app.get("/api/movie-requests", async c => {
218 try {
219 const status = c.req.query("status") || "all";
240
241// Contact form submission
242app.post("/api/contact", async c => {
243 try {
244 const body = await c.req.json();
263
264// Get blog stats
265app.get("/api/stats", async c => {
266 try {
267 const commentCount = await sqlite.execute(
326 status: "healthy",
327 timestamp: new Date().toISOString(),
328 service: "Yetunde's Movie Review Hub API"
329 });
330});

CrimeMapREADME.md7 matches

@realcoderโ€ขUpdated 5 days ago
19โ”‚ โ”‚ โ””โ”€โ”€ queries.ts # Database query functions
20โ”‚ โ”œโ”€โ”€ routes/
21โ”‚ โ”‚ โ”œโ”€โ”€ reports.ts # Crime report API endpoints
22โ”‚ โ”‚ โ””โ”€โ”€ static.ts # Static file serving
23โ”‚ โ””โ”€โ”€ index.ts # Main Hono server
37## Technology Stack
38
39- **Backend**: Hono (TypeScript API framework)
40- **Database**: SQLite
41- **Frontend**: React with TypeScript
43- **Styling**: TailwindCSS
44
45## API Endpoints
46
47- `GET /api/reports` - Get all crime reports (with optional location filtering)
48- `POST /api/reports` - Submit a new crime report
49- `GET /api/reports/stats` - Get crime statistics by type and area
50
51## Database Schema
74## Development
75
76The app automatically serves static files and provides a REST API for crime reports. The database is initialized on first run.

JobseekerAidindex.ts4 matches

@eonyiukeโ€ขUpdated 5 days ago
16await runMigrations();
17
18// API routes
19app.route("/api/jobs", jobs);
20app.route("/api/applications", applications);
21app.route("/api/chat", chat);
22
23// Static file serving and main page

Apiify11 file matches

@wolfโ€ขUpdated 15 hours ago

dailyQuoteAPI

@Soukyโ€ขUpdated 2 days ago
apiv1
snartapi