From 542c2850a7724329bb59380684e40b23b00fb125 Mon Sep 17 00:00:00 2001 From: filifa Date: Tue, 9 Jul 2024 23:51:44 -0500 Subject: [PATCH] remove old patch method --- internal/statsapi/feed.go | 20 -------------------- 1 file changed, 20 deletions(-) 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)) - } - } -}