laravel-printing
PrintNode
Printer Service
On this page
Introduction
The PrinterService
can be used to fetch printers associated with your PrintNode account.
All methods are callable from the PrintNodeClient
class.
$printers = $client->printers->all();
See the API Overview for more information on interacting with the PrintNode API.
Reference
Methods
all
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Printer>
Retrieve all printers associated with your PrintNode account.
param | type | default |
---|---|---|
$params |
array|null | null |
$opts |
null|array|RequestOptions | null |
retrieve
Rawilk\Printing\Api\PrintNode\Resources\Printer
Retrieve a specific printer by ID from your PrintNode account.
param | type | default | description |
---|---|---|---|
$id |
int | the printer's ID | |
$params |
array|null | null | not applicable to this request |
$opts |
null|array|RequestOptions | null |
retrieveSet
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Printer>
Retrieve a set of printers.
param | type | default | description |
---|---|---|---|
$ids |
array | the printer IDs | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
printJobs
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\PrintJob>
Retrieve all print jobs associated with a given printer. Pass an array for $parentId
to retrieve print jobs for multiple printers.
param | type | default | description |
---|---|---|---|
$parentId |
int|array | the printer's ID | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
printJob
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\PrintJob>|Rawilk\Printing\Api\PrintNode\Resources\PrintJob>
Retrieve a single or set of print jobs associated with a given printer.
Pass an array for $parentId
to retrieve print jobs for multiple printers. Pass an array for $printJobId
to retrieve a set of print jobs.
param | type | default | description |
---|---|---|---|
$parentId |
int|array | the printer's ID | |
$printJobId |
int|array | the print job's ID | |
$params |
array|null | null | |
$opts |
null|array|RequestOptions | null |
Printer Resource
Rawilk\Printing\Api\PrintNode\Resources\Printer
A Printer
represents a Printer attached to a Computer
object in the PrintNode API.
Properties
id
int
The printer's ID.
createTimestamp
string
Time and date the printer was first registered with PrintNode.
computer
Rawilk\Printing\Api\PrintNode\Resources\Computer
The computer object the printer is attached to.
name
string
The name of the printer.
description
?string
The description of the printer reported by the client.
capabilities
?Rawilk\Printing\Api\PrintNode\Resources\Support\PrinterCapabilities
The capabilities of the printer reported by the client.
default
bool
Flag that indicates if this is the default printer for this computer.
state
string
The state of the printer reported by the client.
Methods
createdAt
?CarbonInterface
A date object representing the date and time the printer was first registered with PrintNode.
copies
int
The maximum number of copies the printer supports.
isColor
bool
Indicates if the printer is capable of color printing.
canCollate
bool
Indicates true if the printer supports collation.
media
array
An array of media names the printer driver supports. May be zero-length.
bins
array
The paper tray names the printer driver supports. May be zero-length.
trays
array
Alias for bins()
.
isOnline
bool
Indicates if the printer is considered to be online.
Methods
printJobs
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\PrintJob>
Fetch all print jobs that have been sent to the printer.
$printJobs = $printer->printJobs();
param | type | default |
---|---|---|
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |
findPrintJob
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\PrintJob>|Rawilk\Printing\Api\PrintNode\Resources\PrintJob
Find a specific print job that was sent to the printer. Pass an array for $id
to find a set of print jobs.
$printJob = $printer->findPrintJob(100);
param | type | default |
---|---|---|
$id |
int|array | |
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |
Static Methods
all
Collection<int, Rawilk\Printing\Api\PrintNode\Resources\Printer>
Retrieve all printers.
$printers = Printer::all();
param | type | default |
---|---|---|
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |
retrieve
Rawilk\Printing\Api\PrintNode\Resources\Printer
Retrieve a printer with a given id.
$printer = Printer::retrieve(100);
param | type | default |
---|---|---|
$id |
int | |
$params |
null|array | null |
$opts |
null|array|RequestOptions | null |