laravel-printing
PrintNode
Computer Service
On this page
Introduction
The ComputerService
can be used to fetch all computers associated with your PrintNode account. It can also be used to delete computers from your account.
All methods are callable from the PrintNodeClient
class.
$computers = $client->computers->all();
See the API Overview for more information on interacting with the PrintNode API.
Reference
Methods
all
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Computer>
Retrieves all computers associated with your PrintNode account.
param | type | default |
---|---|---|
$params |
array|null | null |
$opts |
null|array|RequestOptions | null |
retrieve
Rawilk\Printing\Api\PrintNode\Resources\Computer
Retrieve a computer from the API.
param | type | default | description |
---|---|---|---|
$id |
int | the computer's ID | |
$params |
array|null | null | not applicable to this request |
$opts |
null|array|RequestOptions | null |
retrieveSet
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Computer>
Retrieve a specific set of computers.
param | type | default | description |
---|---|---|---|
$ids |
array | the IDs of the computers to retrieve | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
delete
array
Delete a given computer. Method will return an array of affected computer IDs.
param | type | default | description |
---|---|---|---|
$id |
int | the computer's ID | |
$params |
array|null | null | not applicable to this request |
$opts |
null|array|RequestOptions | null |
deleteMany
array
Delete a set of computers. Omit or use an empty array of $ids
to delete all computers. Method will return an array of affected IDs.
param | type | default | description |
---|---|---|---|
$ids |
array | the IDs of the computers to delete | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
printers
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Printer>
Retrieve all printers attached to a given computer.
param | type | default | description |
---|---|---|---|
$parentId |
int|array | the computer's ID. pass an array to retrieve printers for multiple computers | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
printer
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Printer>
Retrieve one or many printers attached to a given computer.
param | type | default | description |
---|---|---|---|
$parentId |
int|array | the computer's ID. pass an array to retrieve printers for multiple computers | |
$printerId |
int|array | the printer's ID. pass an array to retrieve a set of printers | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
Computer Resource
Rawilk\Printing\Api\PrintNode\Resources\Computer
A computer represents a device that has the PrintNode Client software installed on it, and which has successfully connected to PrintNode. When the PrintNode Client runs on a computer it automatically reports the existence of the computer to the server. From then on the computer is recognized by the API.
Properties
id
int
The computer's ID.
createTimestamp
string
Time and date the computer was first registered with PrintNode.
name
string
The computer's name.
state
string
Current state of the computer.
hostname
?string
The computer's host name.
inet
?string
The computer's ipv4 address.
inet6
?string
The computer's ivp6 address.
jre
?string
Reserved.
version
?string
The PrintNode software version that is run on the computer.
Methods
createdAt
?CarbonInterface
A date object representing the time and date the computer was first registered with PrintNode.
printers
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Printer>
Fetch all printers attached to the computer.
$printers = $computer->printers();
param | type | default |
---|---|---|
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |
findPrinter
Rawilk\Printing\Api\PrintNode\Resources\Printer
Find a specific printer attached to the printer. Pass an array for $id
to find a set of printers.
$printer = $computer->findPrinter(100);
param | type | default |
---|---|---|
$id |
int|array | |
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |
delete
Rawilk\Printing\Api\PrintNode\Resources\Computer
Delete the computer instance.
param | type | default |
---|---|---|
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |
Static Methods
all
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Computer>
Retrieve all computers.
Computer::all();
param | type | default |
---|---|---|
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |
retrieve
Rawilk\Printing\Api\PrintNode\Resources\Computer
Retrieve a computer with a given id.
$computer = Computer::retrieve(100);
param | type | default |
---|---|---|
$id |
int | |
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |