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=fetch&page=1&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 18964 results for "fetch"(709ms)

No matches found in users.

Try switching to another result type using the tabs above.

untitled-5100main.ts5 matches

@chatgot•Updated 1 hour ago
67 // Debug mode
68 if (mode === "debug") {
69 const response = await fetch(
70 `${baseUrl}?view=mTeam&view=mSettings&scoringPeriodId=2`,
71 {
112 `${baseUrl}?view=mMatchup&view=mMatchupScore&view=mTeam&view=mSettings&view=mBoxscore&view=mScoreboard&view=mRoster&view=mLiveScoring&scoringPeriodId=${targetWeek}`;
113
114 const response = await fetch(apiUrl, {
115 method: "GET",
116 headers: {
287 const apiUrl = `${baseUrl}?view=mTeam&view=mStandings&view=mSettings`;
288
289 const response = await fetch(apiUrl, {
290 method: "GET",
291 headers: {
353 `${baseUrl}?view=mRoster&view=mTeam&view=mLiveScoring&view=mMatchupScore&scoringPeriodId=${currentWeek}&teamId=${actualTeamId}`;
354
355 const response = await fetch(apiUrl, {
356 method: "GET",
357 headers: {
423 } catch (error) {
424 return Response.json({
425 error: "Failed to fetch fantasy data",
426 details: error.message,
427 });
144
145#### **Agent Data Integration**
146- **Real-time Agent Updates**: Fetches agent data every 5 seconds when user is authorized
147- **Conditional Display**: Remote support section only appears when agents array has at least one item
148- **Complete Agent Information**: Shows all blob contents including pageId, agents array, lastUpdated, and assignedAt timestamps
149- **Authorization-based**: Only fetches agent data for authorized users (matching email addresses)
150- **Error Handling**: Silent console logging for missing agent data without disrupting user experience
151
196```javascript
197// Internal call from within Val (no authentication needed)
198const response = await fetch('/api/demo/page-id/properties');
199const data = await response.json();
200
2765. **STEP 1: Clear Current Demo Blob** - Immediately clears the agent blob for this demo
2776. **STEP 2: Find New Agents** - Queries agents database by Assigned property
2787. **STEP 3: Collect Agent Data** - Fetches complete agent information and validates
2798. **STEP 4: Clear Agents from Other Demo Blobs** - Removes agents from any other demo blobs to prevent double-assignment
2809. **STEP 5: Update Current Demo Blob** - Stores new agent assignments in the current demo's blob
295**Error Handling & Reliability:**
296- **Transactional Approach**: Collects all required data before making any changes
297- **Early Validation**: Aborts assignment if any agent data cannot be fetched
298- **Atomic Updates**: Critical Notion updates happen together or not at all
299- **Non-Blocking Blob Operations**: Both blob updates and blob clearing are non-blocking

FetchBasic2 file matches

@bengold•Updated 1 week ago

fetch1 file match

@raify•Updated 2 weeks ago