diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-05-16 12:09:09 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-05-16 12:09:09 -0400 |
| commit | 45914474e6d25b97e51f7858ddb5c78438d386d7 (patch) | |
| tree | ad19125bb2ef8295d6a297511a9eacd06151adfd /lulu.go | |
| parent | b2930794aaac97e1ee89c3c214f8cc42e254d02c (diff) | |
| download | lulu-45914474e6d25b97e51f7858ddb5c78438d386d7.zip | |
implement GET /print-jobs/id
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 |