diff --git a/internal/statsapi/feed.go b/internal/statsapi/feed.go index 9496199..5f1ab02 100644 --- a/internal/statsapi/feed.go +++ b/internal/statsapi/feed.go @@ -98,23 +98,3 @@ func (f *FeedResponse) Patch(instr *instruction) { if err != nil { } } - -func (p *Play) Patch(patch Patch) { - instructions := patch.Diff - stem := "/liveData/plays/currentPlay" - for _, i := range instructions { - if i.Op == "add" && i.Path == stem+"/result/description" { - p.Result.Description = i.Value.(string) - } else if i.Op == "replace" && i.Path == stem+"/about/isScoringPlay" { - p.About.IsScoringPlay = i.Value.(bool) - } else if i.Op == "replace" && i.Path == stem+"/result/homeScore" { - p.Result.HomeScore = int(i.Value.(float64)) - } else if i.Op == "replace" && i.Path == stem+"/result/awayScore" { - p.Result.AwayScore = int(i.Value.(float64)) - } else if i.Op == "add" && i.Path == stem+"/result/event" { - p.Result.Event = i.Value.(string) - } else if i.Op == "replace" && i.Path == stem+"/atBatIndex" { - p.AtBatIndex = int(i.Value.(float64)) - } - } -}