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=296&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 15832 results for "api"(1963ms)

bragreelREADME.md2 matches

@lightweightUpdated 2 weeks ago
20## Setup Instructions
21
221. Set up a `CLAUDE_API_KEY` environment variable in Val Town with your Anthropic API key
232. Configure your Notion integration to send webhooks to this endpoint
243. Ensure your Notion database has the following properties:
861. **Using the Test UI**: Visit the `/test-ui` endpoint to access a simple web interface where you can enter URLs and see the analysis results.
87
882. **Direct API Testing**: Send a POST request to the root endpoint with a JSON payload containing a URL:
89
90```json

bragreelindex.ts7 matches

@lightweightUpdated 2 weeks ago
4const app = new Hono();
5
6// Initialize Claude client with API key from environment variables
7const anthropic = new Anthropic({
8 apiKey: Deno.env.get("CLAUDE_API_KEY"),
9});
10
232 console.error("Error analyzing with Claude:", error);
233
234 // Check for specific Claude API errors
235 if (error.status === 429) {
236 throw new Error("Claude API rate limit exceeded. Please try again later.");
237 } else if (error.status === 401) {
238 throw new Error("Claude API authentication failed. Check your API key.");
239 }
240
359
360 // Prepare response for Notion
361 // This structure may need to be adjusted based on Notion's API requirements
362 const response = {
363 properties: {
389 status: "OK",
390 timestamp: new Date().toISOString(),
391 claude_api_key: Deno.env.get("CLAUDE_API_KEY") ? "Configured" : "Missing",
392 };
393 return c.json(status);

SatrancChessGame.tsx2 matches

@erensUpdated 2 weeks ago
45 const fetchGame = async () => {
46 try {
47 const response = await fetch(`/api/games/${gameId}`);
48 if (response.ok) {
49 const gameData = await response.json();
229
230 try {
231 const response = await fetch(`/api/games/${gameId}`, {
232 method: "PUT",
233 headers: {

SatrancDashboard.tsx1 match

@erensUpdated 2 weeks ago
45 const fetchOpponents = async () => {
46 try {
47 const response = await fetch("/api/users");
48 if (response.ok) {
49 const users = await response.json();

SatrancApp.tsx5 matches

@erensUpdated 2 weeks ago
83 const fetchActiveGames = async () => {
84 try {
85 const response = await fetch("/api/games/active");
86 if (response.ok) {
87 const games = await response.json();
96 const fetchLeagueStandings = async () => {
97 try {
98 const response = await fetch("/api/league/standings");
99 if (response.ok) {
100 const standings = await response.json();
119 // In a real app, you would use a proper authentication endpoint
120 // For simplicity, we're using the users endpoint with filtering
121 const response = await fetch("/api/users");
122 if (response.ok) {
123 const users = await response.json();
147 const handleRegister = async (username: string, password: string) => {
148 try {
149 const response = await fetch("/api/users", {
150 method: "POST",
151 headers: {
183
184 try {
185 const response = await fetch("/api/games", {
186 method: "POST",
187 headers: {

Satrancindex.ts13 matches

@erensUpdated 2 weeks ago
59});
60
61// API Routes
62const api = new Hono();
63
64// User routes
65api.get("/users", async c => {
66 const users = await getUsers();
67 return c.json(users);
68});
69
70api.get("/users/:id", async c => {
71 const id = c.req.param("id");
72 const user = await getUserById(parseInt(id));
77});
78
79api.post("/users", async c => {
80 const data = await c.req.json();
81 const { username, password } = data;
94
95// Game routes
96api.post("/games", async c => {
97 const data = await c.req.json();
98 const { whiteId, blackId } = data;
110});
111
112api.get("/games/:id", async c => {
113 const id = c.req.param("id");
114 const game = await getGame(parseInt(id));
119});
120
121api.put("/games/:id", async c => {
122 const id = c.req.param("id");
123 const data = await c.req.json();
154});
155
156api.get("/games/user/:userId", async c => {
157 const userId = c.req.param("userId");
158 const games = await getUserGames(parseInt(userId));
160});
161
162api.get("/games/active", async c => {
163 const games = await getActiveGames();
164 return c.json(games);
166
167// League routes
168api.get("/league/standings", async c => {
169 const standings = await getLeagueStandings();
170 return c.json(standings);
171});
172
173// Mount API routes
174app.route("/api", api);
175
176// Export the Hono app

SatrancREADME.md1 match

@erensUpdated 2 weeks ago
13## Project Structure
14
15- `/backend`: Server-side code and API endpoints
16- `/frontend`: Client-side code and UI components
17- `/shared`: Shared types and utilities

Pegasusindex.html9 matches

@Genetical_aiUpdated 2 weeks ago
355 try {
356 const jsonData = JSON.parse(jsonYamlInput.value);
357 const response = await fetch('/api/convert/json-to-yaml', {
358 method: 'POST',
359 headers: { 'Content-Type': 'application/json' },
434 encodeBase64Btn.addEventListener('click', async () => {
435 try {
436 const response = await fetch('/api/convert/base64', {
437 method: 'POST',
438 headers: { 'Content-Type': 'application/json' },
453 decodeBase64Btn.addEventListener('click', async () => {
454 try {
455 const response = await fetch('/api/convert/base64', {
456 method: 'POST',
457 headers: { 'Content-Type': 'application/json' },
477 generateUuidBtn.addEventListener('click', async () => {
478 try {
479 const response = await fetch('/api/generate/uuid');
480 const result = await response.json();
481 uuidOutput.value = result.uuid;
491
492 for (let i = 0; i < 10; i++) {
493 const response = await fetch('/api/generate/uuid');
494 const result = await response.json();
495 uuids.push(result.uuid);
523
524 // Конвертация в RGB
525 const response = await fetch('/api/convert/color', {
526 method: 'POST',
527 headers: { 'Content-Type': 'application/json' },
534
535 // Конвертация RGB в HSL
536 const rgbToHslResponse = await fetch('/api/convert/color', {
537 method: 'POST',
538 headers: { 'Content-Type': 'application/json' },
559
560 // Конвертация в HEX
561 const response = await fetch('/api/convert/color', {
562 method: 'POST',
563 headers: { 'Content-Type': 'application/json' },
571
572 // Конвертация в HSL
573 const rgbToHslResponse = await fetch('/api/convert/color', {
574 method: 'POST',
575 headers: { 'Content-Type': 'application/json' },

PegasusREADME.md1 match

@Genetical_aiUpdated 2 weeks ago
33```
34
35Эти утилиты разработаны для использования как в браузере, так и на сервере, без зависимости от специфичных для платформы API.

PegasusREADME.md1 match

@Genetical_aiUpdated 2 weeks ago
30- Интуитивно понятный интерфейс с карточками инструментов
31- Мгновенная обработка данных без перезагрузки страницы
32- Интеграция с серверным API для сложных операций

googleGeminiAPI2 file matches

@michaelwschultzUpdated 13 hours ago

HN-fetch-call2 file matches

@ImGqbUpdated 3 days ago
fetch HackerNews by API
Kapil01
apiv1