add fixme

This commit is contained in:
filifa 2024-07-10 23:47:51 -05:00
parent 8603978c7d
commit c1b94af8bb
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ type Game struct {
func (g *Game) Update(feed *statsapi.FeedResponse) { func (g *Game) Update(feed *statsapi.FeedResponse) {
homeScore, _ := (*feed)["liveData"].(map[string]any)["linescore"].(map[string]any)["teams"].(map[string]any)["home"].(map[string]any)["runs"].(float64) homeScore, _ := (*feed)["liveData"].(map[string]any)["linescore"].(map[string]any)["teams"].(map[string]any)["home"].(map[string]any)["runs"].(float64)
awayScore, _ := (*feed)["liveData"].(map[string]any)["linescore"].(map[string]any)["teams"].(map[string]any)["away"].(map[string]any)["runs"].(float64) awayScore, _ := (*feed)["liveData"].(map[string]any)["linescore"].(map[string]any)["teams"].(map[string]any)["away"].(map[string]any)["runs"].(float64)
// FIXME: currentPlay/result doesn't always have description
desc, _ := (*feed)["liveData"].(map[string]any)["plays"].(map[string]any)["currentPlay"].(map[string]any)["result"].(map[string]any)["description"].(string) desc, _ := (*feed)["liveData"].(map[string]any)["plays"].(map[string]any)["currentPlay"].(map[string]any)["result"].(map[string]any)["description"].(string)
g.HomeScore = uint(homeScore) g.HomeScore = uint(homeScore)