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=222&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 18303 results for "api"(2396ms)

publicSymptomForm.tsx1 match

@MrsJDโ€ขUpdated 6 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 6 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 6 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 6 days ago
25
26 try {
27 const response = await fetch("/api/users/register", {
28 method: "POST",
29 headers: {

Peace1README.md4 matches

@amareretaโ€ขUpdated 6 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 6 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

Peace1ideas.ts1 match

@amareretaโ€ขUpdated 6 days ago
47 await blob.set(fileKey, fileContent);
48
49 fileUrl = `/api/files/${fileKey}`;
50 fileName = file.name;
51 fileType = file.type;

Peace1IdeaBoard.tsx3 matches

@amareretaโ€ขUpdated 6 days ago
25 const fetchIdeas = async () => {
26 try {
27 const response = await fetch("/api/ideas");
28 if (response.ok) {
29 const data = await response.json();
53 }
54
55 const response = await fetch("/api/ideas", {
56 method: "POST",
57 body: formDataToSend,
74 const handleLike = async (ideaId: number) => {
75 try {
76 const response = await fetch(`/api/ideas/${ideaId}/like`, {
77 method: "POST",
78 });

Peace1chat.ts1 match

@amareretaโ€ขUpdated 6 days ago
46 await blob.set(fileKey, fileContent);
47
48 fileUrl = `/api/files/${fileKey}`;
49 fileName = file.name;
50 } catch (fileError) {

Peace1ChatRoom.tsx6 matches

@amareretaโ€ขUpdated 6 days ago
36 const fetchMessages = async () => {
37 try {
38 const response = await fetch("/api/chat/messages");
39 if (response.ok) {
40 const data = await response.json();
50 const fetchInvitations = async () => {
51 try {
52 const response = await fetch(`/api/chat/wlp/invitations/${user.id}`);
53 if (response.ok) {
54 const data = await response.json();
84 }
85
86 const response = await fetch("/api/chat/messages", {
87 method: "POST",
88 body: formData,
127 try {
128 // First check if user exists
129 const userResponse = await fetch(`/api/users/check/${encodeURIComponent(inviteeName.trim())}`);
130 if (!userResponse.ok) return;
131
137
138 // Send invitation
139 const response = await fetch("/api/chat/wlp/invite", {
140 method: "POST",
141 headers: {
160 const handleInvitationResponse = async (invitationId: number, status: "accepted" | "declined") => {
161 try {
162 const response = await fetch("/api/chat/wlp/respond", {
163 method: "POST",
164 headers: {

Galacta1 file match

@defunktโ€ขUpdated 59 mins ago
Marvel Rivals GPT via tracker.gg API

github-api1 file match

@cricks_unmixed4uโ€ขUpdated 23 hours ago
snartapi
apiry