aboutsummaryrefslogtreecommitdiffstats
path: root/lulu.go
diff options
context:
space:
mode:
Diffstat (limited to 'lulu.go')
-rw-r--r--lulu.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/lulu.go b/lulu.go
index b6f5942..64fd1fc 100644
--- a/lulu.go
+++ b/lulu.go
@@ -273,6 +273,21 @@ func (c *Client) GetPrintJobs(queries ...PrintJobQuery) ([]PrintJob, error) {
}
}
+// GetPrintJob retrieves the print job with the given ID.
+//
+// https://api.lulu.com/docs/#tag/Print-Jobs/operation/Print-Jobs_read
+func (c *Client) GetPrintJob(id uint64) (PrintJob, error) {
+ var job PrintJob
+ path, err := url.JoinPath(printJobsPath, fmt.Sprint(id))
+ if err != nil {
+ return job, pkgErr(err)
+ }
+ if err := c.getDecode(path, &job); err != nil {
+ return job, pkgErr(err)
+ }
+ return job, nil
+}
+
// Print creates a new print job.
//
// contact: Email address that should be contacted if questions