diff --git a/cmd/subscribe.go b/cmd/subscribe.go index 07861ad..cf7d622 100644 --- a/cmd/subscribe.go +++ b/cmd/subscribe.go @@ -157,8 +157,7 @@ func subscribe(cmd *cobra.Command, args []string) { } defer ws.Close() - client := api.NewAPIClient(api.NewConfiguration()) - req := client.GameAPI.LiveGameV1(context.Background(), gamePk) + req := statsAPIClient.GameAPI.LiveGameV1(context.Background(), gamePk) resp, err := req.Execute() if err != nil { @@ -173,7 +172,7 @@ func subscribe(cmd *cobra.Command, args []string) { fmt.Println(string(body)) - err = updateFeed(body, ws, client) + err = updateFeed(body, ws, statsAPIClient) if err != nil { log.Fatal(err) }