<?php
require_once dirname(__DIR__).'/gateway/ProductionGateway.php';
$g=new ProductionGateway();
$d=$_GET['race_date']??date('Y-m-d');
$v=$_GET['venue']??'';
$r=isset($_GET['race_num'])?(int)$_GET['race_num']:0;
header('Content-Type: application/json; charset=utf-8');
echo json_encode($g->execute($d,$v,$r),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
