use default client
This commit is contained in:
parent
79f8faf583
commit
5bfec4d5d9
|
@ -157,8 +157,7 @@ func subscribe(cmd *cobra.Command, args []string) {
|
||||||
}
|
}
|
||||||
defer ws.Close()
|
defer ws.Close()
|
||||||
|
|
||||||
client := api.NewAPIClient(api.NewConfiguration())
|
req := statsAPIClient.GameAPI.LiveGameV1(context.Background(), gamePk)
|
||||||
req := client.GameAPI.LiveGameV1(context.Background(), gamePk)
|
|
||||||
|
|
||||||
resp, err := req.Execute()
|
resp, err := req.Execute()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -173,7 +172,7 @@ func subscribe(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
fmt.Println(string(body))
|
fmt.Println(string(body))
|
||||||
|
|
||||||
err = updateFeed(body, ws, client)
|
err = updateFeed(body, ws, statsAPIClient)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue