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)
633const httpClient = new MCPClient({
634type: 'http',
635endpoint: 'https://api.example.com/mcp',
636headers: { 'Authorization': 'Bearer token' }
637});
640const sseClient = new MCPClient({
641type: 'sse',
642endpoint: 'https://api.example.com/mcp,https://api.example.com/mcp/stream',
643headers: { 'Authorization': 'Bearer token' }
644});
647const wsClient = new MCPClient({
648type: 'websocket',
649endpoint: 'wss://api.example.com/mcp'
650});
651
7TeamPerformanceStats,
8WaiverWirePlayer,
9YahooAPIConfig,
10} from "../daily_lineup_scheduler.tsx";
11import { LouTokenStorage } from "../token_storage.tsx";
91}
9293// Initialize Yahoo API client
94const yahooAPI = new YahooFantasyAPIClient(tokenData, this.tokenStorage, userId);
9596// Gather comprehensive data
97const dataPromises = [
98yahooAPI.getTeamPerformanceStats(teamKey, leagueId),
99yahooAPI.getTeamRoster(teamKey),
100this.getLeagueStandings(yahooAPI, leagueId),
101];
102103// Only fetch waiver players in detailed mode
104if (!fastMode) {
105dataPromises.push(yahooAPI.getWaiverWirePlayers(leagueId));
106}
107115116// Get detailed player performance for all roster players
117const playerPerformances = await this.analyzeRosterPerformance(yahooAPI, roster, leagueId, fastMode);
118119// Analyze team performance
125// Generate targeted waiver recommendations for underperformers
126const waiverRecommendations = await this.generateTargetedWaiverRecommendations(
127yahooAPI,
128playerPerformances,
129leagueId,
169if (!tokenData) return [];
170171const yahooAPI = new YahooFantasyAPIClient(tokenData, this.tokenStorage, userId);
172173// Get team matchup history
174const matchupsResponse = await yahooAPI.makeRequest(`/team/${teamKey}/matchups`);
175176const weeklyTrends: WeeklyTrends[] = [];
227if (!tokenData) return null;
228229const yahooAPI = new YahooFantasyAPIClient(tokenData, this.tokenStorage, userId);
230231// Get all teams in the league
232const standings = await this.getLeagueStandings(yahooAPI, leagueId);
233const teamStats = await yahooAPI.getTeamPerformanceStats(teamKey, leagueId);
234235if (!teamStats || !standings) return null;
261262private async analyzeRosterPerformance(
263yahooAPI: any,
264roster: any[],
265leagueId: string,
271272if (fastMode) {
273// Fast mode: Use only roster data, skip individual API calls
274console.log(`⚡ Fast mode enabled - using roster data only`);
275294}
295296// Detailed mode: Make individual API calls (slower)
297console.log(`🐌 Detailed mode - fetching individual player stats`);
298308try {
309// Pass the player name from roster to avoid "Unknown Player" issues
310const playerStats = await yahooAPI.getPlayerPerformanceStats(
311player.player_id,
312leagueId,
445*/
446private async generateTargetedWaiverRecommendations(
447yahooAPI: any,
448playerPerformances: PlayerPerformanceStats[],
449leagueId: string,
487console.log(`📊 Analyzing top waiver options for ${positionType === "B" ? "batters" : "pitchers"}`);
488489const positionWaiverPlayers = await yahooAPI.getWaiverWirePlayersByPosition(leagueId, positionType, 10);
490491if (positionWaiverPlayers && positionWaiverPlayers.length > 0) {
580}
581582private async getLeagueStandings(yahooAPI: any, leagueId: string): Promise<any[]> {
583try {
584const standingsResponse = await yahooAPI.makeRequest(`/league/${leagueId}/standings`);
585const standings = standingsResponse?.fantasy_content?.league?.[1]?.standings;
586758}
759760// 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";