aboutsummaryrefslogtreecommitdiffstats
path: root/lulu.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-05-16 12:09:09 -0400
committerSam Anthony <sam@samanthony.xyz>2026-05-16 12:09:09 -0400
commit45914474e6d25b97e51f7858ddb5c78438d386d7 (patch)
treead19125bb2ef8295d6a297511a9eacd06151adfd /lulu.go
parentb2930794aaac97e1ee89c3c214f8cc42e254d02c (diff)
downloadlulu-45914474e6d25b97e51f7858ddb5c78438d386d7.zip
implement GET /print-jobs/id
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