Download the PHP package onestopmobile/printnode-sdk without Composer

On this page you can find all versions of the php package onestopmobile/printnode-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package printnode-sdk

One Stop Mobile PrintNode SDK

Tests Coverage Latest Version on Packagist Total Downloads License

A PHP 8.5+ SDK for PrintNode with typed API access and an optional Laravel print layer.

Use it when you want:

Choose Your Entry Point

Installation

Minimum requirement: PHP 8.5.

If you are working on this repository itself instead of consuming the package, use:

Recommended .env setup:

Supported API Areas

SDK Endpoint Matrix

API area SDK entry point Public methods
whoami whoAmI(), whoAmIResource() get()
computers computers() all(), get(), delete()
printers printers() all()
printjobs printJobs() all(), get(), create(), delete(), states(), byPrinters(), deleteByPrinters()
downloads downloads() all(), get(), latest(), update()
scales scales() listConnected(), all(), byDeviceName(), get(), test()
webhooks webhooks() all(), create(), update(), delete()
account account() create(), update(), delete(), controllable(), getState(), setState(), getTag(), setTag(), deleteTag(), getApiKey(), createApiKey(), deleteApiKey(), clientKey()
misc misc() ping(), noop()

Full low-level SDK reference: docs/sdk-reference.md.

Typed API Usage

Typed child-account creation

Child-account impersonation

Laravel integration

The package ships with OneStopMobile\PrintNodeSdk\Laravel\PrintNodeServiceProvider and a publishable config file:

Supported Laravel integration target: 12.x and 13.x.

Laravel uses the same recommended env names shown above.

For array- and class-based options like allowed_environments, resolver, and default_options, use the published config/printnode.php file.

High-level printing API

The package also ships with a Laravel-friendly print abstraction for short application code.

Direct printing to a known PrintNode printer id:

This is the fastest path when your application already knows the external PrintNode printer id.

Printing raw content:

Or use the semantic ZPL helper:

Using dependency injection instead of the facade:

If you prefer to avoid a long list of named arguments when customizing the print layer, configure it through PrintManagerConfig:

Target-based printing

If your application does not store raw PrintNode printer ids everywhere, you can resolve arbitrary app targets through a user-defined resolver.

The package itself does not assume anything about databases, Eloquent models or your own printer storage. You provide that behavior by binding OneStopMobile\PrintNodeSdk\Contracts\ResolvesPrintTarget.

to(...) is the Laravel-facing name for this flow.

See docs/laravel-printing.md for the full resolver example and integration guide.

Laravel print safety and logging

The Laravel integration can optionally protect physical printers outside selected environments and can log print activity through an existing Laravel log channel.

The published config defaults are intentionally safe:

Published printnode.php config supports:

When logging is enabled, the package logs metadata such as printer id, title, content type, request id and payload length. Payload hashes are optional and disabled by default. Raw ZPL/PDF content is not logged by default.

Error handling

Failed API responses are mapped to SDK exceptions:

RateLimitException also exposes the raw Retry-After header when the API provides one.

Development scripts

Live GET smoke test

You can run a non-destructive live smoke test through the SDK itself with an API key argument:

Default GET suite:

Extended GET suite:


All versions of printnode-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
psr/log Version ^3.0
saloonphp/saloon Version ^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package onestopmobile/printnode-sdk contains the following files

Loading the files please wait ...