From 45914474e6d25b97e51f7858ddb5c78438d386d7 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 16 May 2026 12:09:09 -0400 Subject: implement GET /print-jobs/id --- lulu.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lulu.go') 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 -- cgit v1.2.3