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=39&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 19289 results for "api"(3010ms)

myApi1 file match

@cescyangUpdated 1 year ago

myApi1 file match

@destroytodayUpdated 1 year ago

satsNameApi1 file match

@ryanwaitsUpdated 1 year ago

myApi1 file match

@willyeUpdated 1 year ago

myApi1 file match

@eufracioUpdated 1 year ago

myApi1 file match

@sudocssUpdated 1 year ago

myApi1 file match

@turtlebitsUpdated 1 year ago

myApi1 file match

@csellisUpdated 1 year ago

myApi1 file match

@mmccUpdated 1 year ago

myApi1 file match

@alexwarthUpdated 1 year ago

ChatMCPClient.ts3 matches

@c15rUpdated 1 hour ago
633const httpClient = new MCPClient({
634 type: 'http',
635 endpoint: 'https://api.example.com/mcp',
636 headers: { 'Authorization': 'Bearer token' }
637});
640const sseClient = new MCPClient({
641 type: 'sse',
642 endpoint: 'https://api.example.com/mcp,https://api.example.com/mcp/stream',
643 headers: { 'Authorization': 'Bearer token' }
644});
647const wsClient = new MCPClient({
648 type: 'websocket',
649 endpoint: 'wss://api.example.com/mcp'
650});
651
7 TeamPerformanceStats,
8 WaiverWirePlayer,
9 YahooAPIConfig,
10} from "../daily_lineup_scheduler.tsx";
11import { LouTokenStorage } from "../token_storage.tsx";
91 }
92
93 // Initialize Yahoo API client
94 const yahooAPI = new YahooFantasyAPIClient(tokenData, this.tokenStorage, userId);
95
96 // Gather comprehensive data
97 const dataPromises = [
98 yahooAPI.getTeamPerformanceStats(teamKey, leagueId),
99 yahooAPI.getTeamRoster(teamKey),
100 this.getLeagueStandings(yahooAPI, leagueId),
101 ];
102
103 // Only fetch waiver players in detailed mode
104 if (!fastMode) {
105 dataPromises.push(yahooAPI.getWaiverWirePlayers(leagueId));
106 }
107
115
116 // Get detailed player performance for all roster players
117 const playerPerformances = await this.analyzeRosterPerformance(yahooAPI, roster, leagueId, fastMode);
118
119 // Analyze team performance
125 // Generate targeted waiver recommendations for underperformers
126 const waiverRecommendations = await this.generateTargetedWaiverRecommendations(
127 yahooAPI,
128 playerPerformances,
129 leagueId,
169 if (!tokenData) return [];
170
171 const yahooAPI = new YahooFantasyAPIClient(tokenData, this.tokenStorage, userId);
172
173 // Get team matchup history
174 const matchupsResponse = await yahooAPI.makeRequest(`/team/${teamKey}/matchups`);
175
176 const weeklyTrends: WeeklyTrends[] = [];
227 if (!tokenData) return null;
228
229 const yahooAPI = new YahooFantasyAPIClient(tokenData, this.tokenStorage, userId);
230
231 // Get all teams in the league
232 const standings = await this.getLeagueStandings(yahooAPI, leagueId);
233 const teamStats = await yahooAPI.getTeamPerformanceStats(teamKey, leagueId);
234
235 if (!teamStats || !standings) return null;
261
262 private async analyzeRosterPerformance(
263 yahooAPI: any,
264 roster: any[],
265 leagueId: string,
271
272 if (fastMode) {
273 // Fast mode: Use only roster data, skip individual API calls
274 console.log(`⚡ Fast mode enabled - using roster data only`);
275
294 }
295
296 // Detailed mode: Make individual API calls (slower)
297 console.log(`🐌 Detailed mode - fetching individual player stats`);
298
308 try {
309 // Pass the player name from roster to avoid "Unknown Player" issues
310 const playerStats = await yahooAPI.getPlayerPerformanceStats(
311 player.player_id,
312 leagueId,
445 */
446 private async generateTargetedWaiverRecommendations(
447 yahooAPI: any,
448 playerPerformances: PlayerPerformanceStats[],
449 leagueId: string,
487 console.log(`📊 Analyzing top waiver options for ${positionType === "B" ? "batters" : "pitchers"}`);
488
489 const positionWaiverPlayers = await yahooAPI.getWaiverWirePlayersByPosition(leagueId, positionType, 10);
490
491 if (positionWaiverPlayers && positionWaiverPlayers.length > 0) {
580 }
581
582 private async getLeagueStandings(yahooAPI: any, leagueId: string): Promise<any[]> {
583 try {
584 const standingsResponse = await yahooAPI.makeRequest(`/league/${leagueId}/standings`);
585 const standings = standingsResponse?.fantasy_content?.league?.[1]?.standings;
586
758}
759
760// Import the YahooFantasyAPIClient from the main scheduler file
761// This allows the analyzer to use the same API client
762import { YahooFantasyAPIClient } from "../daily_lineup_scheduler.tsx";
apiry
snartapi