blob: dfbd71f3714c653d0e7ce6cba38bf59a31702022 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package octoprintApis
import (
"bytes"
"encoding/json"
// "fmt"
"github.com/Z-Bolt/OctoScreen/logger"
)
type RunZOffsetCalibrationRequest struct {
Command string `json:"command"`
}
func (this *RunZOffsetCalibrationRequest) Do(client *Client) error {
this.Command = "run_zoffset_calibration"
buffer := bytes.NewBuffer(nil)
if err := json.NewEncoder(buffer).Encode(this); err != nil {
logger.LogError("RunZOffsetCalibrationRequest.Do()", "json.NewEncoder(params).Encode(this)", err)
return err
}
_, err := client.doJsonRequest("POST", PluginZBoltOctoScreenApiUri, buffer, ConnectionErrors, true)
return err
}
|