Skip to content

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

Description

@archonia-chris

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);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions