Skip to content

Repository files navigation

API Client

PHP bindings for the Labelary.com API (http://labelary.com).

API Documentation

Build StatusCode ClimateTest Coverage

Installation

The API client can be installed via Composer.

In your composer.json file:

{
"require": {
"printu/labelary": "~2.0"
}
}

Once the composer.json file is created you can run composer install for the initial package install and composer update to update to the latest version of the API client.

The client uses Guzzle.

Basic Usage

Remember to include the Composer autoloader in your application:

<?phpuseGuzzleHttp\Exception\GuzzleException;
require_once'vendor/autoload.php';
// Application code...$labelary = newLabelary\Client();
$zpl = '^xa^cfa,50^fo100,100^fdHello World^fs^xz';
try {
$response = $labelary->printers->labels([
'zpl' => $zpl,
'response' => 'application/pdf',
'rotate' => 180
]);
} catch (GuzzleException$e) {
thrownewException("API Labelary error: ".$e->getMessage());
}

License

MIT license. See the LICENSE file for more details.

About

Easy ZPL to image conversion

Topics

Resources

Stars

35 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages