blob: 95f32f636a5d8c6116bbfab75900ae3abad72c6c (
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
28
29
30
|
package octoprintApis
import (
// "bytes"
"encoding/json"
// "fmt"
// "io"
// "strings"
"github.com/Z-Bolt/OctoScreen/octoprintApis/dataModels"
)
// CustomCommandsRequest retrieves all configured system controls.
type CustomCommandsRequest struct{}
// Do sends an API request and returns the API response.
func (cmd *CustomCommandsRequest) Do(c *Client) (*dataModels.CustomCommandsResponse, error) {
bytes, err := c.doJsonRequest("GET", PrinterCommandCustomApiUri, nil, nil, true)
if err != nil {
return nil, err
}
response := &dataModels.CustomCommandsResponse{}
if err := json.Unmarshal(bytes, response); err != nil {
return nil, err
}
return response, err
}
|