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%22Image%20title%22?q=api&page=63&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"(1485ms)

myApi1 file match

@javiโ€ขUpdated 1 year ago

myApi1 file match

@xiaogenbanโ€ขUpdated 1 year ago

myApi1 file match

@taowenโ€ขUpdated 1 year ago

myApi1 file match

@ddpopbb3โ€ขUpdated 1 year ago

myApi1 file match

@gbeaverโ€ขUpdated 1 year ago

myApi1 file match

@britzdmโ€ขUpdated 1 year ago

myApi1 file match

@danielraffelโ€ขUpdated 1 year ago

myApi1 file match

@R3D01NG1Tโ€ขUpdated 1 year ago

myApi1 file match

@jqxuโ€ขUpdated 1 year ago

myApi1 file match

@ndom91โ€ขUpdated 1 year ago

factoid-triviaREADME.md11 matches

@bmitchinsonโ€ขUpdated 2 hours ago
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**
93
94## API Endpoints
95
96- `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
105
106## Admin Features

factoid-triviaApp.tsx10 matches

@bmitchinsonโ€ขUpdated 2 hours ago
48 const fetchGameState = async () => {
49 try {
50 const response = await fetch("/api/game-state");
51 if (response.ok) {
52 const newGameState = await response.json();
85
86 try {
87 const response = await fetch("/api/join", {
88 method: "POST",
89 headers: { "Content-Type": "application/json" },
118
119 try {
120 const response = await fetch("/api/submit-fact", {
121 method: "POST",
122 headers: { "Content-Type": "application/json" },
144
145 try {
146 const response = await fetch("/api/start-round", {
147 method: "POST",
148 headers: { "Content-Type": "application/json" },
171
172 try {
173 const response = await fetch("/api/vote", {
174 method: "POST",
175 headers: { "Content-Type": "application/json" },
200
201 try {
202 const response = await fetch("/api/reveal", {
203 method: "POST",
204 headers: { "Content-Type": "application/json" },
222
223 try {
224 const response = await fetch("/api/skip", {
225 method: "POST",
226 headers: { "Content-Type": "application/json" },
244
245 try {
246 await fetch("/api/leave", {
247 method: "POST",
248 headers: { "Content-Type": "application/json" },
272
273 try {
274 const response = await fetch("/api/admin/kick-all", {
275 method: "POST",
276 headers: { "Content-Type": "application/json" },
316 if (currentUserId) {
317 navigator.sendBeacon(
318 "/api/leave",
319 JSON.stringify({ userId: currentUserId })
320 );
apiry
snartapi