<?php
require_once dirname(__DIR__) . '/bootstrap/chairman_v44_migration_bootstrap.php';
$raceDate = isset($_GET['race_date']) ? $_GET['race_date'] : date('Y-m-d');
$venue = isset($_GET['venue']) ? $_GET['venue'] : '';
$raceNum = isset($_GET['race_num']) ? intval($_GET['race_num']) : 0;
$mode = isset($_GET['mode']) ? strtoupper($_GET['mode']) : 'BALANCED';
header('Content-Type: application/json; charset=utf-8');
echo json_encode($V44Engine->build($raceDate,$venue,$raceNum,$mode), JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
