postHogAPICapture1 file match
instagramScraping1 file match
harmoniousPlumTapir1 file match
apiProxy2 file matches
capitalMultipliers2 file matches
fiberplaneHonoZodStarter10 file matches
Hono-Zod-OpenAPI with Fiberplane API Playground integration
You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$1?q=api&page=7&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 19751 results for "api"(2871ms)
75}
7677// API endpoints
78app.get("/api/game-state", async (c) => {
79const gameState = await getGameState();
80return c.json(gameState);
81});
8283app.get("/api/users", async (c) => {
84const users = await getActiveUsers();
85return c.json({ users });
86});
8788app.post("/api/join", async (c) => {
89const { name } = await c.req.json();
90111});
112113app.post("/api/leave", async (c) => {
114const { userId } = await c.req.json();
115122});
123124app.post("/api/submit-fact", async (c) => {
125const { userId, fact } = await c.req.json();
126133});
134135app.post("/api/start-round", async (c) => {
136const unusedFacts = await getUnusedFacts();
137154});
155156app.post("/api/vote", async (c) => {
157const { factId, voterId, guessedUserId } = await c.req.json();
158179});
180181app.post("/api/reveal", async (c) => {
182const currentRound = await getCurrentRound();
183201});
202203app.post("/api/skip", async (c) => {
204const currentRound = await getCurrentRound();
205213214// Admin endpoint to kick all players and clear game data
215app.post("/api/admin/kick-all", async (c) => {
216try {
217await clearAllGameData();
50```
51โโโ backend/
52โ โโโ index.ts # Main Hono server with game API endpoints
53โ โโโ database/
54โ โ โโโ migrations.ts # SQLite schema for users, facts, votes, rounds
92- โ **Complete game flow from start to finish**
9394## API Endpoints
9596- `GET /api/game-state` - Get current game state including users, rounds, leaderboard
97- `POST /api/join` - Join the game with a name
98- `POST /api/leave` - Leave the game
99- `POST /api/submit-fact` - Submit a personal fact
100- `POST /api/start-round` - Start a new round with a random fact
101- `POST /api/vote` - Cast a vote for who you think the fact belongs to
102- `POST /api/reveal` - Reveal the answer and award points
103- `POST /api/skip` - Skip the current round
104- `POST /api/admin/kick-all` - **[ADMIN]** Clear all game data and kick all players
105106## Admin Features