Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrintNode::viewScales does not work when $deviceNumber is not NULL #59

Open
archonia-chris opened this issue Feb 4, 2025 · 0 comments

Comments

@archonia-chris
Copy link

public function viewScales($computerId, $deviceName = null, $deviceNumber = null)

When $deviceNumber is anything but NULL, the following URL is created

"/computer/{$computerId}/scales/{$deviceName}/{$deviceNumber}"

This is not a valid API url ("scales" vs "scale"):

GET/computer/COMPUTER ID/scales
GET/computer/COMPUTER ID/scales/DEVICE NAME
GET/computer/COMPUTER ID/scale/DEVICE NAME/DEVICE NUMBER

A 404 is returned.

Additionally, ResponseprocessResponseString generates an error since $this->bodyJson is NULL in such a case
throw new Exception\HTTPException($this->httpStatusCode, $this->bodyJson->message);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant