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=66&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 20751 results for "api"(3305ms)

anchorPDSanchor.ts1 match

@tijsâ€ĸUpdated 1 week ago
106// app.dropanchor.getGlobalFeed
107app.get("/app.dropanchor.getGlobalFeed", async (c) => {
108 // Authenticate request to prevent scraping
109 const authContext = await authenticateRequest(c);
110 if (!authContext) {

anchorPDSintegration.test.ts3 matches

@tijsâ€ĸUpdated 1 week ago
1// Integration tests for API endpoints
2import { assertEquals } from "https://deno.land/std@0.208.0/assert/mod.ts";
3
147 await response.text(); // Consume response body
148
149 // Check that response includes CORS headers for API endpoints
150 assertEquals(response.status, 200);
151 // Note: Some CORS headers may be added by Val Town automatically
169});
170
171Deno.test("Integration - content-type should be JSON for API responses", async () => {
172 const response = await fetch(`${BASE_URL}/health`);
173 const data = await response.json(); // Consume as JSON instead of text

LLS-Webflowmain.js3 matches

@kennydeeâ€ĸUpdated 1 week ago
24var cookieClose;
25var cookieBanner;
26var baseUrl_dev_env = "https://api-dev.lelivrescolaire.fr";
27var baseUrl_prod_env = "https://api.lelivrescolaire.fr";
28var checkDev = new RegExp(/www\.lelivrescolaire\.fr|^lelivrescolaire\.fr/g);
29var baseUrl = checkDev.test(document.location.hostname)
202}
203
204function capitalizeFirstLetter(str) {
205 return str.trim().charAt(0).toUpperCase() + str.trim().slice(1).toLowerCase();
206}

wahoearningREADME.md21 matches

@wahobdâ€ĸUpdated 1 week ago
114- `vip_levels_v2` - VIP āϞ⧇āϭ⧇āϞ āĻ•āύāĻĢāĻŋāĻ—āĻžāϰ⧇āĻļāύ
115
116## 🔧 API Endpoints
117
118### Authentication
119- `POST /api/auth/register` - āύāϤ⧁āύ āĻāĻ•āĻžāωāĻ¨ā§āϟ āϤ⧈āϰāĻŋ
120- `POST /api/auth/login` - āϞāĻ—āχāύ
121- `POST /api/auth/verify` - āĻŸā§‹āϕ⧇āύ āϝāĻžāϚāĻžāχ
122
123### Tasks
124- `GET /api/tasks` - āϟāĻžāĻ¸ā§āĻ• āϤāĻžāϞāĻŋāĻ•āĻž
125- `POST /api/tasks/complete` - āϟāĻžāĻ¸ā§āĻ• āϏāĻŽā§āĻĒāĻ¨ā§āύ
126- `GET /api/tasks/history` - āϟāĻžāĻ¸ā§āĻ• āχāϤāĻŋāĻšāĻžāϏ
127- `GET /api/tasks/today-summary` - āφāϜāϕ⧇āϰ āϏāĻžāĻŽāĻžāϰāĻŋ
128
129### Payments
130- `GET /api/payments/transactions` - āϞ⧇āύāĻĻ⧇āύ⧇āϰ āχāϤāĻŋāĻšāĻžāϏ
131- `POST /api/payments/deposit` - āĻĄāĻŋāĻĒā§‹āϜāĻŋāϟ āϰāĻŋāϕ⧋āϝāĻŧ⧇āĻ¸ā§āϟ
132- `POST /api/payments/withdraw` - āωāχāĻĨāĻĄā§āϰ āϰāĻŋāϕ⧋āϝāĻŧ⧇āĻ¸ā§āϟ
133- `GET /api/payments/vip-levels` - VIP āϞ⧇āϭ⧇āϞ āϤāĻžāϞāĻŋāĻ•āĻž
134- `GET /api/payments/methods` - āĻĒ⧇āĻŽā§‡āĻ¨ā§āϟ āĻŽā§‡āĻĨāĻĄ
135
136### Admin
137- `POST /api/admin/login` - āĻāĻĄāĻŽāĻŋāύ āϞāĻ—āχāύ
138- `GET /api/admin/dashboard` - āĻĄā§āϝāĻžāĻļāĻŦā§‹āĻ°ā§āĻĄ āĻ¸ā§āĻŸā§āϝāĻžāϟāϏ
139- `GET /api/admin/users` - āĻŦā§āϝāĻŦāĻšāĻžāϰāĻ•āĻžāϰ⧀ āϤāĻžāϞāĻŋāĻ•āĻž
140- `GET /api/admin/transactions` - āϞ⧇āύāĻĻ⧇āύ āϤāĻžāϞāĻŋāĻ•āĻž
141- `POST /api/admin/transactions/:id/status` - āϞ⧇āύāĻĻ⧇āύ āĻ…āύ⧁āĻŽā§‹āĻĻāύ
142- `POST /api/admin/users/:id/toggle-status` - āĻŦā§āϝāĻŦāĻšāĻžāϰāĻ•āĻžāϰ⧀ āĻ¸ā§āĻŸā§āϝāĻžāϟāĻžāϏ
143- `POST /api/admin/broadcast` - āĻŦā§āϰāĻĄāĻ•āĻžāĻ¸ā§āϟ āύ⧋āϟāĻŋāĻĢāĻŋāϕ⧇āĻļāύ
144
145## 📱 āĻŦā§āϝāĻŦāĻšāĻžāϰ⧇āϰ āύāĻŋāĻ°ā§āĻĻ⧇āĻļāύāĻž
170- **Input Validation**: āϏāĻŦ āχāύāĻĒ⧁āϟ āϝāĻžāϚāĻžāχ
171- **SQL Injection Protection**: Parameterized queries
172- **Rate Limiting**: API āĻ•āϞ āϏ⧀āĻŽāĻžāĻŦāĻĻā§āϧāϤāĻž
173- **CORS Protection**: āĻ•ā§āϰāϏ-āĻ…āϰāĻŋāϜāĻŋāύ āύāĻŋāϰāĻžāĻĒāĻ¤ā§āϤāĻž
174

wahoearningAdminPanel.tsx5 matches

@wahobdâ€ĸUpdated 1 week ago
38 };
39
40 const response = await fetch('/api/admin/dashboard', { headers });
41 if (response.ok) {
42 const data = await response.json();
54 try {
55 const token = localStorage.getItem('adminToken');
56 const response = await fetch('/api/admin/users', {
57 headers: { 'Authorization': `Bearer ${token}` }
58 });
72 try {
73 const token = localStorage.getItem('adminToken');
74 const response = await fetch('/api/admin/transactions', {
75 headers: { 'Authorization': `Bearer ${token}` }
76 });
102 try {
103 const token = localStorage.getItem('adminToken');
104 const response = await fetch(`/api/admin/transactions/${transactionId}/status`, {
105 method: 'POST',
106 headers: {
127 try {
128 const token = localStorage.getItem('adminToken');
129 const response = await fetch(`/api/admin/users/${userId}/toggle-status`, {
130 method: 'POST',
131 headers: { 'Authorization': `Bearer ${token}` }

wahoearningDashboard.tsx4 matches

@wahobdâ€ĸUpdated 1 week ago
31
32 // Load tasks
33 const tasksResponse = await fetch('/api/tasks', { headers });
34 if (tasksResponse.ok) {
35 const tasksData = await tasksResponse.json();
38
39 // Load transactions
40 const transactionsResponse = await fetch('/api/payments/transactions', { headers });
41 if (transactionsResponse.ok) {
42 const transactionsData = await transactionsResponse.json();
45
46 // Load today's summary
47 const summaryResponse = await fetch('/api/tasks/today-summary', { headers });
48 if (summaryResponse.ok) {
49 const summaryData = await summaryResponse.json();
74 try {
75 const token = localStorage.getItem('authToken');
76 const response = await fetch('/api/tasks/complete', {
77 method: 'POST',
78 headers: {

wahoearningAuthPage.tsx3 matches

@wahobdâ€ĸUpdated 1 week ago
49 if (isAdminLogin) {
50 // Admin login
51 const response = await fetch('/api/admin/login', {
52 method: 'POST',
53 headers: { 'Content-Type': 'application/json' },
67 } else if (isLogin) {
68 // User login
69 const response = await fetch('/api/auth/login', {
70 method: 'POST',
71 headers: { 'Content-Type': 'application/json' },
85 } else {
86 // User registration
87 const response = await fetch('/api/auth/register', {
88 method: 'POST',
89 headers: { 'Content-Type': 'application/json' },

wahoearningApp.tsx2 matches

@wahobdâ€ĸUpdated 1 week ago
31 if (adminToken) {
32 // Check admin token validity
33 const response = await fetch('/api/admin/dashboard', {
34 headers: {
35 'Authorization': `Bearer ${adminToken}`
47 if (token) {
48 // Verify user token
49 const response = await fetch('/api/auth/verify', {
50 method: 'POST',
51 headers: {

wahoearningindex.ts6 matches

@wahobdâ€ĸUpdated 1 week ago
17await runMigrations();
18
19// API Routes
20app.route('/api/auth', auth);
21app.route('/api/tasks', tasks);
22app.route('/api/payments', payments);
23app.route('/api/admin', admin);
24
25// Serve static files
50 status: 'ok',
51 timestamp: new Date().toISOString(),
52 message: 'EarnBD API is running'
53 });
54});

ESVVerseGrabbermain.tsx3 matches

@sprenâ€ĸUpdated 1 week ago
78
79const getRandomVerse = async () => {
80 const ESV_API_TOKEN = Deno.env.get("ESV_API_TOKEN");
81 const reference = getRandomVerseReference();
82 const params = new URLSearchParams({
93 "indent-psalm-doxology": "0"
94 });
95 const url = `https://api.esv.org/v3/passage/text/?${params.toString()}`;
96 const resp = await fetch(url, {
97 headers: {
98 Authorization: `Token ${ESV_API_TOKEN}`,
99 },
100 });

claude-api1 file match

@ziyanwouldâ€ĸUpdated 3 days ago

api-workshop

@danarddanielsjrâ€ĸUpdated 4 days ago
replicate
Run AI with an API
fiberplane
Purveyors of Hono tooling, API Playground enthusiasts, and creators of đŸĒŋ HONC đŸĒŋ (https://honc.dev)