livescore
const API_URL = "https://api.team-manager.gc.com/public/widgets/scoreboard/943c0a1b-c47f-496b-98f9-c09c3bc21fe8?start=2026-03-13T00:00:00-05:00";
async function loadGames(){
const response = await fetch(API_URL); const data = await response.json();
const games = data.data.events;
let html = "";
games.forEach(game=>{
let status = "";
if(game.game_status === "live"){
const inning = game.sport_specific.bats.inning_details.inning; const half = game.sport_specific.bats.inning_details.half;
const arrow = half === "top" ? "▲" : "▼";
status = `LIVE ${arrow} ${inning}`;
}
else if(game.game_status === "completed"){ status = "FINAL"; }
else{
const date = new Date(game.start_ts);
status = date.toLocaleTimeString([], { hour:'2-digit', minute:'2-digit' });
}
html += `
`;
});
document.getElementById("fedebeis-scoreboard").innerHTML = html;
}
loadGames(); setInterval(loadGames,30000);