diff options
Diffstat (limited to 'lulu.go')
| -rw-r--r-- | lulu.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |