Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Z-Bolt/OctoScreen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mcuadros/go-octoprint/job.go')
-rwxr-xr-xvendor/github.com/mcuadros/go-octoprint/job.go39
1 files changed, 23 insertions, 16 deletions
diff --git a/vendor/github.com/mcuadros/go-octoprint/job.go b/vendor/github.com/mcuadros/go-octoprint/job.go
index d337283..27a093d 100755
--- a/vendor/github.com/mcuadros/go-octoprint/job.go
+++ b/vendor/github.com/mcuadros/go-octoprint/job.go
@@ -7,29 +7,36 @@ import (
"log"
)
-const JobTool = "/api/job"
-var JobToolErrors = statusMapping{
+var JobToolErrors = StatusMapping{
409: "Printer is not operational or the current print job state does not match the preconditions for the command.",
}
-// JobRequest retrieve information about the current job (if there is one).
-type JobRequest struct{}
-// Do sends an API request and returns the API response.
-func (cmd *JobRequest) Do(c *Client) (*JobResponse, error) {
- bytes, err := c.doJSONRequest("GET", JobTool, nil, nil)
- if err != nil {
- return nil, err
- }
- response := &JobResponse{}
- if err := json.Unmarshal(bytes, response); err != nil {
- return nil, err
- }
- return response, err
-}
+// JobRequest is now in JobRequest.go
+// // JobRequest retrieve information about the current job (if there is one).
+// type JobRequest struct{}
+
+// // Do sends an API request and returns the API response.
+// func (cmd *JobRequest) Do(c *Client) (*JobResponse, error) {
+// bytes, err := c.doJSONRequest("GET", JobTool, nil, nil)
+// if err != nil {
+// return nil, err
+// }
+
+// response := &JobResponse{}
+// if err := json.Unmarshal(bytes, response); err != nil {
+// return nil, err
+// }
+
+// return response, err
+// }
+
+
+
+
// StartRequest starts the print of the currently selected file.
type StartRequest struct{}