2017 © Pedro Peláez
 

library restpack-php

Restpack API Client

image

restpackio/restpack-php

Restpack API Client

  • Thursday, April 12, 2018
  • by restpackio
  • Repository
  • 2 Watchers
  • 1 Stars
  • 255 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 1317 % Grown

The README.md

reastpack-php

Official PHP client for Restpack APIs, (*1)

Installation

Requires PHP 5.6., (*2)

The recommended way to install restpack-php is through Composer:, (*3)

First, install Composer:, (*4)

$ curl -sS https://getcomposer.org/installer | php

Next, install the latest restpack-php:, (*5)

$ php composer.phar require restpackio/restpack-php

Finally, you need to require the library in your PHP application:, (*6)

require "vendor/autoload.php";

Screenshot API

For detailed documentation, please visit Screenshot API v6 Reference page., (*7)

$screenshot = new Restpack\Screenshot("<YOUR ACCESS TOKEN>");

// Capture given URL. Return the document details and CDN url of the Image
$screenshot->capture("http://google.com", [ "format" => "png" /* , other options */ ])

// Capture given html content. Return the document details and CDN url of the Image
$screenshot->captureHTML("

Bold text etc, (*8)

", [ "format" => "png" /* , other options */ ]) // Capture given URL. Return the image file as Buffer $screenshot->captureToImage("http://google.com", [ "format" => "png" /* , other options */ ]) // Capture given html content. Return the image file as Buffer $screenshot->captureHTMLToImage("

Bold text etc, (*9)

", [ "format" => "png" /* , other options */ ])

HTML To PDF API

For detailed documentation, please visit HTML to PDF API v5 Reference page., (*10)

$htmlpdf = new Restpack\HTMLToPDF("<YOUR ACCESS TOKEN>");

// Convert given URL to PDF. Return the document details and CDN url of PDF
$htmlpdf->convert("http://google.com", [ "pdf_page" => "A4" /* , other options */ ])

// Convert given html content to PDF. Return the document details and CDN url of PDF
$htmlpdf->convertHTML("

Bold text etc, (*11)

", [ "pdf_page" => "A4" /* , other options */ ]) // Convert given URL to PDF. Return the PDF document as Buffer $htmlpdf->convertToPDF("http://google.com", [ "pdf_page" => "A4" /* , other options */ ]) // Convert given html content to PDF. Return the PDF document as Buffer $htmlpdf->convertHTMLToPDF("

Bold text etc, (*12)

", [ "pdf_page" => "A4" /* , other options */ ])

The Versions

12/04 2018

dev-master

9999999-dev

Restpack API Client

  Sources   Download

MIT

The Requires

 

12/04 2018

1.0.0

1.0.0.0

Restpack API Client

  Sources   Download

MIT

The Requires