<?php
// Test API endpoint directly
header('Content-Type: text/plain');

try {
    echo "Testing API endpoint...\n\n";
    
    // Test getEventData
    $url = 'http://localhost:8000/api/judge_score_api_fixed.php?action=getEventData&event_id=3';
    echo "Testing: $url\n";
    
    $response = file_get_contents($url);
    echo "Response: " . $response . "\n\n";
    
    // Test getFigures directly
    $url2 = 'http://localhost:8000/api/judge_score_api_fixed.php?action=getFigures&sport=snowboard';
    echo "Testing: $url2\n";
    
    $response2 = file_get_contents($url2);
    echo "Response: " . $response2 . "\n\n";
    
} catch (Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
?>
