diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-05-21 18:13:15 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-05-21 18:21:54 -0400 |
| commit | 06ba9b3e492ca47f6f966bd7bd6044809b989c30 (patch) | |
| tree | 8077af89b899ca57be8d688380c36bbc70534103 /lulu.go | |
| parent | 9d5cc798f82ff4a899984fa73014bd604d44ee32 (diff) | |
| download | lulu-c78cb8cc6ab72f86190d29b5da935b1c304d64af.zip | |
tidyv0.1.0
Diffstat (limited to 'lulu.go')
| -rw-r--r-- | lulu.go | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -135,9 +135,9 @@ func (c *Client) StartInteriorValidationBasic(srcUrl string) (uint, error) { } func (c *Client) startInteriorValidation(payload any) (uint, error) { - var rec InteriorValidation - err := c.postDecode(validateInteriorPath, payload, http.StatusCreated, &rec) - return rec.Id, err + var val InteriorValidation + err := c.postDecode(validateInteriorPath, payload, http.StatusCreated, &val) + return val.Id, err } // GetInteriorValidation retrieves information about an interior file @@ -149,11 +149,11 @@ func (c *Client) GetInteriorValidation(id uint) (InteriorValidation, error) { if err != nil { return InteriorValidation{}, pkgErr(err) } - var rec InteriorValidation - if err := c.getDecode(path, &rec); err != nil { + var val InteriorValidation + if err := c.getDecode(path, &val); err != nil { return InteriorValidation{}, pkgErr(err) } - return rec, nil + return val, nil } // CoverDimensions calculates the required dimensions of the cover for a @@ -193,12 +193,12 @@ func (c *Client) ValidateCover(ctx context.Context, srcUrl string, mfg PkgId, np // https://api.lulu.com/docs/#tag/Files-validation/operation/Validate-Cover_create func (c *Client) StartCoverValidation(srcUrl string, mfg PkgId, npages uint) (uint, error) { payload := validateCoverReq{srcUrl, mfg, npages} - var rec CoverValidation - err := c.postDecode(validateCoverPath, payload, http.StatusCreated, &rec) + var val CoverValidation + err := c.postDecode(validateCoverPath, payload, http.StatusCreated, &val) if err != nil { return 0, pkgErr(err) } - return rec.Id, nil + return val.Id, nil } // GetCoverValidiation retrieves information about a cover file @@ -210,11 +210,11 @@ func (c *Client) GetCoverValidation(id uint) (CoverValidation, error) { if err != nil { return CoverValidation{}, pkgErr(err) } - var rec CoverValidation - if err := c.getDecode(path, &rec); err != nil { + var val CoverValidation + if err := c.getDecode(path, &val); err != nil { return CoverValidation{}, pkgErr(err) } - return rec, nil + return val, nil } // Cost calculates the cost of a hypothetical print order without |