Skip to content

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

@archonia-chris

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions