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/?q=api&page=194&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 17906 results for "api"(1257ms)

AdvertappLogin.tsx1 match

@Raj3b•Updated 3 days ago
22 const authData: AuthRequest = { email, password };
23
24 const response = await fetch('/api/auth/login', {
25 method: 'POST',
26 headers: {

AdvertappApp.tsx2 matches

@Raj3b•Updated 3 days ago
20 const checkAuthStatus = async () => {
21 try {
22 const response = await fetch('/api/auth/me');
23 const data = await response.json();
24
43 const handleLogout = async () => {
44 try {
45 await fetch('/api/auth/logout', { method: 'POST' });
46 setUser(null);
47 setState('login');

AdvertappREADME.md5 matches

@Raj3b•Updated 3 days ago
423. Navigate to the application URL to see the login/register interface
43
44## API Endpoints
45
46- `POST /api/auth/register` - User registration
47- `POST /api/auth/login` - User login
48- `POST /api/auth/logout` - User logout
49- `GET /api/auth/me` - Get current user info
50
51## Database Schema

TLDRREADME.md2 matches

@Kymmsy•Updated 3 days ago
16Main application component that handles:
17- Form state management
18- API communication
19- URL/text detection
20- Loading and error states
41- ES6+ JavaScript
42- CSS Grid and Flexbox
43- Fetch API
44- React 18

TLDRREADME.md9 matches

@Kymmsy•Updated 3 days ago
1# Backend - TLDR This API
2
3The backend is built with Hono and provides API endpoints for article summarization.
4
5## Features
6
7- **URL Content Extraction**: Fetches and parses HTML content from URLs
8- **Text Summarization**: Uses OpenAI API to generate concise summaries
9- **Error Handling**: Comprehensive error handling for various failure scenarios
10- **Static File Serving**: Serves frontend assets and shared utilities
11
12## API Endpoints
13
14### `POST /api/summarize`
15
16Summarizes article content or URL.
42```
43
44### `GET /api/health`
45
46Health check endpoint.
56## Environment Variables
57
58- `OPENAI_API_KEY` - Required for AI summarization
59
60## Error Handling
61
62The API handles various error scenarios:
63- Invalid URLs or unreachable content
64- OpenAI API failures
65- Malformed requests
66- Content too short to summarize

BrianREADME.md3 matches

@Brian250•Updated 3 days ago
32```
33
34## API
35
36Currently uses mock data for demonstration. In production, this would integrate with:
37- football-data.org (free tier available)
38- API-Football (RapidAPI)
39- Other football data providers
40
62- **Backend**: Hono (TypeScript)
63- **Frontend**: React 18.2.0 + TailwindCSS
64- **Data**: Free football API
65- **Platform**: Val Town

Brianindex.ts9 matches

@Brian250•Updated 3 days ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import type { Match, MatchesResponse, ApiResponse } from "../shared/types.ts";
4
5const app = new Hono();
10});
11
12// Mock data for development (in production, this would come from a real API)
13const generateMockMatches = (date: string): Match[] => {
14 const matches: Match[] = [
64app.get("/shared/*", c => serveFile(c.req.path, import.meta.url));
65
66// API Routes
67app.get("/api/matches", async (c) => {
68 const date = c.req.query("date") || new Date().toISOString().split('T')[0];
69
70 try {
71 // In a real app, you'd fetch from an actual API like:
72 // const response = await fetch(`https://api.football-data.org/v4/matches?dateFrom=${date}&dateTo=${date}`);
73
74 const matches = generateMockMatches(date);
81 return c.json(response);
82 } catch (error) {
83 const errorResponse: ApiResponse = {
84 success: false,
85 error: "Failed to fetch matches"
89});
90
91app.get("/api/matches/live", async (c) => {
92 try {
93 const allMatches = generateMockMatches(new Date().toISOString().split('T')[0]);
101 return c.json(response);
102 } catch (error) {
103 const errorResponse: ApiResponse = {
104 success: false,
105 error: "Failed to fetch live matches"

TLDRREADME.md2 matches

@Kymmsy•Updated 3 days ago
5## Files
6
7- `types.ts` - TypeScript interfaces for API requests/responses and data structures
8
9## Usage
15```
16
17Note: Files in this directory must work in both browser and server environments, so avoid using Deno-specific APIs.

BrianApp.tsx1 match

@Brian250•Updated 3 days ago
33
34 try {
35 const response = await fetch(`/api/matches?date=${date}`);
36 const data: MatchesResponse = await response.json();
37

sandraindex.html1 match

@jewel•Updated 3 days ago
285 </div>
286 <h4 class="text-xl font-bold text-gray-800 mb-2">Emily Chen</h4>
287 <p class="text-pink-500 font-semibold mb-3">Nail Technician & Spa Therapist</p>
288 <p class="text-gray-600 text-sm">Specializes in nail art and spa treatments. Trained in massage therapy and relaxation techniques.</p>
289 </div>

dailyQuoteAPI

@Souky•Updated 1 day ago

HTTP

@Ncharity•Updated 1 day ago
Daily Quote API
Kapil01
apiv1